We have following xml 

        <ecs:FindBeneficiaryResponse>
                        <ecs:externalID>9999999999</ecs:externalID>
                        <ecs:personCodeNumber>00</ecs:personCodeNumber>
                        <ecs:lastname>XXXXX</ecs:lastname>
                        <ecs:firstname>YYYYY</ecs:firstname>
                        <ecs:middlename>X</ecs:middlename>
                        <ecs:carrierID>9999</ecs:carrierID>
                        <ecs:groupID>1111</ecs:groupID>
        </ecs:FindBeneficiaryResponse>

We are trying to bind externalID,personCodeNumber,carrierID and groupID
(i.e. 1st,2nd,6th and 7th) elements to one Java object which is contained
inside the main java object. Elements 3rd ,4th and 5th are part of container
class. We have found that we are only getting last two elements i.e. 6th and
7th populated in the contained Java object. We have tried using test-method
attribute in the structure for contained class but that did not make any
difference.

Is there any way we can avoid creating the new instance of contained class
if it has already been initialized and set in the container object?

This is the part of binding xml.

  <mapping name="FindBeneficiaryResponse"
class="com.caremark.psd.infrastructure.model.Beneficiary" ordered="false">
    <structure field="beneficiaryKey"
test-method="isBeneficiaryKeyInitialised" ordered="false" usage="optional">

      <value style="element" name="externalID" field="externalID"
usage="optional"/>
      <value style="element" name="personCodeNumber" field="personCode"
usage="optional"/>
      <value style="element" name="carrierID" field="carrierID"
usage="optional"/>
      <value style="element" name="groupID" field="groupID"
usage="optional"/>
    </structure>  

    <value style="element" name="lastname" get-method="getLastName"
set-method="setLastName" usage="optional"/>
    <value style="element" name="firstname" get-method="getFirstName"
set-method="setFirstName" usage="optional"/>
    <value style="element" name="middlename" get-method="getMiddleName"
set-method="setMiddleName" usage="optional"/>
</mapping>

 
Thanks,

Yogesh Arora



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to