Hi,

I have a Java POJO with a String[] getAllergies() and
setAllergies(String[] allergies) method.  I need to produce XML that
looks like this:

<?xml version="1.0"?>
<RxRefill>
<MemberInquiryResponse>
...
<allergies>
<allergy>Allergy1</allergy>
<allergy>Allergy2</allergy>
</allergies>
...
</MemberInquiryResponse>
</RxRefill>

My current mapping file looks like this:

               <field name="allergies" collection="array" type="strings"
                       container="false">
                       <bind-xml name="allergies" node="element">
                       </bind-xml>
               </field>

And produces XML like this:

<?xml version="1.0"?>
<RxRefill>
<MemberInquiryResponse>
...
<allergies>
<string>Allergy1</string>
<string>Allergy2</string>
</allergies>
...
</MemberInquiryResponse>
</RxRefill>

How to I configure a String[] mapping to specify the element name that
will be used for each item so I can map to "<allergy>" instead of
"<string>"?

Thanks!

Ryan

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

    http://xircles.codehaus.org/manage_email


Reply via email to