File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes SSL in standalone axis2 1.4.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SSL in standalone axis2 1.4.1" Watch "SSL in standalone axis2 1.4.1" New topic
Author

SSL in standalone axis2 1.4.1

Aleksander Braula
Greenhorn

Joined: Nov 20, 2009
Posts: 10
Hi,

How do I enable SSL on the server side on standalone (no using Tomcat) Axis2 1.4.1 ?

When I try to uncomment the https lines in the axis2.xml i get NullPointerExceptions like:
NullPointerException at org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener

I cannot find a good tutorial about this.
samarjit samanta
Greenhorn

Joined: Nov 07, 2010
Posts: 9
I am not quite sure if you can switched it on in axis2.xml. But something that woked for me is rampart modules.

You will need to include security modules Rampart along with with Axis 2. Look into http://wso2.org/library/3190#Step_3._Engaging_Rampart_and_setting_authentication_information.
You will also uncomment some code in tomcat/other app server's server.xml.

To follow the tutorial which also talk about user name token authentication, which you may leave out just use the SSL part.
You will need to edit the META-INF/services.xml in server to add these policy. Here Your concern should be which defines ssl, you can remove the which is used for user name token.

Aleksander Braula
Greenhorn

Joined: Nov 20, 2009
Posts: 10
I've tried to do that but my problem is that I cannot enable the ssl in axis2.xml

I've uncommented the necessary code:


But when I try to run the server I get

samarjit samanta
Greenhorn

Joined: Nov 07, 2010
Posts: 9
I just followed the tutorial as I mentioned earlier. I did not change the axis2.xml for enabling SSL. Also make sure that you enable SSL in tomcat server.xml. You probably need to add rampart jars and modules in your classpath. If you are using rampart also add it to the services.xml in both the places and key store definitions . I used axis 1.5 and rampart 1.5 and it worked.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Wouldn't you rather be using message-level security (using the WS-Security standard as implemented by the Rampart module) than transport-level security (like SSL)?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSL in standalone axis2 1.4.1
 
Similar Threads
jdk6 Failed to extract complete Document from SoapBody
axis2 app error on tomcat or jetty
Error in deploying web services in axis2 when deployed on https
Help! Wsdl2Java Can't parse a Coldfusion WSDL?
Axis2 NoSuchMethodError