Hi,

please see inline ....

Cheers
Werner

On 10.02.2010 21:15, Tom KASZEMACHER wrote:
Hi all,

I'm a newbie with castor. I have generated java classes from a xsd schema like 
this :
<xs:element name="complex-value">
    <xs:complexType>
     <xs:sequence>
                <xs:any minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
     </xs:complexType>
   </xs:element>

Naturally I obtain a class like this :
public class ComplexValue {
     private java.lang.Object _anyObject;
     /**
    getter et setter
    **/
}
What object instances are you actually settng to the _anyObject member ? Looks like you are setting a Map instance or similar ?

Marshalling I obtain:
<complex-value>
         <map-item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
             xmlns:java="http://java.sun.com"; 
xsi:type="java:org.exolab.castor.mapping.MapItem">
             <key xsi:type="java:java.lang.String">mavalue</key>
         </map-item>
     </complex-value>

But I need:
<complex-value>
         <A>
             <key xsi:type="java:java.lang.String">mavalue</key>
         </A>
     </complex-value>

I tried with XmlElement annotation but nothing happened.

Someone can help me ?

Thanks,
Tom

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

   http://xircles.codehaus.org/manage_email


Reply via email to