Title: Axis webservice as a client to external webservice

Hi,
I have created a Axis webservice implementing a WSDL. This is working fine. There is an external webservice running on some other machine. Axis webservice is required to access this external webservice. For this i created a Axis client to access a webservice. When run separately, this works fine and i am able to call the external webservice. The SOAP request message that is sent to the external webservice is following:

 <?xml version="1.0" encoding="UTF-8"?>
<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>
  <StartMonitoring>
   <securityToken>
        <seq>0</seq>
        <token xsi:nil="true"/>
   </securityToken>
  </StartMonitoring>
 </soapenv:Body>
</soapenv:Envelope>


But when i use this client inside my axis webservice and call some method of my webservice, it changes the SOAP message:

<?xml version="1.0" encoding="UTF-8"?>
<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>
        <StartMonitoring>
                <securityToken>
                        <seq  xmlns="">0</seq>
                        <token xsi:nil="true"  xmlns=""/>
                </securityToken>
        </StartMonitoring>
 </soapenv:Body>
</soapenv:Envelope>

Please notice the  xmlns="" in the above message.

The sequence of call is like this:
First Case:             [Axis Webservice Client] --> [External Webservice]
Second Case:    [Axis Webservice Client] --> [Axis Webservice] --> [External Webservice]

Why the SOAP message is different in the two cases? Is it related to namespace of the calling webservice?

Thanx for any help.
Davinder

Reply via email to