1 Reply Latest reply on Jul 24, 2009 6:17 AM by Andrew Vovk

    Problem with getting port

    Andrew Vovk Newbie

      Hi,

      I'm using JBoss 4.0.4 + jbossws-native-2.0.3.GA.
      I have created a simple ws:

      @WebService
      (
       name = "TestJSE",
       serviceName = "TestJSEService",
       portName = "TestJSEPort",
       targetNamespace = "http://com.tbs.webservice/test"
      )
      @SOAPBinding(style = SOAPBinding.Style.RPC)
      public class TestJSE
      {
       @WebMethod
       public String testGetMessageContext()
       {
       return "TEST!";
       }
      }
      


      Than I've packed it into war i successfully deployed.
      The wsdl accessed via browser.

      My web.xml config is here:
       <servlet>
       <servlet-name>TestJSE</servlet-name>
       <servlet-class>com.tbs.webservice.TestJSE</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>TestJSE</servlet-name>
       <url-pattern>/*</url-pattern>
       </servlet-mapping>
      


      But when I try to make a client test, I get error:
      java.lang.NoClassDefFoundError: javassist/ClassPath
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.initWrapperGenerator(JAXWSMetaDataBuilder.java:919)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.resetMetaDataBuilder(JAXWSMetaDataBuilder.java:926)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:280)
       at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:264)
       at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:195)
       at javax.xml.ws.Service.getPort(Service.java:115)
       at com.tbs.webservice.Tests.testApplClientAccessJSE(Tests.java:21)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
      


      My test is:
       URL wsdlLocation = new URL("http://127.0.0.1:8080/test?wsdl");
       QName serviceName = new QName("http://com.tbs.webservice/test", "TestJSEService");
       Service service = Service.create(wsdlLocation, serviceName);
       service.getPort(new QName("http://com.tbs.webservice/test", "TestJSEPort"), TestJSEI.class);
       assertEquals("The 'mafia' boss is currently out of office, please call again.", true);
      


      Can somebody help me with this?
      Thanks!