1 Reply Latest reply on Oct 3, 2013 4:27 PM by n3k0

    Differences between Jboss EAP6 and Weblogic 11 XML implementation responses

    n3k0

      Hi.
      I have a problem with a Webservice deployed in JBoss EAP 6.
      I have a war file, that war contains a WS, but, that war originally was developed and tested in a Weblogic 11 AS; and everything works fine BUT
      my boss said that my war can deploys in other server (JBoss) that he has mounted in other computer.

       

      Everything is normal, but in the response, the date is different, i mean, in Weblogic, it appears like this:

       

      <birthday class="com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl"> 
            <year>1952</year> 
            <month>4</month> 
            <day>17</day> 
            <timezone>-360</timezone> 
            <hour>0</hour> 
            <minute>0</minute> 
            <second>0</second> 
            <fractionalSecond>0.000</fractionalSecond> 
      </birthday>
      
      

      So, in JBoss EAP 6, the date appears like this:

       

      <birthday class="org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl"> 
            <orig__year>1944</orig__year> 
            <orig__month>3</orig__month> 
            <orig__day>1</orig__day>
            <orig__hour>0</orig__hour> 
            <orig__minute>0</orig__minute> 
            <orig__second>0</orig__second> 
            <orig__fracSeconds>0.000</orig__fracSeconds> 
            <orig__timezone>-300</orig__timezone> 
            <year>1944</year> 
            <month>3</month> 
            <day>1</day> 
            <timezone>-300</timezone> 
            <hour>0</hour>
            <minute>0</minute> 
            <second>0</second> 
            <fractionalSecond>0.000</fractionalSecond> 
          </birthday>
      


      My question is, how can i switch the implementation of the de/serializer for this data type?
      It seems, Weblogic uses the JDK interal classes to make the job, but JBoss uses it's own implementation.

       

      I read about to add a xml file (jboss-deployment-structure.xml) to the war archive, i integrate one xml, like this:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
        <deployment>
          <exclusions>
            <module name="org.apache.xerces" />
          </exclusions>
          <dependencies>
              <module name="sun.jdk" >
              </module>
            <system>
              <paths>
                <path name="com/sun/org/apache/xerces/internal/jaxp/datatype"/>
              </paths>
            </system>
          </dependencies>
        </deployment>
      </jboss-deployment-structure>
      

       


      But the result is the same, any ideas?

        • 1. Re: Differences between Jboss EAP6 and Weblogic 11 XML implementation responses
          n3k0

          I resolve my issue in this form:

          I change the default xerces implementation, in this path:

           

          {JBOSS_HOME}\modules\system\layers\base\org\apache\xerces\main
          
          

           

          I add two files: jaxp-api-1.4.5.jar and jaxp-ri-1.4.5.

          And in the module.xml i made a change for the jar declared as a resource root, like this:

           

          <module xmlns="urn:jboss:module:1.1" name="org.apache.xerces">
              <resources>
                  <!--<resource-root path="xercesImpl-2.9.1-redhat-4.jar"/> -->
                  <resource-root path="jaxp-ri-1.4.5.jar"/>
              </resources>
              <dependencies>
                  <module name="javax.api"/>
              </dependencies>
          </module>
          

           

          Now, my xml comes with the desired XMLGregorianCalendar implementation. Cheers.