views:

566

answers:

1

I have a WCF Client Proxy connected to a third party webservice. The proxy works fine with nearly everything except on function.

This function works just fine with a ASMX proxy.

I have added service trace logging and can see the response from the service coming back. Only the proxy returns null.

So now I know for sure that the proxy is at fault.

Where to from here?

RESOLUTION I found the issue. WCF is less forgiving than an ASMX proxy. The service WSDL specifies that the returned object was called "data", and the actual xml passed back was called "result"

So that was a great goose chase! I think i wasted 4 hours on this problem!

+3  A: 

You can try to use Trace Viewer to analyse WCF communications in more detail and find out more detail when errors are encountered.

Within the app.config (Client) and web.config (Server), you can add blocks. To enable tracing, simply add dignostics blocks and trace files will be generated in the specified location when the app is run. This should enable you to dig a little deeper with the problem.

Trace viewer can be found:

("C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcTraceViewer.exe")

Info on trace viewer usage:

http://msdn.microsoft.com/en-us/library/aa751795.aspx

Also, what type of method is it? does it return complex types or simple types?

ADDED: Ah, sorry about the mis-read, didn't realise you had no control of server side. I'd try to update the service reference/proxy (you've probably already done that) and check if anything has changed.

WCF doesn't make tracking down issues very easy i'm afraid. Is it possible to provide the method signatures for a call that works and one that doesn't so we can see what data types are being passed about?

Tanner
Thanks for the tip with the svc trace log. Makes it much easier to debug web services when you can see the raw XML
Harry