3 Replies Latest reply on Jul 7, 2011 6:34 AM by asoldano

    Deploying EE6 JAX-WS to AS7

    nkopp

      I am trying to deploy a Java EE6 WAR-based JAX-WS web service to AS7. The deployment appears to go smoothly, but if I load the WSDL into SOAP UI and try to contact the endpoint, I get a 404 error.  The web app itself did appear to deploy properly, since I am able to access the "index.html" file correctly.

       

      I did not receive any errors from deployment, only warnings. (See log below.) The WSDL was generated and successfully published to the file system, but is not available online through the usual <endpoint-url>?WSDL convention.

       

      I'm attaching the WAR file, and below is source for the web service.

       

      This WAR will deploy and expose the service as expected using Glassfish 3.1, so I'm pretty sure that what I'm trying to do is valid.  Thanks for any help you can offer getting this to work in AS7.

       

      -Nathan

       

      package org.ccci.soa;

      import javax.ejb.Stateless;

      import javax.jws.WebMethod;

      import javax.jws.WebService;

      @WebService

      @Stateless

      public class TestWebService

      {

          @WebMethod

          public String ping()

          {

              return "active";

          }

      }

       

      Here is the deployment log:

       

      12:33:15,788 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jaxws-test.war"

      12:33:15,804 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named TestWebService in deployment unit deployment "jaxws-test.war" are as follows:

       

              java:global/jaxws-test/TestWebService!org.ccci.soa.TestWebService

              java:app/jaxws-test/TestWebService!org.ccci.soa.TestWebService

              java:module/TestWebService!org.ccci.soa.TestWebService

       

      12:33:15,804 WARN  [org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect] (MSC service thread 1-3) Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.

      12:33:15,804 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-3) Add Service

      id=TestWebService

      address=http://localhost:8080/jaxws-test/TestWebService

      implementor=org.ccci.soa.TestWebService

      invoker=org.jboss.wsf.stack.cxf.InvokerEJB3

      serviceName={http://soa.ccci.org/}TestWebServiceService

      portName={http://soa.ccci.org/}TestWebServicePort

      wsdlLocation=null

      mtomEnabled=false

      12:33:15,804 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-3) register: jboss.ws:context=jaxws-test,endpoint=TestWebService

      12:33:15,819 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-3) Creating Service {http://soa.ccci.org/}TestWebServiceService from class org.ccci.soa.TestWebService

      12:33:15,851 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-3) Setting the server's publish address to be http://localhost:8080/jaxws-test/TestWebService

      12:33:15,851 WARN  [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-3) Cannot resolve resource: cxf

      12:33:15,851 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-3) WSDL published to: file:/C:/dev/jboss-7.0.0.Beta4-SNAPSHOT/standalone/data/wsdl/jaxws-test.war/TestWebServiceService.wsdl

      12:33:15,866 INFO  [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-4) Starting service jboss.ws.endpoint.jaxws-test.TestWebService

      12:33:15,866 INFO  [org.jboss.web] (MSC service thread 1-1) registering web context: /jaxws-test

        • 1. Re: Deploying EE6 JAX-WS to AS7
          asoldano

          There's no reference to the endpoint impl in the web.xml in the war.

          There's a jira for this https://issues.jboss.org/browse/JBWS-3276 ; in the mean time you can patch your web.xml adding something like (see the documentation):

           

          <servlet>

              <servlet-name>MyService</servlet-name>

              <servlet-class>org.ccci.soa.TestWebService</servlet-class>

            </servlet>

            <servlet-mapping>

              <servlet-name>MyService</servlet-name>

              <url-pattern>/*</url-pattern>

            </servlet-mapping>

          • 2. Re: Deploying EE6 JAX-WS to AS7
            oourfali

            I have a similar problem, but I'm using a jar for that.

             

            @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)

            @BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)

            @Addressing(enabled = true, required = true)

            @WebService(name = "IBackendCxf", serviceName = "IBackend", targetNamespace = "http://service.org.nogah")

            @Stateless

            @Interceptors({ CXFContextInterceptor.class })

            public class GenericApiService {

             

                @EJB(name="Backend")

                private static BackendInternal backend;

             

                @WebMethod

                public VdcReturnValueBase EndAction(VdcActionType actionType, VdcActionParametersBase parameters) {

                    VdcReturnValueBase returnValue = backend.EndAction(actionType, parameters);

                    return returnValue;

                }

             

            ....

            ....

            ....

             

            Is there a workaround for that as well?

             

            Thank you,

            Oved

            • 3. Re: Deploying EE6 JAX-WS to AS7
              asoldano

              This should simply work. Can you provide more details / the jar you're deploying?