I'm having a bit of a problem understanding the issue. Can you provide an example of the object you are trying to marshal, the mapping file, the expected result and the actual result. I know you've provided pieces of this with an introductory explanation, but I am not following the problem with the pieces that you have provided.
Thanks, --Keith llefever wrote:
There are two problems with the following result of marshalling. In that result, "more-visit-data" must have been derived from the collection-variable named "moreVisitData" in class Visit; it appears as many times as should instances of the element it contains in Java -- of type AddVisitData; meanwhile, the elements of the contained type are not in an element called AddVisitData; I found something elsewhere about setting "container='false'" on the field-element in the config; I tried that; it seemed to work, except that there was still a doubling of the output, with the second instance of the whole message containing "xsi:type" and NOT showing the beneficial effect of "container='false'". The Visit class has these methods on it: public void setMoreVisitData(Set moreVisitData) { this.moreVisitData = moreVisitData; } public Set getMoreVisitData() { return moreVisitData; } I've so far killed an entire day tried to solve this problem. Any feedback would be much appreciated. ======================================================= <?xml version="1.0" encoding="UTF-8"?> <Visit> <more-visit-data id="0"> <enhanced-session-id>127.0.0.11174943003584</enhanced-session-id> <name>foo</name> <value>bar</value> </more-visit-data> <more-visit-data id="0"> <enhanced-session-id>127.0.0.11174943003597</enhanced-session-id> <name>foo2</name> <value>bar2</value> </more-visit-data> ... <more-visit-data id="0" xsi:type="java:com.foo.beans.AddVisitData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <enhanced-session-id>127.0.0.11174943003584</enhanced-session-id> <name>foo</name> <value>bar</value> </more-visit-data> ... </Visit> ======================================================= Here's the config for that: <class name="com.foo.beans.Visit" auto-complete="true"> <map-to xml="Visit"/><field name="MoreVisitData" type="com.classesusa.beans.AddVisitData" collection="set"/></class>
--------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

