Noorus Khan
Noorus Khan

Reputation: 1476

How to deploy SOAP Web Service on Tomcat 7

How do I deploy a SOAP Web Service on Tomcat 7?

I have successfully published my Web Service using Eclipse:

"Endpoint.publish("http://localhost:786/AddWebservice", new Operation())"

From here I have no idea how to publish the same Web Service on a Tomcat Server.

Upvotes: 2

Views: 18018

Answers (3)

Noorus Khan
Noorus Khan

Reputation: 1476

The one way can be used to publish the endpoint is to create a servlet and within doGet() method, publish your endpoint as "Endpoint.publish("your_URL", new Operation())" then use "your_URL", to hit the service.

Upvotes: 0

Michail Alexakis
Michail Alexakis

Reputation: 1595

If building as a Maven project, a simple and consistent way to gather runtime dependencies is to add the following dependency (adjust version):

<!-- runtime for JAX-WS (servlet implementation) -->
<dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>jaxws-rt</artifactId>
    <version>2.2.10</version>
</dependency>

Upvotes: 0

Anilkumar Bathula
Anilkumar Bathula

Reputation: 278

Deploy JAX-WS web services on Tomcat servlet container. See following summary steps of a web service deployment.

  1. Create a web service (of course).
  2. Create a sun-jaxws.xml, defines web service implementation class.
  3. Create a standard web.xml, defines WSServletContextListener, WSServlet and structure of a web project.
  4. Build tool to generate WAR file.
  5. Copy JAX-WS dependencies to “${Tomcat}/lib” folder.
  6. Copy WAR to “${Tomcat}/webapp” folder.
  7. Start It.

See the below example SOAP in Tomcat

Upvotes: 2

Related Questions