Hi,
We are trying to map a XML document to our Java Objects and have run
across a situation whereby we have a complex type declared in two
locations both of which map back to a collection.
Namely our XML looks like so.
<?xml version="1.0" encoding="UTF-8"?>
<master>
<transportation>
<shipment>
<trackingNumber>111122223333</trackingNumber>
.....
<customer>
<roleTypeCode>S</roleTypeCode>
<accountNumber>123456789</accountNumber>
<companyName>Shipper Company Name</companyName>
<cityName>Shipper City</cityName>
<stateCode>Shipper State</stateCode>
<postalCode>Ship-Post</postalCode>
</customer>
<original>
<customer>
<roleTypeCode>OR</roleTypeCode>
<companyName>Original Name</companyName>
<cityName>Original Recipient City</cityName>
<stateCode>Original Recipient State</stateCode>
<postalCode>Original Rec-Post</postalCode>
</customer>
</original>
</shipment>
</transportation>
</master>
The customer type is repeated in two places, with both customers
residing under shipment in our Java Object
Class Customer {
String roleTypeCode;
String accountNumber;
String companyName;
String cityName;
String stateCode;
String postalCode;
... // get and set methods
}
Class Shipment {
java.util.Set <Customer> customers;
String trackingNumber;
..... // get and set methods
}
Is it possible to populate the customers set with a customer from both
/master/trasnsportation/shipment/customer
and
/master/trasnsportation/shipment/original/customer
under castor?
Thanks,
Kind Regards,
Adi.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email