Hi Reid,

What about defining a super class in your object model that the
different responses will inherit from?
You can also add a dummy root to the XML received using XSLT.

Arnaud

-----Original Message-----
From: Reid Thompson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 14, 2002 3:00 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] How do i handle a choice response when sender has
not defined an element to contain the choices

Some guidance if possible, 
how do i handle the following situation.� I transmit a request to
RECIPIENT who returns either a RESPONSE or an ERROR.� But RECIPIENTS
schmema does not define an element that contains a choice with RESPONSE
and ERROR.
so I send (via socket connection) 
������� <myxmlmessage>blah blah blab</myxmlmessage> 
and RECIPIENT will send back either 
������� <response>response blah blah</response> 
or 
������� <error>error blah blah</error> 
RECIPIENTS schema defines both error and response elements, but does not
define an element that contains them.� How do I unmarshall the incoming
stream into the correct class?
Prior to this, all the schemas that I have used with Castor have had a
"root" element that any incoming stream could be unmarshalled into.
thanks, 
reid 

Reid Thompson����� (919)872-1275 ext.4960 
ateb, Inc.�������� www.ateb.com 
� 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to