2 Replies Latest reply on Mar 8, 2007 1:18 AM by monowai

    Soap client side MessageFactory NoSuchMethod exception

    monowai

      I'm using Jboss 4.05 with WS 1.20ga

      I have a service that appears to be deploying successfully and I can see it quite clearly from my http://localhost:8080/jbossws url. After using wsconsume to produce the client side objects (from the WSDL created by wsprovide), I get the following when I try to run my unit test:

      javax.xml.ws.WebServiceException: java.lang.NoSuchMethodError: javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
       at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:296)
       at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:153)
       at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:85)
       at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:176)
       at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:105)
       at $Proxy15.getAssetChanges(Unknown Source)
       at myco.tests.TestAssetWS.testWS(TestAssetWS.java:38)


      My first thoughts ran to SAAJ version compatibility beging as that appears to be where this stuff is going on. I've tried placing the jwsdp-2.0 version ahead of jboss-saaj.jar and the other way round but the same error.

      FWIW, my invocation code looks like this:
       AssetService service = new AssetService(new URL("http://chma_mikehpc:8080/ws?wsdl"), new QName("http://myco.com/integration/asset/theasset", "TheAssetData"));
       Asset port = service.getPort(Asset.class);
       TheAssetData result = port.getAssetChanges(99);
       assertNotNull (result);
      


      The exception is being thrown during port.getAssetChanges()

      I'm sure this is going to be a simple classpath issue, but, where to next! Pointers anyone?

      tia
      m