views:

925

answers:

3

I have a web application running on port :80, and I have an Axis web service that is part of that web application. As such, the service is running on port :80 as well.

However, for security reasons our client has asked us to change the web service port to 8080 so that they can allow access only to that port for remote consumers of the web service. Therefore they won't have access to the regular web application, but have access to the service.

Is this possible to do without refactoring the app and taking out the web service in a separate web app?

A: 

The short answer probably is - yes it is possible.

Axis webservices mostly are enough decoupled from the main application that it should be easy to get them running on a different Java web server instance that would run only at the port 8080 in the case if it's not possible to configure whatever webserver are you running to run also at the port 8080 and to serve the web service only at that port.

edgars
A: 

What you should be able set up a separate Service using a port 8080 Connector.

Effectively, you'd be running 2 "mini"-Tomcats inside your instance.

Basically,

<Service> <!-- normal service -->
  <Connector port="80" />
</Service>
<Service> <!-- custom service -->
  <Connector port="8080" />
  <Engine>
     <Host />
  </Engine>
</Service>

It does feel like this solution could present some debugging nightmares if it does not work just right and so it could just be easier to run a second server (perhaps Jetty).

jdewald
A: 

As I've said in my comment, our web application is hosted on Oracle AS 10g with an Oracle Web Cache server sitting in front of it. Oracle Web Cache is based on Apache httpd, so it has virtual host support and URL rewriting (although it is not present under these terms).

I've managed to solve the problem by:

It works like a charm.

As for Axis itself, I didn't find a way to configure it to listen on another port by itself. I guess it was unreasonable to expect from Axis to provide this functionality as it is only a servlet hosted in a servlet container, and it's container's job to provide the connector/transport layer.

Anyway... thanks for all who offered their help, I appreciate it.

dasp