This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Unable to enable SSL communication using GlassFish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Unable to enable SSL communication using GlassFish" Watch "Unable to enable SSL communication using GlassFish" New topic
Author

Unable to enable SSL communication using GlassFish

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Hello All,

I'm reading through Ivan's notes on Security and following the code examples illustrated under section 8.3 (JavaEE Based Web Service Security)

As part of that, I attempted to setup SSL connection from my client to service deployed on GlassFish server. Below are my steps.

As suggested, I have successfully created the client and server keystores and copied the server keystore and truststore to /GLASS_FISH/....domain1/config

I have copied the client keystore and truststore to the root directory of my client.

My web.xml is modified as below.



and in my client, I did something like



I changed the service URL schema to HTTPS from HTTP in client side generated artifact (HelloWorldWSService) as given in notes

I deployed my service in Glassfish and tried to run the client, only to end up with the exception


With this setting, even HTTP invocation is failing and if I remove <security-constraint> and change the URL in service to HTTP, It is working fine (just HTTP call). But if I include <security-constraint> and HTTPS in URL, it is failing for both HTTP and HTTPS.

Any thoughts on this, why it is failing.

Is there anything like javax.net.debug, for inspecting plain HTTP connection ?

Also, If I paste "http://localhost:8080/JAX-WS_GreetingServletMutualAuth/", I see the default index page displayed, but for https, I see "Page cannot be displayed". Is that because, access is restricted.

Regards
KumarRaja

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Ah, my bad......

port should have been 8181, instead of 8080
Jeff Beckstrom
Greenhorn

Joined: May 07, 2012
Posts: 1
I configured SSL. When try to connect to the SSL enabled port, I see the following in the server.log file:
[#|2012-05-07T08:40:17.453-0400|WARNING|glassfish3.0.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=24;_ThreadName=Thread-1;|SSL support could not be configured!
java.io.IOException: Keystore was tampered with, or password was incorrect

I presume this means that my master and key store passwords are different. What do I do to rectify this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to enable SSL communication using GlassFish
 
Similar Threads
SSL Web Service Client
SSL Web Service Client
getting error when deploying web app in weblogic 10.0
Getting error while upgrading my running application from jboss-4.2.1.GA to jboss-6.0.0.Final.
How to Modify WSDL from HTTP to HTTPS