Hello,
My Software will be receiving many different(but similar) marshalled
castor messages over a socket. I have complete control of the xml
formats(schema) and can change them as necessary. It was easy to marshal
the message objects into the xml, but how do I unmarshal them????
There's a separate object per message type, so I need a way to figure
out which object.unmarshal to call on the receiving end. Is there a 'best
practice' to determine which object.unmarshal to call?
I came up with two methods, but they waste lots of time:
1) Attempt to validate each against the list of possible messages
formats prior to the unmarshal
2) Look into each xml message package and try to determine which
format. (kinda pre-parse)
I'm hoping that there's a simple inheritance mechanism, every xml
message inherites from a base which stores the full message type. I could
possible unmarshal on the base, determine the type, and then unmarshal the
full message.
Any ideas???
-bill
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev