0
votes

As part of our application segregation, we are downgrading the application server from WebSphere Application Server(WAS) to WebSphere Liberty. we faced the issue of target namespaces in SOAP Request & Response with WebSphere Liberty. We are able to generate the WSDL with proper format. But, we end up with request & response issues while integrating services through our Enterprise Service Bus(ESB).

Technically we are trying to use the apache-CXF which is inbuilt in WebSphere liberty for SOAP but also we have axis & axis2 jars exist in our application as part of other modules requirement. Axis2 comes with the below family of jars.

  • axis2-metadata-1.6.2.jar
  • axis2-saaj-1.6.2.jar
  • axis2-transport-http-1.6.2.jar
  • axis2-kernel-1.6.2.jar
  • axis2-jaxws-1.6.2.jar

If you look at the below two lookups, the first request namespace is proper and that's what we are expecting, and the second is what we are receiving the wrong target namespace. Kindly look at the tag code differences.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://service.api.service.com/2.0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:findByCode>
         <code>?</code>
      </ns:findByCode>
   </soapenv:Body></soapenv:Envelope>
   
   
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" "xmlns:ns"=http://service.api.service.com/2.0>
   <soapenv:Header/>
   <soapenv:Body>
      <ns:findByCode>
         <code>?</code>
      </ns:findByCode>
   </soapenv:Body></soapenv:Envelope>

Note: We are getting proper request information while using SOAP-UI. There is some problem with jars or liberty only. We have even raised a request to the Liberty team. I am placing the problem to get the ideas from this community if someone might have already faced a similar issue with Liberty server.

1

1 Answers

0
votes

As part of the analysis, we figure out the jar axis2-transport-http-1.6.2.jar is causing the issue by using the internal formatter. Once we remove this jar along with the below jars, we are receiving the request and response in the expected format as mentioned in the question.

  • axis2-metadata-1.6.2.jar
  • axis2-saaj-1.6.2.jar
  • axis2-kernel-1.6.2.jar

Note: We could not find the usage of the above 3 jars so removed.