3

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!

2
  • Need more detail - what is the problem? Is the ASMX bit at all relevant, or just storytelling? Commented Feb 18, 2009 at 9:30
  • Probably not terribly relevant. Might edit it out. Basically it works for the ASMX - why not the WCF Proxy? Commented Feb 18, 2009 at 9:31

1 Answer 1

7

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?

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.