On 20/04/15 13:26, Ashwini Kondapalli wrote:
We had done upgrade from jboss 5.1.0 to Wildfly8.2.0,
JBoss AS 5.1.0 was not using an Apache CXF based stack by default; did
you install JBossWS-CXF (the JBossWS integration with Apache CXF)
3.1.2.GA on it?
This is important to understand if we're somehow talking about a
different behavior in 2 different CXF versions or not (in which case
this mailing list is not likely the best place to talk about the topic
and we'd better move to the JBoss forums).
but here in wildfly we
see that Wildfly 8 is not using JAXB Reference Implementation.
https://github.com/jboss/jaxb/commits/2.2.5.jboss-2 this is list of
differences between the JBoss version of JAXB 2.2.5 in WildFly 8.2.0 and
the vanilla JAXB 2.2.5.
Trials done by me:
*Approach1*:
Added package-info.java file and also the DateAdapter.java to the project:
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(value=XXX.util.DateAdapter.class,
type=java.util.Date.class) })
package TOPLEVEL-PACKAGE;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
*Approach2:*
Tried adding new file jaxb-binding.xml with the below content to my project
resources folder:
<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
<jxb:globalBindings>
<jxb:javaType name="java.util.Date" xmlType="xs:date"
parseMethod="com.thomsonreuters.ls.api.util.DateAdapter.unmarshall"
printMethod="com.thomsonreuters.ls.api.util.DateAdapter.marshall"/>
</jxb:globalBindings>
</jxb:bindings>
Both these approaches did not help me.
And what is happening? Is the DateAdapter ignored? Can you share the
code of the adapter somewhere?
Alessio
--
Alessio Soldano
Web Service Lead, JBoss