[ http://issues.apache.org/jira/browse/AXIS2-1052?page=comments#action_12439094 ] Eran Chinthaka commented on AXIS2-1052: ---------------------------------------
Hi Richard, I just used a wsdl which has a custom fault defined in it. And it seems all the issues linked from this also were fixed by now. Can you please re-check this issue. -- Chinthaka > Complex fault detail lost in exception caught on client side > ------------------------------------------------------------ > > Key: AXIS2-1052 > URL: http://issues.apache.org/jira/browse/AXIS2-1052 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: databinding > Affects Versions: 1.0 > Environment: Windows XP SP2 / Tomcat 5.5 > Reporter: Richard Gruet > Assigned To: Eran Chinthaka > Priority: Critical > > (This bug description started in AXIS2-917, but it was judged more > appropriate to open a new issue since this is related to fault handling > implementation, not documentation). > If I define a custom fault with a *complex* structure, like this one: > <complexType name="MiFault"> > <sequence> > <element name="error" minOccurs="0" maxOccurs="unbounded"> > <complexType> > <sequence> > <element name="errCode" type="string" minOccurs="0" /> > <element name="errMsg" type="string" /> > <element name="parameter" type="string" minOccurs="0" /> > </sequence> > </complexType> > </element> > </sequence> > </complexType> > ... assuming that I defined an operation throwMiFault() and generated the > code from the WSDL, Axis2 will have generated a ThrowMiFaultFaultException > class. > When I raise a ThrowMiFaultFaultException instance from the throwMiFault > method, everything goes fine on the server side. But on the client side, when > catching the ThrowMiFaultFaultException, I found that the fault detail > (obtained via e.getFaultMessage()) has an empty 'error' array [please see > details in AXIS2-917]. However, the XML for the fault detail looks correct: > <xml-fragment > xmlns:axis2ns1="http://linedata.com/WS/tests/sampleService/parts/1.0"> > <axis2ns1:error> > <axis2ns1:errCode>CODE1</axis2ns1:errCode> > <axis2ns1:errMsg>Error #1 message text</axis2ns1:errMsg> > <axis2ns1:parameter>param#1</axis2ns1:parameter> > </axis2ns1:error> > <axis2ns1:error> > <axis2ns1:errCode>CODE2</axis2ns1:errCode> > <axis2ns1:errMsg>Error #2 message text</axis2ns1:errMsg> > </axis2ns1:error> > </xml-fragment> > ... which suggests a possible AXIOM error (Derek Foster suggested that it > might be related to AXIS2-928). > When I define a *simple* custom error like this one: > <element name='xxxFault'> > <complexType> > <sequence> > <element name='message' type='string'/> > </sequence> > </complexType> > </element> > ... everything works fine and the xxxFaultException I get on the client side > contains the error detail (i.e. the message element). So the problem seems to > occur only with complex fault detail. > Richard -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]