Hi all !
I have the following XML which is received from one system:

<ccsmp-create session="8u8989h789h9h8989">
  <DialPlan ent-id="name" name="333"/>
</ccsmp-create>

How can I Unmarshall the class DialPlan ?
I have tried with this XML which works fine when you Marshal from Java to
XML:

    <class name="com.sample.DialPlan">
    <map-to xml="ccsmp-create" />
          
   <field name="sessionId" type="java.lang.String">
        <bind-xml name="session" node="attribute"  />
    </field>         
    
    <field name="entId" type="java.lang.String">
        <bind-xml name="ent-id" node="attribute" location="DialPlan" />
    </field>
        <field name="name" type="java.lang.String">
        <bind-xml name="name" node="attribute" location="DialPlan" />
    </field>
  </class> 

Unfortunately the reverse process (unmarshalling XML to Java) doesn't work ! 
It just creates a DialPlan Object with null attributes.

 DialPlan plan = (DialPlan) 
         Unmarshaller.unmarshal(DialPlan.class, 
           new FileReader("data.xml"));

Please can anybody give me a hint ?
thanks
francesco
-- 
View this message in context: 
http://www.nabble.com/Unmarshalling-of-nested-XML-tp19914206p19914206.html
Sent from the Castor - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email


Reply via email to