aspose file tools*
The moose likes Web Services and the fly likes Deploying a web service on an actual server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Deploying a web service on an actual server" Watch "Deploying a web service on an actual server" New topic
Author

Deploying a web service on an actual server

Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Hi,
I was wondering, how can i put a web service online ? If i have the .war file, what do i do with it ? What do web hosting service need, to be able to deploy a web service ?


"Quoting yourself is stupid" - Me
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
I am assuming you have a war file with web service code in it. You need a compatible server to deploy the war file to. For example, you can't deploy a war file with a web service on Apache Tomcat. If it has axis, you might be okay. Also, depending on the web service runtime you are using, you may have to deploy the web service itself. For example, AXIS has an admin console, which will accept the service as aar file. Finally, you may have to configure the endpoint.


ChintanRajyaguru.com
SOADevelopment.com - Coming soon!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41800
    
  62
For example, you can't deploy a war file with a web service on Apache Tomcat.

Why not? Axis is a web app, so it can be part of any war file you care to deploy.

All that is needed to deploy a WS is a servlet container that supports whatever version Servlet API version is required by whatever SOAP stack you happen to use. For example, if you're using Metro (or the JAX-WS reference implementation, or Axis 2), then Tomcat 5.5 running on Java 5 will do nicely.


Ping & DNS - my free Android networking tools app
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
So basicly if web hosts advertise having tomcat, means i can deploy a web service there.
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 126
Probably it also needs to support Java, if your web service is developed in java.
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
Ulf Dittmer wrote:
For example, you can't deploy a war file with a web service on Apache Tomcat.

Why not? Axis is a web app, so it can be part of any war file you care to deploy.

All that is needed to deploy a WS is a servlet container that supports whatever version Servlet API version is required by whatever SOAP stack you happen to use. For example, if you're using Metro (or the JAX-WS reference implementation, or Axis 2), then Tomcat 5.5 running on Java 5 will do nicely.


Ulf is right. I meant, Apache Tomcat by itself is NOT a web service container. It is a Servlet container. To run web services on it, you will have to 'package' the web service container (e.g. Axis) along with your application.

Sounds like the original probelm is this: the web hosting provider is making Tomcat available to the website it is hosting. Based on what I have seen in the past, the hosting provider is probably making WEB-INF (for classes) and webapp (for JSP) available in your account. You want to deploy a war file that has web service in it.

If I understood your problem correctly, you need to create a war file with your application, package Axis libraries along with your war file and drop the file in WEB-INF in your account. Finally, if you don't know already, ask your hosting provider for the URL to access your servlets/JSPs, which will determine the web service URL as well. Finally, I would start with a simple servlet/JSP before dropping a war with a web service in it.

Hope this helps.
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying a web service on an actual server