Interesting issue.. I always thought XMLBeans could handle this properly (For startes, ADB would spit out an error message because of complex content element)
It could be an issue in the XmlBeans code (please check whether the generated Message receiver does the right thing, if it does then it's definitley an issue with the XMLbeans side). It would be better if you ask this in the XMLBeans list as well
On 1/3/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
Forwarding with correct prefix.
-------- Original Message --------
Subject: Databinding Date: Tue, 03 Jan 2006 12:01:27 -0500 From: Steve Molloy <[EMAIL PROTECTED]> Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org
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
--
Ajith Ranabahu