DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17235>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17235 Axis 1.1 rc1 does not handle classes which have java.lang.Exception as an ancestor Summary: Axis 1.1 rc1 does not handle classes which have java.lang.Exception as an ancestor Product: Axis Version: 1.1RC1 Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: WSDL processing AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Axis 1.1 rc1 includes unwanted properties (cause, message, stackTrace) for classes which have java.lang.Exception as an ancestor. Consider the following two exception classes: class ExceptionA extends Exception { public String getContent() { return "blah"; } } class ExceptionB extends ExceptionA {} The relevant wsdl generated for these classes is: <complexType name="ExceptionA"> <sequence> <element name="content" nillable="true" type="xsd:string" /> </sequence> </complexType> <complexType name="ExceptionB"> <complexContent> <extension base="impl:ExceptionA"> <sequence> <element name="cause" nillable="true" type="tns1:Throwable" /> <element name="message" nillable="true" type="xsd:string" /> <element name="stackTrace" nillable="true" type="impl:ArrayOf_tns1_StackTraceElement" /> </sequence> </extension> </complexContent> </complexType> The wsdl for ExceptionA is correct, since it has java.lang.Exception as its parent. However, ExceptionB has unwanted properties inherited from java.lang.Throwable. Furthermore, when ExceptionB is thrown from a web service method, the following exceptions are generated: 01:36:42,326 ERROR [SOAPPart] Exception: java.io.IOException: No serializer found for class java.lang.StackTraceElement in registry org.apache.axis.encoding.TypeMappingImpl@24ea85 at org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1273) at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:787) at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.java:858) at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:155) at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:413) at org.apache.axis.message.MessageElement.output(MessageElement.java:760) at org.apache.axis.AxisFault.output(AxisFault.java:680) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:259) at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:468) at org.apache.axis.Message.getSOAPPartAsString(Message.java:365) at org.apache.axis.transport.http.AxisServlet.invokeEndpointFromGet(AxisServlet.java:567) at org.apache.axis.transport.http.AxisServlet.processMethodRequest(AxisServlet.java:466) at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:294) ... 01:36:42,336 ERROR [SOAPPart] Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: ExceptionB faultActor: faultNode: faultDetail: ExceptionB at org.apache.axis.AxisFault.makeFault(AxisFault.java:129) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:340) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:473) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:322) at org.apache.axis.transport.http.AxisServlet.invokeEndpointFromGet(AxisServlet.java:544) at org.apache.axis.transport.http.AxisServlet.processMethodRequest(AxisServlet.java:466) at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:294) ... The problem appears to be happening because BeanUtils.getPropertyDescriptors() uses java.lang.Exception as a stop class only if java.lang.Exception is the parent of a given class. The attached patch fixes the problem by modifying BeanUtils.getPropertyDescriptors() to use java.lang.Throwable as the stop class for all classes assignable from Throwable.
