Je ne sais pas comment changer l'URL de mon WebService JAX-WS sur Tomcat.URL de l'application JaxWS dans Tomcat
localhost: 8080/WSCalc/WSCalc run wsdl ok mais je voudrais changer l'URL à localhost: 8080/ws/WSCalc/WSCalc wsdl
Avec la configuration ci-dessous je peux courir localhost: 8080/ws/WSCalc/(il est index.jsp) mais je ne peux pas courir WebService localhost: 8080/ws/WSCalc/WSCalc wsdl (il retourne 404)
répertoire webapps/includes:
WSCalc.war
WSCalc/
-index.jsp
-META-INF/context.xml
-WEB-INF/web.xml
-WEB-INF/sun-jaxws.xml
-WEB-INF/classes/*
-WEB-INF/lib/*
web.xml :
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>WSCalc</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>WSCalc</servlet-name>
<url-pattern>/WSCalc</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
soleil jaxws.xml:
<endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
<endpoint implementation="cz.vrana.WSCalc" name="WSCalc" url-pattern="/WSCalc"/>
</endpoints>
server.xml:
<Host name="localhost" appBase="webapps" unpackWars="true" autodeploy=""true">
<Context path="/ws" docBase="." />
</Host>
Cela ne fonctionne pas. Je l'ai essayé. Le résultat était le statut de la requête HTTP: 404 (Non trouvé). – user2169201