EDN Admin
Well-known member
Hello all,
I am using XmlDocument to read an XML documents contents and then pass those contents along in the SOAP message body of a web service request. However, in the data that is actually getting passed along in the call (that was read from the XML document) the
< and > symbols are being replaced with > and < which is causing issues on the receiving end.
What am I missing?
Here is a snippet of my code:
<pre class="prettyprint" style=" string filePath = FileList.SelectedItem.Value;
string doc = File.ReadAllText(filePath);
XmlDocument xDoc = new XmlDocument { PreserveWhitespace = true };
xDoc.LoadXml(doc);
MyService.TransactionRequest request = new MyService.TransactionRequest { message = xDoc.OuterXml };
MyService.TransactionClient client = new MyService.TransactionClient();
client.ProcessTransaction(request);[/code]
<br/>
Thanks for any and all help.
<br/>
<br/>
View the full article
I am using XmlDocument to read an XML documents contents and then pass those contents along in the SOAP message body of a web service request. However, in the data that is actually getting passed along in the call (that was read from the XML document) the
< and > symbols are being replaced with > and < which is causing issues on the receiving end.
What am I missing?
Here is a snippet of my code:
<pre class="prettyprint" style=" string filePath = FileList.SelectedItem.Value;
string doc = File.ReadAllText(filePath);
XmlDocument xDoc = new XmlDocument { PreserveWhitespace = true };
xDoc.LoadXml(doc);
MyService.TransactionRequest request = new MyService.TransactionRequest { message = xDoc.OuterXml };
MyService.TransactionClient client = new MyService.TransactionClient();
client.ProcessTransaction(request);[/code]
<br/>
Thanks for any and all help.
<br/>
<br/>
View the full article