- Dennis
Thomas Will wrote:
I need to map this XML structure:
<A xmlns="uri://myname.com/xyz"> <B> <C>c1</C> </B> <B> <C>c2</C> </B> </A>
to this Java class:
public class A {
// Should contain the strings c1, c2, ...
private java.util.ArrayList bList;
public String toString() { return "A(bList=" + bList + ')'; } }
I tried binding 1: <binding> <mapping name="A" class="test.A"> <namespace uri="uri://myname.com/xyz" default="elements"/> <collection field="bList"> <structure name="B"> <value name="C"/> </structure> </collection> </mapping> </binding>
This leads to an ArrayList containing plain java.land.Objects without content (not Strings).
I tried binding 2: <binding> <mapping name="A" class="test.A"> <namespace uri="uri://myname.com/xyz" default="elements"/> <collection field="bList"> <structure name="B"> <value name="C" type="java.lang.String"/> </structure> </collection> </mapping> </binding>
The jibx binding compiler can handle it, but at runtime I get a java.lang.VerifyError: (class: test/JiBX_MungeAdapter, method: JiBX_Test9Binding_marshal_1_3 signature: (Ljava/lang/Object;Lorg/jibx/runtime/impl/MarshallingContext;)V) Incompatible argument to method
How should the binding file look like?
Tom.
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
