2 Replies Latest reply on May 1, 2007 7:00 AM by trivedi

    JAX-WS servlet initializing error during deployment of jaxws

    trivedi

      Hi,

      I am trying to deploy the jaxws webservices on jboss 4.0.4GA. During deployment, I was getting the following errors for this webservices:

      ===========================================

      12:01:07,247 INFO [TomcatDeployer] deploy, ctxPath=/jboss404jaxws, warUrl=.../tmp/deploy/tmp5099jboss404jaxws-exp.war/
      12:01:07,466 ERROR [STDERR] Mar 16, 2007 12:01:07 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate init
      INFO: WSSERVLET14: JAX-WS servlet initializing
      12:01:07,466 ERROR [STDERR] Mar 16, 2007 12:01:07 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate warnMissingContextInformation
      WARNING: WSSERVLET16: missing context information
      ============================================
      My project name is jboss404jaxws, I am using SUN jaxws jars. Is that something causing issue? pls help me.

      Thanks in advance
      Trivedi

        • 1. Re: JAX-WS servlet initializing error during deployment of j
          oskar.carlstedt

          Hi Trivedi!

          Can you please give me some more of your code. Then I might help you. I have been struggeling al lot now an finally found a solution that seems to work for me.

          //Oskar

          • 2. Re: JAX-WS servlet initializing error during deployment of j
            trivedi

             

            "oskar.carlstedt" wrote:
            Hi Trivedi!

            Can you please give me some more of your code. Then I might help you. I have been struggeling al lot now an finally found a solution that seems to work for me.

            //Oskar


            Hi Oskar,

            Sorry for the late response from my side. Currently I again started working on web services, got stuck now with the above issue. Here is the code that I written:

            Here is my wsdl
            ----------------------------------------------------------------------
            <definitions name='EchoService' targetNamespace='http://echo/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://echo/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

            <xs:schema targetNamespace='http://echo/' version='1.0' xmlns:tns='http://echo/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
            <xs:element name='echo' type='tns:echo'/>
            <xs:element name='echoResponse' type='tns:echoResponse'/>
            <xs:complexType name='echo'>
            <xs:sequence>
            <xs:element minOccurs='0' name='arg0' type='xs:string'/>
            </xs:sequence>
            </xs:complexType>
            <xs:complexType name='echoResponse'>
            <xs:sequence>
            <xs:element minOccurs='0' name='return' type='xs:string'/>
            </xs:sequence>
            </xs:complexType>
            </xs:schema>














            <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>

            <soap:operation soapAction=''/>

            <soap:body use='literal'/>


            <soap:body use='literal'/>





            <soap:address location='http://AIBD305014842:8080/AddNumbersWS/Echo'/>



            ----------------------------------------------------------
            Using Jax-WS generated the java classes from it.
            Here is the interface that got created with it


            ================================
            @WebService(name = "Echo", targetNamespace = "http://echo/")
            public interface Echo {


            /**
            *
            * @param arg0
            * @return
            * returns java.lang.String
            */
            @WebMethod
            @WebResult(targetNamespace = "")
            @RequestWrapper(localName = "echo", targetNamespace = "http://echo/", className = "echo.Echo_Type")
            @ResponseWrapper(localName = "echoResponse", targetNamespace = "http://echo/", className = "echo.EchoResponse")
            public String echo(
            @WebParam(name = "arg0", targetNamespace = "")
            String arg0);

            }

            The Implementation Class is here:

            package echo;

            @javax.jws.WebService(endpointInterface="echo.Echo",
            portName="EchoPort")
            public class EchoImpl implements Echo{

            public String echo(String arg0) {
            return "hi " + arg0;
            }

            }


            Here are the artifacts that i created for this service:
            1. web.xml


            <servlet-name>Echo</servlet-name>
            <display-name>Echo</display-name>
            JAX-WS endpoint - InteropWS
            <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
            <load-on-startup>1</load-on-startup>

            <servlet-mapping>
            <servlet-name>Echo</servlet-name>
            <url-pattern>/Echo</url-pattern>
            </servlet-mapping>

            2. sun-jaxws.xml



            <endpoint name="Echo"
            implementation="echo.EchoImpl"
            url-pattern="/Echo" />




            And after this I created the war from it by adding the following jars into WEB-INF lib folder
            1. jaxws-api.jar 2.jaxws-rt.jar 3. jaxws-tools.jar 4. jsr181-api.jar 5.jsr250-api.jar

            After deploying I was getting the above error.
            Pls help me in running this service. Thanks in advance.
            Again I am really sorry for the late reply.