SOAP Web Service Client throws SOAPFaultException: Null Pointer Exception

2k Views Asked by At

We are facing an issue when interacting with a SOAP based Web Service on IBM WebSphere Application Server 9. The invocation takes place through EAR file that is deployed on WAS 9.0 and 8.5.5.12.

Below is the stack trace of the logs generated when interaction takes place:-

javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException** at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1363) at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.demarshalFaultResponse(MethodMarshallerUtils.java:1089) at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitBareMethodMarshaller.demarshalFaultResponse(DocLitBareMethodMarshaller.java:417) at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.getFaultResponse(JAXWSProxyHandler.java:626) at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createResponse(JAXWSProxyHandler.java:566) at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:432) at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:213) at com.sun.proxy.$Proxy160.nameEnquiry(Unknown Source) at com.nucleus.finnaxia.getAcctname.businessObject.service.SBSAIFTNameValidation.generateMessageForNIPS(SBSAIFTNameValidation.java:313)

nameEnquiry is the SOAP Operation that is being invoked via the deployed application.

SOAP Request when tried via SOAP UI works absolutely fine.

Sample Request:

<soapenv:Envelope xmlns:tran="http://abcd.xyz.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <tran:nameEnquiryRequest xmlns:ns0="http://abcd.xyz.com/">
         <submissionTime>2019-03-26T11:18:32.184+01:00</submissionTime>
         <batchId>0123456789</batchId>
         <interbankChannel>XYZ</interbankChannel>
         <reqTranId>9876543210</reqTranId>
         <nameEnquiryDetails>
            <items>
               <item>
                  <id>1234598765</id>
                  <sourceAcctNumber>000000000</sourceAcctNumber>
                  <destAcctNumber>1122334455</destAcctNumber>
                  <destAcctBankCode>090</destAcctBankCode>
               </item>
            </items>
         </nameEnquiryDetails>
      </tran:nameEnquiryRequest>
   </soapenv:Body>
</soapenv:Envelope>

what is being missed out here?

The same application when tried and tested with Weblogic Server 12C works fine.

  • Have tried changing the Class Loading from Parent First to Parent Last
  • Have tried changing the Class path, removed conflicting jars (jaxb-api and jaxbimpl.jar)
  • Have tried to disable the JAX-WS Engine of WAS by setting the property true in JVM properties.

response = service.nameEnquiry(requestObj);

nameEnquiry is the SOAP Operation. service is the Service Object (generated using wsimport command)

Expected: It should hit the Webservice and return the Response. Actual:- It is returning SOAPFault with Null pointer Exception.

0

There are 0 best solutions below