jaxws-servlet.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/schema/beans/spring-beans.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="/ws/checkLicense">
<wss:service>
<ws:service bean="#checkLicenseWS"/>
</wss:service>
</wss:binding>
<!-- Web service methods -->
<bean id="checkLicenseWS" class="ru.bvn13.licenseserverj.web.ws.CheckLicenseWS">
<property name="checker" ref="licenseChecker"/>
</bean>
<bean id="licenseChecker" class="ru.bvn13.licenseserverj.LicenseChecker">
<property name="db" ref="database"/>
</bean>
<bean id="database" class="ru.bvn13.licenseserverj.Database" scope="singleton">
</bean>
<bean id="test" class="ru.bvn13.licenseserverj.TestBean"/>
</beans>
web.xml
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>jaxws</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jaxws</servlet-name>
<url-pattern>/ws/checkLicense</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
без файла sun-jaxws.xml вообще ws не работают:
<?xml version="1.0" encoding="UTF-8"?>
<endpoints
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0"
>
<endpoint
name="checkLicenseWS"
implementation="ru.bvn13.licenseserverj.web.ws.CheckLicenseWS"
url-pattern="/ws/checkLicense"/>
</endpoints>
В чем дело?