1 Reply Latest reply on Nov 6, 2007 2:54 AM by ropalka

    Problem deploying WebServices

      JBoss Appserver version: 4.0.5

      When testing the the deployment of a test echo WS. I get the following on the client side:


      Cannot unmarshall SOAPMessage
      javax.xml.soap.SOAPException: Failed to create SOAPFactory: org.jboss.axis.soap.SOAPFactoryImpl
      at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:48)
      at org.jboss.ws.core.soap.SOAPFactoryImpl.createElement(SOAPFactoryImpl.java:113)
      at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:87)
      at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:76)
      at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:253)
      at org.jboss.ws.core.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:75)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:463)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:299)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:133)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
      at org.jboss.remoting.Client.invoke(Client.java:1544)
      at org.jboss.remoting.Client.invoke(Client.java:530)
      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 $Proxy8.echo(Unknown Source)
      at com.htg.tests.WebServicesTest.testEcho(WebServicesTest.java:42)
      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 junit.framework.TestCase.runTest(TestCase.java:164)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: java.lang.ClassNotFoundException: org.jboss.axis.soap.SOAPFactoryImpl

      I didn't realize that the org.jboss.axis.soap classes were still being used.

        • 1. Re: Problem deploying WebServices
          ropalka

          Hi,

          your eclipse workspace has Axis webservices jars in the classpath. If you want to enforce it to use JBoss native webservices, you must ensure that JBoss native webservices jars are before Axis jars in the classpath.
          Another approach to activate JBossWS native webservices is to set up the following properties in your eclipse workspace environment:

          -Djavax.xml.soap.MessageFactory=org.jboss.ws.core.soap.MessageFactoryImpl
          -Djavax.xml.soap.MetaFactory=org.jboss.ws.core.soap.SAAJMetaFactoryImpl
          -Djavax.xml.soap.SOAPFactory=org.jboss.ws.core.soap.SOAPFactoryImpl
          


          Richard