WebService Execution Step throws error "org.apache.axis2.client.ServiceClient.getLastOperationContext()" is null
search cancel

WebService Execution Step throws error "org.apache.axis2.client.ServiceClient.getLastOperationContext()" is null

book

Article ID: 414817

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

After upgrading to DevTest 10.8.3.1, we noticed when running WebService Execution Step in DevTest 10.8.3.1 Workstationwe don't see the step getting executed.  When going to ITR, we see the following error message: 

ERROR:

| Trapped Exception: java.lang.NullPointerException: Cannot invoke "org.apache.axis2.context.OperationContext.getMessageContext(String)" because the return value of "org.apache.axis2.client.ServiceClient.getLastOperationContext()" is null
| Trapped Message:   java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "org.apache.axis2.context.OperationContext.getMessageContext(String)" because the return value of "org.apache.axis2.client.ServiceClient.getLastOperationContext()" is null

Environment

DevTest 10.8.3.1 and 10.8.4

Cause

The root cause is the presence of SOAP 1.1 Content type text/xml with SOAP1.2 Envelope: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema">

This mix up in the Virtual service created from WSDL was working fine with Axis1 libraries. But with Axis2, the SOAP version validation has been implemented strictly. Due to this, we get the error: org.apache.axis2.AxisFault: Transport level information does not match with SOAP Message namespace URI

Resolution

The solution is to implement a CustomSOAPBuilder that overrides the default behavior of AXIS2, which has been provided in the DE649894 patch. Please open a Support case with Broadcom, and request the following two files associated with DE649894:

  • axis2.xml
  • patch_DE649894_10.8.4_GA.jar

 The following steps need to be implemented on all the Workstation machines, as well as server machines where the VSE, Coordinator, and Simulator components are running.

  1. First take a backup of the file "LISA_HOME/repository/conf/axis2.xml" to a backup folder
  2. Place the new axis2.xml file at "LISA_HOME/repository/conf" folder
  3. Place the patch file "patch_DE649894_10.8.4_GA.jar" at LISA_HOME/lib/patches folder. If this folder does not exist, please create it.
  4. With the patch in place, relaunch the Workstation and test the Web Service Execution Step that failed earlier