Hi Iris, If I interpret spec correctly, you are right. Java bean mapped from exception should have getMessage() method.
Did you check it under the reference implementation? Cheers, Andrei. > -----Original Message----- > From: iris ding [mailto:[email protected]] > Sent: Dienstag, 8. Januar 2013 02:56 > To: [email protected] > Subject: getMessage from java.lang.Throwable is excluded from accepted > method > > According to jax-ws spec: > > For each getter in the exception and its superclasses, a property of the same > type and name is added to the bean. All the getter methods except > getMessage from java.lang.Throwable type hierarchy are excluded from the > list of getters to be mapped. > > But currently, message does not show up in generated wsdl in CXF: > > public class AddNumbersException extends Exception { > private static final long serialVersionUID = 4629689348515005826L; > String detail; > > public AddNumbersException(String message, String detail) { > super(message); > this.detail = detail; > } > > public String getDetail() { > return detail; > } > } > <xs:complexType name="AddNumbersException"> <xs:sequence> > <xs:element name="detail" nillable="true" type="xs:string"/> > </xs:sequence> </xs:complexType> > > The corrected version should be: > <xs:complexType name="AddNumbersException"> <xs:sequence> > <xs:element name="detail" nillable="true" type="xs:string"/> <xs:element > name="message" nillable="true" type="xs:string"/> </xs:sequence> > </xs:complexType> > > any thoughts? > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/getMessage-from-java-lang-Throwable-is- > excluded-from-accepted-method-tp5721196.html > Sent from the cxf-user mailing list archive at Nabble.com.
