Need to have self-closing elements in SOAP request to web service

320 Views Asked by At

I'm working on a C# client that consumes a third-party web service. I have the wsdl and xsd from them, and almost everything works fine. The only problem I'm running into is that the service expects self-closing elements within an array argument, but the SoapHttpClientProtocol (which VS used as the inherited class when creating the web reference class from the wsdl) is sending empty elements instead. I've tested this using soapUI and verified that the service will accept self-closing elements within the array or a self-closing element with the name of the array (and thus no child elements), but throws an error when it receives empty elements.

How can I set the SOAP factory to use self-closing elements when no data are present? I've searched the web and it seems this question hasn't been asked before.

0

There are 0 best solutions below