all groups > dotnet xml > april 2004 >
You're in the

dotnet xml

group:

XML Serializing unknown objects


XML Serializing unknown objects Chris Smith
4/19/2004 11:01:43 PM
dotnet xml:
I bet this question has been asked quite a bit, but if someone can point me
in the right direction, I would be very grateful.

I would like to write a assembly (dll) that one of the functions will act as
a task router. This router will take different objects of many types, and
pass that object to the correct webservice for handling. Seems that doing
this creates quite a bit of serialization issues, especially when the
webservice returns a modified object to the task router for forwarding to
the client.

Example:

Client App -> Task Router -> Web Service (Altered object)
Web Service -> Task Router -> Client App

How can I make the task router not care about class types. I really don't
want to code every possible class type into the router as new apps will also
use this. Is there a method for doing what I am trying, seems there should
be a way to avoid the constant updating and maintenance.

Thanks,

Chris

Re: XML Serializing unknown objects AA
4/20/2004 10:23:41 AM
My opinion..

Use reflection for dynamic load of classes and serialization/deserialization


AA


[quoted text, click to view]

Re: XML Serializing unknown objects Dino Chiesa [Microsoft]
4/22/2004 12:17:39 PM
My opinion:

Establish a baseline message type (defined in XSD) that includes an
extension of xsd:any. The router accepts the baseline and routes based on
what is typed in XSD. The senders and receivers can use any specialized
version of that baseline.

check out these references
http://www.xfront.com/ExtensibleContentModels.html
http://www.w3schools.com/schema/schema_complex_any.asp
and
http://msdn.microsoft.com/library/en-us/dnservice/html/service04162003.asp

-Dino


[quoted text, click to view]

AddThis Social Bookmark Button