I need to pass an XML document to the web service. Is it possible to simply specify a contract with a method, say
void Method(XmlDocument myDocument);
and implement it in a standard way? I need to keep in my the Silverlight functionality, thus I want to avoid writing the XML to a stream… Is it a good approach?
Thank you in advance for the hints and replies!
Cheers
I’ve personally done this (forced too…). WCF has string buffer and string deserialization limits in the WCF binding which you need to override if you are sending anything of size through the interface.
But that said, if your requirement is to simply send XML then create a class, decorate it with the WCF XML attributes and then declare your interface to send them.
If you are interoperating with an existing service, you should be able to use the WCF service tools in the windows SDK to create a WCF binding against the service for you.