views:

41

answers:

1

I have a web service written in Java now I want to consume that web service in the .NET world. I use the WSDL to add a proxy class to my .NET application but when I invoke the Java web service method the response is always null. Anyone familiar with this issue?

UPDATE 1:

Another thing I noted is that I opened one of the svcinfo files and found the following code:

<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://fff.mywebserive/somewebservie&amp;quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;DOC_TOI_Binding&quot; contract=&quot;ServiceReference1.DOC_TOI_PortType&quot; name=&quot;DOC_TOI_Port&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data 

This does not look right to me!

UPDATE 2: Solution (Kind of)

The problem was that the response had a different namespace than used by the client proxy class. This way the object was never deserialized correctly. Once, I changed the namespace to match the response namespace it worked fine. But now if I update the web service reference I will again get the same issue as the namespace will be updated. What is a good way to solve this problem? The only solution I can think of is to ask the creator of the webservice to use the correct namespace.

+3  A: 

It suggests to me that either your WSDL or your client is incorrect. The client should not be able to tell from the WSDL what language it's implemented in. Check your namespaces.

SOAP UI is a very nice tool for testing SOAP services. I'd recommend it for sorting out this issue.

Looks to me like something tried to escape that snippet. You don't want &gt; you want >

You need to make sure that the service and the client are using the same namespace. Communication is paramount here.

duffymo
Thanks a lot! I am checking in Fiddler and it shows that the response is sent back correctly but for some reason .NET is not able to handle the response and returns null all the time.
johndoe
Please read my updated response! I found some weird code in one of my svcinfo xml files in .NET project.
johndoe