CXF does not generate anonymous types within an exception in JBoss WS
Issue
- We have a method that launches an exception. This exception includes some fields. The fields for which the type is annotated
@XMLType(name="")are simply ignored. - Example:
public class MyException extends Exception {
String str;
MyClass1 obj1;
public String getStr() { return str; }
public void setStr(String str) { this.str = str; }
public MyClass1 getObj1() { return obj1; }
public void setObj1(MyClass1 obj1) { this.obj1 = obj1; }
}
@XmlType(name = "")
public class MyClass1 {
String s1;
public String getS1() { return s1; }
public void setS1(String s1) { this.s1 = s1; }
}
- In WSDL, the generated type for the
MyExceptionis:
<xs:complexType name="MyException">
<xs:sequence>
<xs:element name="str" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- As you can see, the field
obj1is absent.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
