Unable to parse XML of SOAP request to Dataset



Im busy writing a webservice that will accept a SOAP REQUEST of up to 5 tables worth of information.


This is what I have come up with as a valid SOAP REQUEST but I have removed 4 tables worth of XML for simplicity.



<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:EchoSoapRequest1>
<Route>
<Routecode>200906230000</RouteCode>
<Date>23/06/2009</Date>
<type>1</type>
<Depot_Code>'hh'</Depot_Code>
</Route>
</tem:EchoSoapRequest1>
</soapenv:Body>
</soapenv:Envelope>


Now, in my webservice, this is my attempt to read in the Route table to a dataset.Everything works up to this point and I can see the entire REQUEST in variable xmlSoapRequest.I need to strip out each table and save into their own dataset, so that I can manipulate and then just return a code back to the client program.



var xmlPayload = xmlSoapRequest.SelectSingleNode("//Route");
DataSet ds = new DataSet();
ds.ReadXml(xmlPayload.innerxml);

No comments:

Post a Comment