Announcement Announcement Module
Collapse
No announcement yet.
Spring support in JAX-WS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring support in JAX-WS

    Hi,
    I tried to get the example JAX-WS working on RAD7 but i am getting to following error:

    SRVE0201E: Servlet [com.sun.xml.ws.transport.http.servlet.WSSpringServ let]: not a servlet class

    Please find below the configuration files:

    web.xml
    --------
    <web-app id="sample-webservices">
    <display-name>sample-webservices</display-name>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    classpath:sample-services-applicationcontext.xml,
    classpath:sample-services-providers.xml
    </param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>jaxws-servlet</servlet-name>
    <servlet-class>
    com.sun.xml.ws.transport.http.servlet.WSSpringServ let
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>jaxws-servlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
    </servlet-mapping>
    </web-app>

    sample-services-applicationcontext.xml
    --------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-2.0.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    <bean name="reserveSeatWebService" class="reserveseatwebservice.impl.ReserveSeatWebSe rviceImpl"/>
    </beans>

    sample-services-providers.xml
    -----------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ws="http://jax-ws.dev.java.net/spring/core" xmlns:wss="http://jax-ws.dev.java.net/spring/servlet" xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.5.xsd
    http://jax-ws.dev.java.net/spring/core http://jax-ws.dev.java.net/spring/core.xsd
    http://jax-ws.dev.java.net/spring/servlet http://jax-ws.dev.java.net/spring/servlet.xsd">
    <wss:binding url="/services/ReserveSeatService">
    <wss:service>
    <ws:service bean="#reserveSeatWebService"/>
    </wss:service>
    </wss:binding>
    <bean id="reserveSeatWebService" class="webservices.endpoint.reserveseatwebservice. ReserveSeatWebService"/>
    </beans>

    The sample-webservices project is a web project.

    Im using WAS 6.1 application server. Please find below the class loader policy that im using -

    EAR - parent last
    Web - parent last

    I dont get any errors/exception during server start up, but when i try to test the service using soapUI test client i get the follwing exception -

    Error 404: SRVE0201E: Servlet [com.sun.xml.ws.transport.http.servlet.WSSpringServ let]: not a servlet class

    I doubt whether websphere has some interference on this because if i create the webservices project as jar and give it as dependency in a web project and test, it works fine. If i have the webservices project as web project i face this issue..

    Is my assumption right???

    Please help me on this issue..

    Thanks in advance,
    Sriram

  • #2
    jaw-ws spring integration

    Hi SRIRAM
    can u send me fully working code of jax-ws and spring.

    even i tried to integrate (code first) but i am getting <wss:bindings> error
    and some times some create() method not found error

    If any body send me the full project then it will be a great help

    mail:[email protected]

    Comment

    Working...
    X