5 Replies Latest reply on Mar 13, 2006 8:36 AM by Frank Heldt

    jbossws under jboss-4.0.x ?

    Frank Heldt Newbie

      I'm sorry, but i don't get it. :-~

      I wanted to try out the new jbossws stack (JSR-181 is nice :-), so i did everything decribed in http://wiki.jboss.org/wiki/Wiki.jsp?page=WSDeployJBossWS to setup the new jbossws stack. I'm using jboss-4.0.4RC1 and took the binaries from docs/examples/jbossws. No errors on startup, everything looks ok, but i couldn't see my WebService (SLSB with JSR-181 Annotations) under http://localhost:8080/jbossws after deployment. :-(

      Next try: I looked at jboss-4.0.x from cvs, but the jbossws.sar seems to be the same as in RC1.

      Is there any way to get this to work this under jboss-4.0.x ?

        • 1. Re: jbossws under jboss-4.0.x ?
          Chris Laprun Master

          If you try to deploy your web services AFTER server startup, what happens?

          • 2. Re: jbossws under jboss-4.0.x ?
            Thomas Diesler Master

            jbossws(14).sar is now installed by default in jboss-4.0.x

            cvs co -r Branch_4_0 jboss-4.0.x

            • 3. Re: jbossws under jboss-4.0.x ?
              Frank Heldt Newbie

              I did a cvs update today and rebuild the hole stuff.

              This is my testejb3.jar

              HelloService.java

              package com.dhc;
              
              import javax.ejb.Remote;
              
              @Remote
              public interface HelloService {
               public String sayHello(String name);
              }
              


              HelloServiceBean.java
              package com.dhc;
              
              import javax.ejb.Stateless;
              import javax.jws.WebService;
              import javax.jws.WebMethod;
              
              @Stateless
              @WebService
              public class HelloServiceBean implements HelloService {
              
               @WebMethod
               public String sayHello(String name) {
               return "Hello " + name;
               }
              }
              


              And that's what i get after deployment:

              2006-03-06 13:25:56,276 DEBUG [org.jboss.ejb3.EJB3Deployer] Deploying: file:/C:/jboss-4.0.4.CR2/server/default/deploy/testejb3.jar
              2006-03-06 13:25:56,276 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB3,module=testejb3.jar
              2006-03-06 13:25:56,276 DEBUG [org.jboss.ejb3.Ejb3Module] Creating jboss.j2ee:service=EJB3,module=testejb3.jar
              2006-03-06 13:25:56,292 DEBUG [org.jboss.ejb3.security.JaccHelper] Initialising JACC Context for deployment: testejb3.jar
              2006-03-06 13:25:56,526 INFO [org.jboss.ejb3.Ejb3AnnotationHandler] found EJB3: ejbName=HelloServiceBean, class=com.dhc.HelloServiceBean, type=STATELESS
              2006-03-06 13:25:56,573 DEBUG [org.jboss.ejb3.ProxyDeployer] no declared remote bindings for : HelloServiceBean
              2006-03-06 13:25:56,588 DEBUG [org.jboss.ejb3.ProxyDeployer] there is remote interfaces for HelloServiceBean
              2006-03-06 13:25:56,588 DEBUG [org.jboss.ejb3.ProxyDeployer] default remote binding has jndiName of HelloServiceBean/remote
              2006-03-06 13:25:56,620 INFO [org.jboss.ejb3.Ejb3Deployment] EJB3 deployment time took: 344
              2006-03-06 13:25:56,620 DEBUG [org.jboss.ejb3.Ejb3Module] Created jboss.j2ee:service=EJB3,module=testejb3.jar
              2006-03-06 13:25:56,620 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EJB3,module=testejb3.jar dependents are: []
              2006-03-06 13:25:56,635 DEBUG [org.jboss.ws.metadata.AnnotationsMetaDataBuilderEJB3] START buildMetaData: [canonicalName=testejb3.jar]
              2006-03-06 13:25:56,635 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.CR2/server/default/deploy/testejb3.jar
              org.jboss.ws.WSException: Annotations class loader not initialized
               at org.jboss.ws.metadata.AnnotationsMetaDataBuilderEJB3.buildMetaData(AnnotationsMetaDataBuilderEJB3.java:62)
               at org.jboss.ws.server.WebServiceDeployerEJB3.createWebServicesMetaData(WebServiceDeployerEJB3.java:92)
               at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:101)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
               at $Proxy29.create(Unknown Source)
               at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
               at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
               at $Proxy8.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:522)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
              


              Any hints about what i going wrong here?


              • 4. Re: jbossws under jboss-4.0.x ?
                Thomas Diesler Master

                I have not tried ejb3 deployments in Branch_4_0. So far this is only supported in jboss-head.

                HOWTO get started with JBossWS
                http://www.jboss.org/index.html?module=bb&op=viewtopic&t=64321

                Here is the task for it
                http://jira.jboss.com/jira/browse/JBWS-727

                • 5. Re: jbossws under jboss-4.0.x ?
                  Frank Heldt Newbie

                  I did another cvs update today and gave my little sample another try, this time with much more luck :-)

                  I wrote a little Testclient with C#/.NET and it works like a charm, until the parameter string doesn't contain an umlaut. Calling sayHello with "Müller" gives:

                  2006-03-13 14:28:19,068 DEBUG [org.jboss.ws.soap.SOAPContentElement] setXMLFragment: <sayHello xmlns='http://dhc.com/jaws'><String_1>Müller</String_1></sayHello>
                  2006-03-13 14:28:19,084 ERROR [STDERR] [Fatal Error] :1:212: Invalid byte 1 of 1-byte UTF-8 sequence.
                  2006-03-13 14:28:19,084 ERROR [org.jboss.util.xml.DOMUtils] Cannot parse: <wrapper xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><sayHello xmlns='http://dhc.com/jaws'><String_1>Müller</String_1></sayHello></wrapper>
                  2006-03-13 14:28:19,100 DEBUG [javax.xml.rpc.soap.SOAPFaultException] new SOAPFaultException [code={http://schemas.xmlsoap.org/soap/envelope/}Client,string=javax.xml.rpc.JAXRPCException: java.io.IOException: org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.,actor=null,detail=null]
                  2006-03-13 14:28:19,100 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
                  javax.xml.rpc.JAXRPCException: java.io.IOException: org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.
                   at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:904)
                   at org.jboss.ws.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:761)
                   at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:212)
                   at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:271)
                   at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:271)
                   at org.jboss.util.xml.DOMWriter.print(DOMWriter.java:186)
                   at org.jboss.util.xml.DOMWriter.printNode(DOMWriter.java:135)
                   at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:216)
                   at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:110)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                   at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                   at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                   at java.lang.Thread.run(Thread.java:595)
                  Caused by: java.io.IOException: org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.
                   at org.jboss.util.xml.DOMUtils.parse(DOMUtils.java:117)
                   at org.jboss.util.xml.DOMUtils.parse(DOMUtils.java:96)
                   at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:849)
                   ... 29 more
                  


                  Did i miss something? Do i have to declare somewhere, that i use UTF-8?