C
Christopher D. Wiederspan
I have a simple project in which I need to build a Soap message "by hand".
Essentially I'm using a System.Net.HttpWebRequest to post data to a
webservice. Everything is working well, but I'm currently using a
StringBuilder to build the Content (the Soap message) portion of the post.
I've got to believe that there is a better way to accomplish this. The
message that I need to build is something like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Execute xmlns="http://tempuri.org/">
<message>string</message>
</Execute>
</soap:Body>
</soap:Envelope>
Is my best bet to build an XmlDocument object that happens to contain the
Soap namespace, or is there some sort of object somewhere else in the
framework that makes building the Soap message easier?
Please let me know if you have any ideas.
Thanks,
Chris
Essentially I'm using a System.Net.HttpWebRequest to post data to a
webservice. Everything is working well, but I'm currently using a
StringBuilder to build the Content (the Soap message) portion of the post.
I've got to believe that there is a better way to accomplish this. The
message that I need to build is something like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Execute xmlns="http://tempuri.org/">
<message>string</message>
</Execute>
</soap:Body>
</soap:Envelope>
Is my best bet to build an XmlDocument object that happens to contain the
Soap namespace, or is there some sort of object somewhere else in the
framework that makes building the Soap message easier?
Please let me know if you have any ideas.
Thanks,
Chris