I have two Java classes.. namely
1) Mesasge 
2) MessageDetail

Structure

public class Message {
 private List<MessageDetails> messageDetails;
 ........ //Setters & getters
}

public class MessageDetails{
 private String key;
 private String value;
 private List<MessageDetails> children;
 ........ //Setters & getters
}


The requirement is when i recieve an xml like below i need to create object
as above.
Please help me to create mapping file.. am new to castor

<?xml version="1.0"?>
<loy:createproducts >
        <loy:productDef>
                <loy:product name = "Shiptest" >
                        <loy:articlenumber name = "PRD2003" />
                        <loy:redemptiontype description = "B" />
                        <loy:category code = "CAT2" />
                        <loy:price
                                retailprice = "55555"
                                specialprice = ""
                                releasedate = "22/Mar/2006"
                        />
                        <loy:productdescription value = "prd des" />


                        <loy:auctionattributes
                                minimummerchantprice = "1"
                                standardbrokermargin = "1"
                                minimumbrokermargin = "1"
                                releasedate = "22/Mar/2006"
                                closingdate = "22/Mar/2006"
                                auctionduration = "1"
                                maxquantityperauction = "1"
                        />
                </loy:product>
        </loy:productDef>

</loy:createproducts>



-- 
View this message in context: 
http://www.nabble.com/castor-mapping---Help-required-tp17267388p17267388.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