Jon Archway
Jon Archway

Reputation: 4892

WCF Service to receive XML message

I want to create a WCF service that accepts an XML message that interoperates with a non MS consumer. Now, I could expose a method that accepts a string and then handle the XML from that point onwards. Is there a better approach than using a string parameter?

Thanks

Upvotes: 0

Views: 833

Answers (2)

Jacob
Jacob

Reputation: 587

You can use an XmlElement or an XElement parameter.

Use XmlElement if you want to use the System.Xml namespace to process the XML. Use XElement if you want to use LINQ to XML and the System.Xml.Linq namespace.

--Jacob

Upvotes: 1

Justin
Justin

Reputation: 86789

You could use an XmlNode parameter.

Upvotes: 0

Related Questions