I'm trying to invoke a web service which I do not control. The web service expects XML for which I have the xsd. I want to send the raw xml to the web service, i.e. preventing the proxy from XML-encoding whatever I send. How can I do this?
A:
Why would the proxy encode anything?
Is this service described by a WSDL? If so, were you able to create a proxy class using "Add Service Reference" or svcutil.exe? Does the proxy class not have the correct signature for the operation you need to call?
If somehow the proxy class does not have the correct signature, then you cannot use it. You would have to use the WebClient class on your own. Create the XML according to the schema, then send it through WebClient.
John Saunders
2009-06-03 19:48:53
Yes, I could generate the reference using the wsdl, and no, it does not have the correct signature.
erikkallen
2009-06-03 20:28:34
You should look into why the signature is wrong. A correct WSDL is a very important part of a web service. If the WSDL is broken, chances are so is the service.
John Saunders
2009-06-03 21:31:46