I have an exception:
public class MyException extends Exception {
public MyException() {
}
public MyException(String message) {
super(message);
}
}
The exception is thrown from a webservice method.
When I generate the Webservice using a regular Jax-ws implementation, the WSDL has:
<xs:complexType name='MyException'> <xs:sequence> <xs:element minOccurs='0' name='message' type='xs:string' /> </xs:sequence> </xs:complexType>
But, when generating the webservice with cxf, I get:
<xs:complexType name='MyException'> <xs:sequence/></xs:complexType>
Which is not ok for me: I expect to get the first variant.
Can you please advise how to force CXF to provide the desired result?
Remark: I cannot alter the code in the exception! The Exception does not have any fields!
Thanks!