views:

567

answers:

1

I'm having a problem with setting up a WCF web service integration with a 3rd party. It appears that it's not correctly deserializing the response object, I'm just getting a null from the web service call.

The 3rd party is using this web service framework, which has a large set of abstract and complex types for performing simple operations. It appears that the .NET tools are not generating correct proxy code to call the service, as we've had to change a few 2-dimensional arrays to single-dimensional, and corrected other issues like that in the generated proxy code.

On top of that, the 3rd party has not stood up their service yet, so we're currently testing against a mock service based on the WSDL and XSDs using SOAPUI. Luckily our 3rd party sent us example SOAP messages that they expect to be sending, so we can at least send back real responses from the mock service. However, our WCF integration seems to be having problems with the messages/code gen.

I've tried enabling System.ServiceModel, System.ServiceModel.MessageLogging, and System.Runtime.Serialization tracing (all Verbose level) in the WCF diagnostic config, but I can't seem to see any problems. I've scoured the svclog files and don't see any hints.

My question is: is there any way to debug/trace WCF serialization/deserialization at an extremely low level, e.g. view it parsing the XML and trying to populate an object?

+3  A: 

If you were truly having deserialization issues, you'd likely see it in the trace output, but it's still possible (anything is possible).

What you might try is cutting WCF out of the equation and take one of the test messages they sent and try and deserialize it manually in a test project. Here's information on how to do that from a file: http://msdn.microsoft.com/en-us/library/bb675198.aspx

That's probably a little unorthodox, but it will help you eliminate serialization issues, or get to the root of them. You will at least see if the classes your proxy is working with need tweaking.

Now if you absolutely positively must get into this process, it's easy enough to replace the serializer with your own (which you can then place debug hooks in): http://www.pluralsight.com/community/blogs/aaron/archive/2006/04/21/22284.aspx

That's definitely not something to take on lightly.

Anderson Imes