users@glassfish.java.net

How to deploy the same web service on two ports -- secured and unsecured

From: <glassfish_at_javadesktop.org>
Date: Mon, 24 May 2010 06:10:19 PDT

Recently I had web service running on GF 2.1.1.
It was possible to refer to the service through two ports -- default 8080 (unsecured, http) and default 8181 (secured, https).
It worked fine with no problem.
The deployment bundle includes EAR, EJB JAR and WAR. None of them includes special security tags, except some role definitions and mapping in the JAR/WAR files.

Now I upgraded to GF 3.0, and discovered that I can refer to the service through the unsecured port only. When I try to access the service with https, for example retrieving the wsdl, I get blank page. The server reports a single warning in the log:
[code]Invalid request scheme for Endpoint ClientBean. Expected http . Received https[/code]

So, I tried to add [code]<transport-guarantee>CONFIDENTIAL</transport-guarantee>[/code] to the sun-ejb-jar file, and now I can access the service through the secured port only, but it doesn't work anymore for the unsecured port.

My questions are --
1) Is this behavior new in JavaEE 6 or GF 3? I didn't work this way in GF 2.0, and I couldn't find anything in the release notes that may indicate on such change.
2) What is the workaround? how can I deploy the same service on secured and unsecured ports at the same time?

Thanks!



P.S.
I found a similar post here that refers to some possible solution, but unfortunately the link is broken.
http://forums.sun.com/thread.jspa?messageID=10993740&#10993740
[Message sent by forum member 'gamliela']

http://forums.java.net/jive/thread.jspa?messageID=471205