We are using castor mappings to convert from xml to Objects , i am having
following problem which i do not know how to proceed.
I have an object model where a class named BusinessMsgIdentification holds
the reference of Account object.But in the XML which i am getting from other
source (web service) is as given below.The problem is that some of the
elements under the TAG BusinessMsgIdentification in XML actaully map to
fields in Account Object.

<BusinessMsgIdentification>
        <SID>009733</SPID>
        <SPProg>Abcd12345</SPProg>
        <MID>009656</IMID>
        <Style> </IMStyle>
        <AcctNum>0 </AcctNum>
        <OrigMsgID>21628755</OrigMsgID>
          <RecipMsgID>21618752</RecipMsgID>
          </BusinessMsgIdentification>
          
          
         
BusinessMsgIdentification.java has following method and fields   like,


   protected Account mAccount;
       protected String mOrigMsgID;
    protected String mReceipientMsgId;
         
             public String getOrigMsgID(){
                  return mOrigMsgID;    
              }
              public void setOrigMsgID(String origMsgID){
                  mOrigMsgID=origMsgID;
              }
              public String getReceipientMsgId(){
                  return mReceipientMsgId;    
              }
              public void setReceipientMsgId(String receipientMsgId){
                  mReceipientMsgId=receipientMsgId;
    }
    
    
        public Account getAccount(){
            return mAccount;    
        }
        public void setAccount(Account account){
            mAccount=account;
    }
    
    
    
    The problem for me is that the fields like SID,MID etc are defined in
Account class in  my object model, but in XML they falls within
BusinessMsgIdentification TAG.BusinessMsgIdentification holds a reference of
Account class.
    
    Please help me with this as it is very urgent.
    
    Regards,
    Pramod
-- 
View this message in context: 
http://old.nabble.com/Problem-Mapping-object-model-with-castor-tp27636855p27636855.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