Skip to content

Instantly share code, notes, and snippets.

@lucasnata
Last active February 18, 2019 20:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lucasnata/0f413c4e7bc6a77161880588dd9fdbe4 to your computer and use it in GitHub Desktop.
Save lucasnata/0f413c4e7bc6a77161880588dd9fdbe4 to your computer and use it in GitHub Desktop.
Create Endpoint Wsdl for Tomcat

Add Dependency on pom.xml, considering use of Maven: com.sun.xml.ws jaxws-rt 2.3.2

Add "sun-jaxws.xml" file on path: /src/main/webapp/WEB-INF/

Add "web.xml" file on path: /src/main/webapp/WEB-INF/

<?xml version="1.0" encoding="UTF-8"?>
<endpoints
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0">
<endpoint
name="Services"
implementation="br.com.baratinha.Main"
url-pattern="/services"/>
</endpoints>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>services</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>services</servlet-name>
<url-pattern>/services</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</web-app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment