Hi,

        I'm new to Axis 2 (0.93) and am trying to convert my Axis 1 services to
it. I'm having a problem with the databindings generated and was
wondering if anyone ran into this and, much more importantly, if anyone
had a solution... My messages use the following types:

<complexType name="Item">
        <sequence>
                <element name="id" nillable="true" type="xsd:anyType"/>
                <element name="latest" nillable="true" type="tns1:Version"/>
                <element name="modificationStamp" type="xsd:long"/>
                <element name="versions" nillable="true" 
type="apachesoap:Vector"/>
        </sequence>
</complexType>
<complexType name="BatchTest">
        <complexContent>
                <extension base="tns1:Item">
                        <sequence>
                                <element name="info" nillable="true" 
type="tns1:BatchTestInfo"/>
                        </sequence>
                </extension>
        </complexContent>
</complexType>

While the generated (WSDL2Java using xmlbeans) java code seems fine,
when I actually try to use it, the server throws a 
XmlValueOutOfRangeException because it gets into XmlObjectBase code
instead of XmlLong when trying to set the modificationTimeStamp field 
with a long (yes, System.currentTimeMillis()). StackTrace:

...
Caused by: org.apache.xmlbeans.impl.values.XmlValueNotSupportedException
      at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set_BigDecimal(XmlObjectBase.java:1989)
      at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set(XmlObjectBase.java:1608)
      at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set_BigInteger(XmlObjectBase.java:1987)
      at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set_long(XmlObjectBase.java:1969)
      at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set(XmlObjectBase.java:1596)
      at 
org.apache.xmlbeans.impl.values.XmlObjectBase.setLongValue(XmlObjectBase.java:1537)
      at 
com.convera.taw.qa.ws.databinding.com.convera.taw.qa.ws.data.impl.ItemImpl.setModificationStamp(ItemImpl.java:244)
... 28 more

Am I doing anything wrong here?

Thanks,
Steve

Reply via email to