Getting client side adb exception when receiving a message from a POJO service 
where the service return Java exception.     
-----------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-5174
                 URL: https://issues.apache.org/jira/browse/AXIS2-5174
             Project: Axis2
          Issue Type: Bug
          Components: adb, codegen
    Affects Versions: 1.6.1, nightly
            Reporter: Sagara Gunathunga 
            Priority: Critical
             Fix For: 1.7.0


Deploy following POJO method in 1.7.0 SNAPSHOT version

public String echo(String testStr) throws IllegalArgumentException {
       
        throw new IllegalArgumentException(
                "Exception thrown from echo for the input " + testStr);     
    }


In Axis2 1.5.x and 1.6.0 invoking above method return following message and get 
excepted exception in client side.

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
      <soapenv:Body>
         <soapenv:Fault>
            <soapenv:Code>
               <soapenv:Value>soapenv:Receiver</soapenv:Value>
            </soapenv:Code>
            <soapenv:Reason>
               <soapenv:Text xml:lang="en-US">Exception thrown from echo for 
the input Ok</soapenv:Text>
            </soapenv:Reason>
            <soapenv:Detail />
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>

Exception in thread "main" org.apache.axis2.AxisFault: Exception thrown from 
echo for the input Ok
    at 
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
    at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
    at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
    at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at sample.SimpleServiceStub.echo(SimpleServiceStub.java:191)
    at sample.Run.main(Run.java:489)


In Axis2 1.6.1 and 1.7.0- SNAPSHOT invoking same method return different 
response message as follows and return a ADB exception instead of expected 
exception.


<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
      <soapenv:Body>
         <soapenv:Fault>
            <soapenv:Code>
               <soapenv:Value>soapenv:Receiver</soapenv:Value>
            </soapenv:Code>
            <soapenv:Reason>
               <soapenv:Text xml:lang="en-US">Exception thrown from echo for 
the input Ok</soapenv:Text>
            </soapenv:Reason>
            <soapenv:Detail>
               <ns:SimpleServiceIllegalArgumentException 
xmlns:ns="http://sample";>
                  <IllegalArgumentException xmlns="http://sample"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="axis2ns3:anyType" />
               </ns:SimpleServiceIllegalArgumentException>
            </soapenv:Detail>
         </soapenv:Fault>
      </soapenv:Body>

Exception in thread "main" org.apache.axis2.AxisFault: 
org.apache.axis2.databinding.ADBException: Can not invoke the getTypeObject 
method in the extension mapper class
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    at sample.SimpleServiceStub.fromOM(SimpleServiceStub.java:1896)
    at sample.SimpleServiceStub.echo(SimpleServiceStub.java:220)
    at sample.Run.main(Run.java:489)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Can 
not invoke the getTypeObject method in the extension mapper class
    at 
sample.SimpleServiceStub$SimpleServiceIllegalArgumentException$Factory.parse(SimpleServiceStub.java:1781)
    at sample.SimpleServiceStub.fromOM(SimpleServiceStub.java:1890)
    ... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Can not invoke the 
getTypeObject method in the extension mapper class
    at 
org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(ConverterUtil.java:1659)
    at 
sample.SimpleServiceStub$SimpleServiceIllegalArgumentException$Factory.parse(SimpleServiceStub.java:1759)
    ... 3 more



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.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]

Reply via email to