You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by djed-pfeiler <dj...@gmail.com> on 2012/09/03 15:39:33 UTC

xsd:date becomes a xsd:timestamp

Hi,

we have a XSD with a definition:


&lt;xsd:element name="geburtsdatum" type="xsd:date" maxOccurs="1"
minOccurs="0"&gt; 



Via cxf-codegen-plugin ver2.0.13 we get java code to transform a SOAP
Response and write it as SOAP to a database. As soon as, the client reads
out the response from db it gets an Exception:



08:25:49,714 WARN [de.jsonrpc.RPCRequestHandler] (ajp--172.26.168.8-5280-2)
Fehler im Dienst: : org.apache.xmlbeans.impl.values.XmlValueOutOfRan 
geException: Invalid date value: wrong type: *2013-06-23T00:00:00+02:00 *
        at
org.apache.xmlbeans.impl.values.XmlObjectBase$ValueOutOfRangeValidationContext.invalid(XmlObjectBase.java:314)
[xmlbeans-2.4.0.jar:] 
        at
org.apache.xmlbeans.impl.values.JavaGDateHolderEx.lex(JavaGDateHolderEx.java:81)
[xmlbeans-2.4.0.jar:] 
        at
org.apache.xmlbeans.impl.values.JavaGDateHolderEx.set_text(JavaGDateHolderEx.java:56)
[xmlbeans-2.4.0.jar:] 
        at
org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1166)
[xmlbeans-2.4.0.jar:] 
        at
org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1305)
[xmlbeans-2.4.0.jar:] 
        at
org.apache.xmlbeans.impl.values.JavaGDateHolderEx.getCalendarValue(JavaGDateHolderEx.java:192)
[xmlbeans-2.4.0.jar:] 



Strange is .. we have absolutely no problem with building and running on
Windows7 (AS7). Problem shows up as soon as we build and run on a unix
environment. 


Does somebody have a clue why CXF starts to behave this way on different
environments?


Thank you very much in advance!!

Djed




--
View this message in context: http://cxf.547215.n5.nabble.com/xsd-date-becomes-a-xsd-timestamp-tp5713485.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: xsd:date becomes xsd:dateTime

Posted by Daniel Kulp <dk...@apache.org>.
We ran into this at one point with CXF as well in the ws-rm module.

I think the only way we got around it was to fully specify the package name for the entire schema *AND* specify the parse methods we need for the specific adapters:

Example:
http://svn.apache.org/repos/asf/cxf/trunk/rt/ws/rm/src/main/resources/schemas/wsdl/wsrm-1.1.xjb

That said, that was a long time ago.  Not sure if ALL of that is still needed.

Dan



On Sep 4, 2012, at 7:28 AM, djed-pfeiler <dj...@gmail.com> wrote:

> Ok .. we have the problem.
> We generate different WSDLs and therefore have mutliple Adapter-Classes in
> THE SAME PACKAGES in the JAR files!
> Due to classloading we get the Adapter1.class from wsi-XX1-cxf-services-1.0
> or from wsi-XX2-cxf-services-1.0. 
> JAXB-custombindings are different in Projekt XX1 and XX2.
> 
> *How* can we tell CXF to generate the adapter classes to different packages
> .. not always to org.w3._2001.xmlschema ?
> 
> THX!
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/xsd-date-becomes-xsd-dateTime-tp5713485p5713533.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: xsd:date becomes xsd:dateTime

Posted by djed-pfeiler <dj...@gmail.com>.
Ok .. we have the problem.
We generate different WSDLs and therefore have mutliple Adapter-Classes in
THE SAME PACKAGES in the JAR files!
Due to classloading we get the Adapter1.class from wsi-XX1-cxf-services-1.0
or from wsi-XX2-cxf-services-1.0. 
JAXB-custombindings are different in Projekt XX1 and XX2.

*How* can we tell CXF to generate the adapter classes to different packages
.. not always to org.w3._2001.xmlschema ?

THX!



--
View this message in context: http://cxf.547215.n5.nabble.com/xsd-date-becomes-xsd-dateTime-tp5713485p5713533.html
Sent from the cxf-user mailing list archive at Nabble.com.