Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5174

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.6.1, nightly
    • 1.7.0
    • adb, codegen
    • None

    Description

      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

      Attachments

        Activity

          People

            sagara Sagara Gunathunga
            sagara Sagara Gunathunga
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: