Return an already serialized type to WCF

I would like to use WCF to configure the cross-platform WebService. The problem - in fact, the bigger performance problem is that I would like to return Type (let say Event), and this event already exists in XML. Therefore, I would like to avoid deserialization for the event, and then WCF will convert it to XML. Any idea how to handle this? What I want to achieve is something like "WCF", this method returns an Event object, but I already executed it in XML, so grab it and don't make me deserialize it first so you can serialize it again. "

Daniel

+5
source share
3 answers

WCF, message (de), MessageFormatter.

, IDispatchMessageFormatter. SeralizeReply() ( Message) Message.CreateMessage(), XmlReader XmlReader, XML. . , . , .

+1

, Message DataContract: SOAP. , (. ).

+1

, . Event , , , , , , - , - , .

XmlElement , - , Event ( , mex/wsdl, X).

Ultimately, part of the reason he does this is because WCF is an object-oriented model, and the serializer can really be replaced with many tricks - therefore, from the point of view of the normal WCF model, the fact that you have xml does not have meanings: in fact, it may not be like what is being wired. He needs an object, so he may ask the actual serializer to complete the task.

0
source

All Articles