Link to home
Start Free TrialLog in
Avatar of colr__
colr__

asked on

Soap - 'soapenv:' versus 'soap:'

I've got a .NET web service that I have to connect to using Java. The .NET service specifies the following as an example SOAP call:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <EchoString xmlns="http://tempuri.org/">
      <echoText>string</echoText>
    </EchoString>
  </soap:Body>
</soap:Envelope>

We are using an API developed by one of our (long gone) developers for connecting to the web service, which makes the following SOAP call. This API definetaly works, as it is used in practice in numerous places, and I can in fact connect to the web service.

<?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>
             <call:EchoString xmlns:call="http://www.theurl.com/ws/services/templates/hw/">
                   <call:echoText>fubar</call:echoText>
             </call:EchoString>
       </soapenv:Body>
</soapenv:Envelope>

As you can see, they are both the same except for the use of 'soapenv' instead of 'soap'.

Now we have got this working with a helloworld example - the java connects to the helloworld web service and retrieves a text based response. The only problem is that when we try and input a String into another web service, called EchoText, it doesnt seem to get the string, and just returns its response w/o the text I supplied (its supposed to return some text appended to the text I supplied). So, the web service is connecting and getting a response, but the input String is not being recieved (although it is clearly visible in the SOAP request above).

I just wanted to eliminate the use of 'soapenv' instead of 'soap' as the problem (im not all that familiar with SOAP, so I didnt know if this'd make a difference?) as thats the only difference as far as I can see.
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial