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.
LVL 8
colr__Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
the prefix for the namespace is a random string and of no consequence.
It doesn't matter at all whether that is "soap" or "soapEnv" as long as they are pointing to the same namespace... which they do
(and as long as you don't have a poor webservice set up... it could be that your long gone developer has hardcoded the prefix in the code,
this is uncorrect but I have seen this happening a lot in the past)

I see a possible issue with the namespace of the load
EchoString is NOT in the same namespace in the two examples
one is in the default tempuri namespace, the other is in the theurl.com namespace
try changin the second example into
<call:EchoString xmlns:call="http://tempuri.org/">
instead of
<call:EchoString xmlns:call="http://www.theurl.com/ws/services/templates/hw/">
and it should work

cheers
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.