This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 997380 - Anonymous types in an exception aren't generated in WSDL
Anonymous types in an exception aren't generated in WSDL
Status: CLOSED NOTABUG
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Alessio Soldano
Rostislav Svoboda
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-15 07:02 EDT by Tadayoshi Sato
Modified: 2015-04-25 16:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-05 06:15:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Reproducer (4.65 KB, application/zip)
2013-08-15 07:02 EDT, Tadayoshi Sato
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBWS-3682 Major Closed Anonymous types in an exception aren't generated in WSDL 2015-04-25 16:30:14 EDT
Apache JIRA CXF-5208 None None None Never

  None (edit)
Description Tadayoshi Sato 2013-08-15 07:02:24 EDT
Created attachment 786888 [details]
Reproducer

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.
Comment 1 JBoss JIRA Server 2014-06-05 06:12:39 EDT
Tadayoshi Sato <tadayosi@gmail.com> updated the status of jira JBWS-3682 to Resolved
Comment 2 Tadayoshi Sato 2014-06-05 06:15:48 EDT
Closed as a correct way to fix the issue is provided. See Grzegorz' comment at CXF-5208 for how to fix it.
Comment 4 JBoss JIRA Server 2015-04-25 16:30:16 EDT
Alessio Soldano <asoldano@redhat.com> updated the status of jira JBWS-3682 to Closed

Note You need to log in before you can comment on or make changes to this bug.