Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 08, 2012 02:20 AM by Steven Cheng - MSFT
May 07, 2012 09:42 AM|LINK
We are having a WCF service , which will communicate to another WCF service.
From our service we are pushing data to Client WCF service.
We are sending data in string format (like xml data , but in string format).
Doubts: Which is a better from the below:
Sending data in string format or List format.
Which gives better performance.
May 07, 2012 10:12 AM|LINK
using string format is much comfortable.
if u r using SQL server and using XML data type then string format will be comfortable.
May 07, 2012 11:17 AM|LINK
Thanks for replying!
How abt performance ?
May 08, 2012 02:20 AM|LINK
If the data you want to return in the service is of XML format, then both strong-typed list or simply xml text/string based format are ok. Using XML string will require less data object serialization effort at the service side and with .NET framework based
client, you can easily get the XML string parsed through LINQ to XML classes.
BTW, for transfering XML(or XHTML) markup data, I'd strongly recommend that you define the data parameter or return value as XElement or XmlElement type. Those types are better for transfer XML markup data since the WCF or webservice runtime will transfer
them as raw XML string format. If you directly use a String parameter, the webservice/WCF runtime will perform escaping on some of charaters in it.