tags:

views:

43

answers:

1

Hi,everyone. I am trying to create an operation contract in WCF which is like the folllowing:

  [OperationContract]
  [WebGet]
  XmlElement GetXML(string id);

I have same method in one of the ASMX service

  [WebMethod]
  XmlElement GetXML(string id);

The issue here is that if I call the method on WCF and method on ASMX using http get, they are giving me different xml in the result because the WCF replace carriage return with 

:

Result: WCF return :

<root><value>First paragraph &#xD;
             Second paragraph</value></root>

ASMX return:

<root><value>First paragraph
             Second paragraph</value></root>

I tried to mark the operation contract with [XmlSerializerFormat], which forces the WCF using XMLSerializer that is same as ASMX uses. But still have the same problem.

Anyone comes accross this problem?

Thanks

Jacky

A: 

See if this link helps you: "WebService deserialization"

lucene user