Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to deploy a service on 2 different ports?  RSS feed

 
Sanjay Vivek
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

How do I go about deploying the same service on 2 different ports? What do I have to configure or edit with respect to config files? I would be really grateful if anyone could point me in the right direction. Cheers.

Regards
--------------
Sanjay Vivek
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjay,

I'm assuming you are doing this because you might be in a scenario where you need to have one group work on the same service without interfering with another group working on another part, all running on the same server.

The only way I know of would be to have two containers running on different ports. This could create a problem because they would be sharing the same web services directory. A work around would be to install your container on two separate paths.

As far as I know, you can't deploy a service and have it listen on two different ports.

Hope that helps.
Aloha,
Doug

-- Nothing is impossible if I'mPossible
 
Sanjay Vivek
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Doug,

The primary reason we want to do this, i.e. multi-port webservices is because we wish to deploy a webservice with 2 security mechanisms, one that implements WS-Security standards and the other, a Basic Auth implementation.

The easiest (and probably the best way) would have been to use WS-Security Policy and define alternative policies in one policy document. Although this is supported in the WS-Securty Policy spec, it is not however implemented by Rampart (or any other implementation as far as I know). I only realised this after configuring a policy document with 2 policy alternatives but only the first alternative was used each time.

So the 2nd option is to deploy a single service on 2 different ports but with a security policy for each of them. However, I haven't really found any info on how to go about doing this after much Googling.

We can always just deploy the same service twice but with different security policies but it would be more elegant if I could just deploy it once and the correct security mechanism is invoked depending on the client's security infrastructure.

So I'm guessing you haven't come across any guide or implementation details on how to deploy a multi-port service? Thanks for your help once again.

Cheers
Sanjay
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjay,

I think I misread your original post. I haven't had to do what you are describing, but maybe this article might be of use?.?.

Aloha,
Doug

-- Nothing is impossible if I'mPossible
 
Sanjay Vivek
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Doug,

I came across that article a few days back but it doesn't really help cos it assumes you are working on Rational Application Developer. And I might be wrong about this but I don't think WSDL 2.0 supports multi-port services (although WSDL 1.0 did as described in [1])

The only other alternative I've come across is to add each and every separate port as transport listeners in axis2.xml with a unique name (http1 , http2 and etc..) as detailed in [2].

I'd let you know how I'm getting on with it if you're interested (or if anyone else is for that matter). Thanks for your help. Cheers.

Regards
Sanjay


[1] - http://blogs.iona.com/vinoski/archives/000120.html

[2] - http://www.developer.com/services/article.php/10928_3606466_2
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!