This discussion is archived
2 Replies Latest reply: Sep 9, 2012 9:28 PM by Ajay Sharma RSS

How to change the xml element name of Webservice Request or response

Ajay Sharma Newbie
Currently Being Moderated
Hi..

I created Java Web service. When I am testing it on browser the tags names are as follow :

While Requesting:

------------------------

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://genericwebservice/">
<ns1:getKey/>
</soap:Body>
</soap:Envelope>

--------------------------

While Getting response:

---------------------

<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://genericwebservice/">
<env:Body>
<ns0:getKeyResponse>
<ns0:return>dGVzdGFwcC5vbndhcmRpbg==</ns0:return>
</ns0:getKeyResponse>
</env:Body>
</env:Envelope>

------------------------

I want to remove "ns1:" and "ns0:" from above tags.

I tried a lot but not able to do this.

Waiting for reply

Regards,
Ajay Sharma

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points