Search code examples
web-servicessoapnamespacesapache-axisprefix

Axis2 Web Services namaspace prefix conversion


I implemented a web service using Axis2(1.4) engine with eclipse plug-in. Client needs the response on the format:

<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3..org/2001/12/soap-encoding" >
   <soap:Body>
      <GetResponse>
         <SearchResult>0</SearchResult>
      </GetResponse>
   </soap:Body>
</soap:Envelope>

But my service is returning the following response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <GetResponse>
         <SearchResult>0</SearchResult>
      </GetResponse>
   </soapenv:Body>
</soapenv:Envelope>

Do I have to use an older vesion of Axis ? Or , is there a way to change the prefix and accept old SOAP requests ??

Thanks. Regards.


Solution

  • The version older to Axis2 - Axis1.x, is completely different. What Apache did with Axis2, is that they changed the complete architecture. They included the fresh concept of handlers, services and modules in Axis2.

    So, its not possible to accept older (Axis1.4) and newer (Axis2) requests using the same client code anymore.