.NET Web Service response is null on client side

If you are trying to use a .NET client to invoke some Web Service, and you are getting an empty result (or return value) one of the possible explaination is that the format of the SOAP response on the wire does not match the format advertise in the WSDL.

Unlike most JAX-RPC stacks who will fault in such case, when deserialization fails (XML 2 JAVA), the .NET stack ignore the unexpected nodes, and continue processing with the default value for the types, based on the CLR dafault behaviour.

When you are in doubt, remember to capture the SOAP payload for manual introspection and try with another client stack.

-ecco

Comments

Anonymous said…
That was very helpful.
Anonymous said…
Can anyone explain me what is payload introspection...and how can we achieve it using service oriented architecture..
Eric said…
Introspection: http://en.wikipedia.org/wiki/Introspection
think about 'self-observation'.
This has little to do with SOA, it's more a basic tool for Web Services. You need to setup some HTTP proxy or TCP sniffer to see the SOAP messages going between the caller and the service and back. After some time, and some discovery process about XML, schema, and what works in your environment, you will be all set.
starting point include JDeveloper HTTP Analyzer, Ethereal for network sniffer and SOAP UI (see soapui.org) for iterative testing and neutral payload generation.

Popular posts from this blog

Changing the version of JDK used by JDeveloper

Connection reset from a WCF Web Service

unexpected null value for literal data