views:

143

answers:

1

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
Yes, I could generate the reference using the wsdl, and no, it does not have the correct signature.
erikkallen
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