[
https://issues.apache.org/jira/browse/CXF-5208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14018626#comment-14018626
]
Tadayoshi Sato commented on CXF-5208:
-------------------------------------
Hi Grzegorz,
Sorry for such a late reply. Thank you for showing a resolution to this issue.
I totally agree with you and it can be resolved by this way. So I close this
ticket.
> Anonymous types in an exception aren't generated in WSDL
> --------------------------------------------------------
>
> Key: CXF-5208
> URL: https://issues.apache.org/jira/browse/CXF-5208
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding, Tooling
> Affects Versions: 2.7.6
> Reporter: Tadayoshi Sato
> Attachments: exception-anontype.zip
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)