Hi,

let's look somewhere else first. If you were to generate Java classes
from your XML schema (using Castor's code generator), the classes
generated would allow you to have returned AnyNode instances for any
content received as part of an XML content that has <xs:any> as its
content type.

This way - with the latest snapshot of Castor 1.2.1 - you could peek at
the element8s) received, and call the Unmarshaller again, passing in the
AnyNode instance you are holding.

Having said that, we are currently looking into making this a little bit
more automated. But for the time being, above 'solution' is about as far
as you can get.

Regards
Werner

Tida, Sridhar wrote:
> Hi,
> 
>  
> 
> I'm new to Castor and I'm trying to extract the objects from input xml
> message. My input xml message uses a schema file but the data section is
> defined as <any>, so the data can come in any format. Please see the
> attached xml file and let me know how I can write mapping file to
> extract the objects 
> 
>  
> 
> 1)       CitiECMContact
> 
> 2)       CitiECMBusinessActivityHistory
> 
> 3)       ECMBUSINESSACTHIST
> 
> 4)       ECMCONTACT
> 
>  
> 
> I have java objects for each above nodes. I came to know from Castor
> document, we cannot map to non-root node to a java object i.e. root node
> should be mapped to java object and other elements can be mapped to java
> objects but they should be an elements in the root java object.
> 
>  
> 
> Please find the CitiECMBusinessActivityHistory is repeated twice. I want
> to extract each object and call different methods. I can do it using
> general xml parsing but interested to do using Castor. I tried to create
> a java object which maps to root node <envelope> and adding each object
> as get/set methods. But I cannot say the input message is always in this
> format. Let me know if you need more details. Please provide a solution
> for my issue. 
> 
>  
> 
> Thanks & Regards,
> 
> Sridhar Tida
> 
> Citi NAIT Shared Technology Services
> 
> Ph: 513.979.9494
> 
> Email: [EMAIL PROTECTED]
> 
>  
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to