Skip to main content

Axis2 to Metro conversion adds new elements

3 replies [Last post]
Joined: 2009-02-03
Points: 0

We recently converted/migrated an existing Axis2 webservice over to Metro and it all deploys successfully. We've encountered an issue during testing because the soap request/response structure is slightly different.

The original request when deployed in Axis2:

<soapenv:Envelope xmlns:soapenv="" xmlns:get="GetBookInfoByISBN">

The request in Metro is now:

<soapenv:Envelope xmlns:soapenv="" xmlns:ser="" xmlns:inv="">

Notice there there are two additional elements in the structure that are throwing off the request accepted and causing exceptions when the request _does not_ have:

Here is the WSDL for this web service:


<xsd:schema elementFormDefault="qualified" xmlns="">
<import namespace="GetBookInfoByISBN" schemaLocation="meta.xsd"/>

The Dynix Book Information Webservice
Authored by Byers Parsons

Aug 10, 2003 - version 1.1

Refactored for BWI compatibility: changed name, case, and order of message parts.

Feb 17, 2003 - version 1.0 - Initial release

This web service gets data (see meta.xsd) about a book by ISBN.

<wsdl:message name="GetBookInfoByISBNRequest">
<wsdl:part name="Parameters" element="meta:GetBookInfoByISBN"/>
<wsdl:message name="GetBookInfoByISBNResponse">
<wsdl:part name="Body" element="meta:GetBookInfoByISBNResponse"/>

<wsdl:portType name="BookInfoPortType">
<wsdl:operation name="GetBookInfoByISBN">
<wsdl:input name="GetBookInfoByISBNRequest" message="impl:GetBookInfoByISBNRequest"/>
<wsdl:output name="GetBookInfoByISBNResponse" message="impl:GetBookInfoByISBNResponse"/>

<wsdl:binding name="BookInfoPortSoapBinding" type="impl:BookInfoPortType">
<wsdlsoap:binding style="document" transport=""/>
<wsdl:operation name="GetBookInfoByISBN">
<wsdlsoap:operation soapAction="GetBookInfoByISBN/GetBookInfoByISBN" style="document"/>
<wsdlsoap:body use="literal"/>
<wsdlsoap:body use="literal"/>

<wsdl:service name="BookInfoService">
<wsdl:port name="BookInfoPort" binding="impl:BookInfoPortSoapBinding">
<wsdlsoap:address location="http://@HOSTNAME@/services/BookInfoService"/>

Does anyone know how I can get the structure back to the way it was in Axis2, without the <arg0> and <GetBookInfoByISBN> elements?

Thanks for any help!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-02-03
Points: 0

I've tried annotating the web service method with

public SearchByISBNResponse searchByISBN(@WebParam(name="") SearchByISBN searchParam)

This seems to help with the soap request in removing the arg0 but the web service throws a NullPointerException when this method is called because the searchParam is null and never bound to.

Does anyone have any ideas as to how I can resolve this issue?

Joined: 2005-01-14
Points: 0

I responded via Nabble, which doesn't propagate to this forum still apparently:


Joined: 2009-02-03
Points: 0

Thanks for the response Glen, I appreciate it!

It's interesting you mentioned that soapAction b/c after posting to this forum I tried exactly what you asked and it made no different. The additional <GetBookInfoByISBN> element is still inserted into the soap request structure. For example:

I changed this

<wsdlsoap:operation soapAction="GetBookInfoByISBN/GetBookInfoByISBN" style="document"/>

To this:

<wsdlsoap:operation soapAction="GetBookInfoByISBN" style="document"/>

Do you know if I can fix these issues I've discussed with annotations? I was able to get rid of the <arg0> element in the soap request but that then disrupts the service method parameter from binding. So my service method then throws a NullPointerException b/c the parameter it's expected to use is null.

Thanks so much for your help.