Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1587

JAXBSerializer does not marshal Date types in client

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jbossws-1.2.1
    • jbossws-1.2.0.SP1
    • jbossws-native
    • None

      JAXBSerializer breaks with the following stacktrace when Date parameter types are used.

      javax.xml.ws.WebServiceException: java.lang.ClassCastException: com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12
      at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSerializer.java:108)
      at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:94)
      at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectContent.java:147)
      at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:65)
      at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:129)
      at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentElement.java:536)
      at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:825)
      at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:810)
      at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:825)
      at org.jboss.ws.core.soap.SOAPBodyImpl.writeElementContent(SOAPBodyImpl.java:441)
      at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:810)
      at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:825)
      at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:810)
      at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPElementWriter.java:149)
      at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWriter.java:130)
      at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:288)
      at org.jboss.ws.core.soap.SOAPMessageMarshaller.write(SOAPMessageMarshaller.java:76)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:164)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
      at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
      at org.jboss.remoting.Client.invoke(Client.java:525)
      at org.jboss.remoting.Client.invoke(Client.java:488)
      at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:192)
      at org.jboss.ws.core.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:109)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:309)
      at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:185)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:163)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:149)
      at $Proxy15.forecast(Unknown Source)
      at com.sonicdrivein.forecast.service.SonicForecasterServiceClientTest.testClient(SonicForecasterServiceClientTest.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.privateRun(TestRunner.java:687)
      at org.testng.TestRunner.run(TestRunner.java:567)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:242)
      at org.testng.SuiteRunner.run(SuiteRunner.java:148)
      at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:86)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:123)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
      Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12
      at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getBaseClass(ClassInfoImpl.java:170)
      at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:59)
      at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:39)
      at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:142)
      at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)
      at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)
      at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
      at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:356)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:217)
      at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
      at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
      at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
      at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
      at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
      at org.jboss.ws.core.jaxws.JAXBContextCache.getInstance(JAXBContextCache.java:90)
      at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:78)
      ... 47 more

              mageshbk_jira Magesh Bojan (Inactive)
              mageshbk_jira Magesh Bojan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: