[jbossws-issues] [JBoss JIRA] (JBWS-3682) Anonymous types in an exception aren't generated in WSDL
RH Bugzilla Integration (JIRA)
jira-events at lists.jboss.org
Thu Aug 15 07:03:26 EDT 2013
[ https://issues.jboss.org/browse/JBWS-3682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797035#comment-12797035 ]
RH Bugzilla Integration commented on JBWS-3682:
-----------------------------------------------
Tadayoshi Sato <tasato at redhat.com> made a comment on [bug 997380|https://bugzilla.redhat.com/show_bug.cgi?id=997380]
Platform BZ for https://issues.jboss.org/browse/JBWS-3682
Anonymous types (annotated with @XmlType(name = "")) in an exception class aren't generated at all in WSDL.
Web service classes:
--------------------
@WebService
public class GreetingService {
@WebMethod
public void hello() throws MyException {}
...
public class MyException extends Exception {
private String str;
private MyAnonType myAnonObj;
public String getStr() { return str; }
public void setStr(String str) { this.str = str; }
public MyAnonType getMyAnonObj() { return myAnonObj; }
public void setMyAnonObj(MyAnonType myAnonObj) { this.myAnonObj = myAnonObj; }
...
@XmlType(name = "")
public class MyAnonType { ...
Generated WSDL:
---------------
<wsdl:types>
<xs:schema ...>
...
<xs:complexType name="MyException">
<xs:sequence>
<xs:element name="str" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Note that the same type (MyAnonType) is generated in WSDL if the @XmlType(name = "") annotation is removed.
> Anonymous types in an exception aren't generated in WSDL
> --------------------------------------------------------
>
> Key: JBWS-3682
> URL: https://issues.jboss.org/browse/JBWS-3682
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-cxf
> Affects Versions: jbossws-cxf-4.2
> Reporter: Tadayoshi Sato
> Attachments: exception-anontype.zip
>
>
> This is a CXF issue: https://issues.apache.org/jira/browse/CXF-5208
> Anonymous types (annotated with {{@XmlType(name = "")}}) in an exception class aren't generated at all in WSDL.
> Web service classes:
> {code:java}
> @WebService
> public class GreetingService {
> @WebMethod
> public void hello() throws MyException {}
> ...
> {code}
> {code:java}
> public class MyException extends Exception {
> private String str;
> private MyAnonType myAnonObj;
> public String getStr() { return str; }
> public void setStr(String str) { this.str = str; }
> public MyAnonType getMyAnonObj() { return myAnonObj; }
> public void setMyAnonObj(MyAnonType myAnonObj) { this.myAnonObj = myAnonObj; }
> ...
> {code}
> {code:java}
> @XmlType(name = "")
> public class MyAnonType { ...
> {code}
> Generated WSDL:
> {code:xml}
> <wsdl:types>
> <xs:schema ...>
> ...
> <xs:complexType name="MyException">
> <xs:sequence>
> <xs:element name="str" nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> {code}
> Note that the same type ({{MyAnonType}}) is generated in WSDL if the {{@XmlType(name = "")}} annotation is removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list