Hi,

        I have the same(note this) Castor "SourceGenerated" model on
Server(running on Borland AS) and Client(on JB5). 

        Client sends a "request" to the server.

        Server  instantiates one of the beans as "response". 

        This bean contains an UNBOUNDED element. So in the object it
gets  "elementCount" which IS NOT in the schema.This is understandable.

        The server Marshals this object and sends it back to client( i
serialize the XML document by converting it to a String, using
StringWriter).

        This is where the PROBLEM occurs: As the client tries to
UnMarshal the document ( yielded by StringReader) and instantiate an
object,  an exception gets thrown which basically means that it doesnot
know  what element "elementCount" is????

        Is there a way to control this? Please note i am still not using
a Mapping file and would like to keep things simple as long as I can for
my purpose.

        Note 1 : This exception goes away if I include a simple hack by
setting the maxOccurs = 1 for the element. This is understandable.
        Note 2 : Earlier  I was getting "validation exception" for
Unmarshalling(client side)  which was resolved by setting
[org.exolab.castor.xml.introspector.primitive.nodetype=element ] The
reason was that earlier "elementCount" was set as an attribute of the
root element at the server. 

        Please suggest a reason/solution.
        Sireen

Sireen Malik
mailto:[EMAIL PROTECTED] 

Infosim Networking Solutions AG 
Friedrich-Bergius-Ring 15 - 97076 Wuerzburg - Germany
Fon: +49 (0)931 20 592-200   
Fax: +49 (0)931 20 592-209
http://www.infosim.net 

Come see us at the CeBIT in Hannover from March 13 - 20!
        You will find us in Hall 15 / D11 and in Hall 6 B38 / 238.

        We're looking forward to welcome you at our booth!!!

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

Reply via email to