Hi, I am new to JiBX and am running up against a wall here. In a nutshell, when I invoke my web service and marshal the objects to XML, I am just getting an empty, top-level element returned, and I can't figure out what is wrong with my mapping. I am expecting itemList elements in the response XML, but am not getting any. I have verified that the RetrieveItemsResponse object contains Item objects, so I know they are there. They are just not being mapped correctly.
If anyone sees anything that stands out that looks wrong, please let me know. I was getting a ClassCastException until I changed the collection element to use a structure element. I was using type and item-type attributes on collection before, but that's when I ran into the ClassCastExceptions. Here's the XML returned from my web service: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <retrieveItemsReturn xmlns="http://service.webservice.company.com"/> </env:Body> </env:Envelope> Here's a snippet of my mappings: <mapping class="com.company.RetrieveItemsResponse" name="retrieveItemsReturn"> <collection nillable="true" field="items"> <structure type="com.company.Item" usage="optional" /> </collection> <value name="endOfListIndicator" field="endOfListIndicator" nillable="true" /> </mapping> ... <mapping name="itemList" class="com.company.Item" abstract="true"> <value name="number" field="number" nillable="true" /> <value name="identifier" get-method="getOid" nillable="true" /> <value name="description" field="description" nillable="true" /> </mapping> Here's the class I'm trying to retrieve the Items from: public class RetrieveItemsResponse { private List<Item> items; private Boolean endOfListIndicator; public Boolean getEndOfListIndicator() { return this.endOfListIndicator; } public List<Farm> getItems() { return this.items; } public void setEndOfListIndicator(Boolean endOfListIndicator) { this.endOfListIndicator = endOfListIndicator; } public void setItems(List<Item> items) { this.items = items; } } Thanks, Keith ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users