6 Replies Latest reply on Jun 6, 2008 11:23 AM by Alessio Soldano

    New to WS... Need help...

    Andrey Filippov Newbie

      Hello people,

      I am very new to WS and I try to implement simpliest WS based on EJB3 and I get exception... Please, could somebody tell me what am I doing wrong?
      Here is my code:
      Bean:

      
      
      import javax.ejb.Remote;
      import javax.ejb.Stateless;
      import javax.jws.WebMethod;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      
      @Stateless
      @Remote(ProfileMgmtRemote.class)
      @WebService
      @SOAPBinding(style = SOAPBinding.Style.RPC)
      public class ProfileMgmtBean {
      
       @WebMethod
       public int summ(int a, int b){
      
       return a+b;
       }
      
      }
      
      


      Interface:

      
       public interface ProfileMgmtRemote {
      
       public int summ(int a, int b);
      }
      
      


      and client:

      
       import java.net.MalformedURLException;
      import java.net.URL;
      
      import javax.xml.namespace.QName;
      import javax.xml.ws.Service;
      
      import com.tsystems.web.services.sample.ProfileMgmtRemote;
      
      public class WSClient {
      
      
       private String endpointURL = "http://127.0.0.1:8080/WebServiceProject/ProfileMgmtBean?wsdl";
       private String targetNS = "http://sample.services.web.tsystems.com/";
      
       /**
       * @param args
       */
      
       public static void main(String[] args) {
      
       WSClient wsc = new WSClient();
       try {
       System.out.println("");
       URL wsdlURL = new URL(wsc.endpointURL);
       QName serviceName = new QName(wsc.targetNS, "ProfileMgmtBeanService");
       Service service = Service.create(wsdlURL, serviceName);
       ProfileMgmtRemote inst = (ProfileMgmtRemote)service.getPort(ProfileMgmtRemote.class);
       System.out.println("And summ = " + inst.summ(1, 1));
      
       } catch (MalformedURLException e) {
       e.printStackTrace();
       }
      
      
       }
      
      }
      
      


      Finally I get the following stack trace:

      
      Exception in thread "main" javax.xml.ws.WebServiceException: Unable to load Provider: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
       at javax.xml.ws.spi.Provider.provider(Provider.java:90)
       at javax.xml.ws.Service.<init>(Service.java:81)
       at javax.xml.ws.Service.create(Service.java:98)
       at com.tsystems.test.client.WSClient.main(WSClient.java:28)
      Caused by: java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
       at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
       at javax.xml.ws.spi.Provider.provider(Provider.java:82)
       ... 3 more
      Caused by: java.lang.ExceptionInInitializerError
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at java.lang.Class.newInstance0(Class.java:350)
       at java.lang.Class.newInstance(Class.java:303)
       at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
       ... 4 more
      Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference.
       at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:188)
       at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:65)
       ... 11 more
      Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
      Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.
       this problem is related to the following location:
       at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
       at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
       at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
       this problem is related to the following location:
       at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
       at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
       at javax.xml.ws.wsaddressing.W3CEndpointReference
      Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.namespace to assign different names to them.
       this problem is related to the following location:
       at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
       at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
       at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
       this problem is related to the following location:
       at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
       at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
       at javax.xml.ws.wsaddressing.W3CEndpointReference
      
       at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
       at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
       at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
       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:211)
       at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
       at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
       at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
       at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:186)
       ... 12 more
      
      


      I am using JBoss 4.2.2.GA and jbossws-3.0.1-native-2.0.4.GA.

      Thanx for help.

        • 2. Re: New to WS... Need help...
          Andrey Filippov Newbie

          I think I have found solution... But I faced with another problem... With the line
          Service service = Service.create(wsdlURL, serviceName);

          I get the following exception:

          
          java.lang.NoSuchMethodError: org.jboss.ejb3.stateless.StatelessBeanContext.getWebServiceContextProperty()Lorg/jboss/injection/lang/reflect/BeanProperty;
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3$CallbackImpl.attached(InvocationHandlerEJB3.java:129)
           at org.jboss.ejb3.EJBContainerInvocation.setBeanContext(EJBContainerInvocation.java:77)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:56)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
           at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
           at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
          17:23:50,105 ERROR [[WSTestBean]] Servlet.service() for servlet WSTestBean threw exception
          java.lang.NoSuchMethodError: org.jboss.ejb3.stateless.StatelessBeanContext.getWebServiceContextProperty()Lorg/jboss/injection/lang/reflect/BeanProperty;
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3$CallbackImpl.attached(InvocationHandlerEJB3.java:129)
           at org.jboss.ejb3.EJBContainerInvocation.setBeanContext(EJBContainerInvocation.java:77)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:56)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
           at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
           at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
          17:24:02,934 ERROR [[WSTestBean]] Servlet.service() for servlet WSTestBean threw exception
          java.lang.NoSuchMethodError: org.jboss.ejb3.stateless.StatelessBeanContext.getWebServiceContextProperty()Lorg/jboss/injection/lang/reflect/BeanProperty;
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3$CallbackImpl.attached(InvocationHandlerEJB3.java:129)
           at org.jboss.ejb3.EJBContainerInvocation.setBeanContext(EJBContainerInvocation.java:77)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:56)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
           at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
           at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
          17:27:15,732 ERROR [[WSTestBean]] Servlet.service() for servlet WSTestBean threw exception
          java.lang.NoSuchMethodError: org.jboss.ejb3.stateless.StatelessBeanContext.getWebServiceContextProperty()Lorg/jboss/injection/lang/reflect/BeanProperty;
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3$CallbackImpl.attached(InvocationHandlerEJB3.java:129)
           at org.jboss.ejb3.EJBContainerInvocation.setBeanContext(EJBContainerInvocation.java:77)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:56)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
           at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
           at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
          17:27:16,154 ERROR [[WSTestBean]] Servlet.service() for servlet WSTestBean threw exception
          java.lang.NoSuchMethodError: org.jboss.ejb3.stateless.StatelessBeanContext.getWebServiceContextProperty()Lorg/jboss/injection/lang/reflect/BeanProperty;
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3$CallbackImpl.attached(InvocationHandlerEJB3.java:129)
           at org.jboss.ejb3.EJBContainerInvocation.setBeanContext(EJBContainerInvocation.java:77)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:56)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
           at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
           at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
           at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)
          
          



          and after it:
          
          [Fatal Error] :-1:-1: Premature end of file.
          [Fatal Error] :-1:-1: Premature end of file.
          [Fatal Error] :-1:-1: Premature end of file.
          [Fatal Error] :-1:-1: Premature end of file.
          Exception in thread "main" java.lang.NullPointerException
           at $Proxy5.summ(Unknown Source)
           at com.tsystems.test.client.WSClient.main(WSClient.java:30)
          


          (I renamed my client and ejb objects...)
          and I do not know the reason...
          Could someone help?
          Thanx again.

          • 3. Re: New to WS... Need help...
            Peter Johnson Master

            Try something simpler. The web service (class only, no interface):

            import javax.ejb.Stateless;
            import javax.jws.WebMethod;
            import javax.jws.WebService;
            import javax.jws.soap.SOAPBinding;
            
            @Stateless
            @WebService
            @SOAPBinding(style = SOAPBinding.Style.RPC)
            public class ProfileMgmtBean {
             @WebMethod
             public int summ(int a, int b){
             return a+b;
             }
            }


            Compile that, place in jar, and deploy it. Then use wsconsume to generate the client stubs. The client:

            public class WSClient {
             public static void main(String[] args) {
             ProfileMgmtBeanService svc = new ProfileMgmtBeanService();
             ProfileMgmtBean inst = svc.getProfileMgmtBeanPort();
             System.out.println("And summ = " + inst.summ(1, 1));
             }
            }


            Compile the client along with the stubs generated by wsconsume. Then use wsrunclient to run it.

            • 4. Re: New to WS... Need help...
              Andrey Filippov Newbie

              Thanks for reply,

              I think I realized what goes wrong - I played with jbossws versions and that is the main reason - I took clean 4.2.2.AS with jbossws2.0.1 SP2 and it works there... On my working server I installed jbossws 3.0.1 and it does not work. Please could you advice how could I clean AS manually with the aim to install jbossws again and where can I get jbossws2.0.1 SP2?

              Thanks a lot.

              • 5. Re: New to WS... Need help...
                Peter Johnson Master

                The easiest way to do this is reinstall jbossas 4.4.2. Just download and unzip the binary zip file.

                As a hint - I never run the "default" configuration. Instead I make a copy of it and modify the copy and run that. This way I can easily "refresh" my configuration by deleting it and recopying "default" again. (I actually do this as part of my Ant script.)

                • 6. Re: New to WS... Need help...
                  Alessio Soldano Master

                   

                  "PeterJ" wrote:
                  As a hint - I never run the "default" configuration. Instead I make a copy of it and modify the copy and run that. This way I can easily "refresh" my configuration by deleting it and recopying "default" again. (I actually do this as part of my Ant script.)


                  This is often useful, just remember that the JBossWS deploy procedure also changes libraries outside the JBOSS_HOME/server/your_configuration/