• Post Reply Bookmark Topic Watch Topic
  • New Topic

implement https web services and  RSS feed

 
enggvikas sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi this is very urgent and any help is highly appreciated
I have implemented web services with http its working fine
can anybody tell me how to implement it in https using axis2 server which all configurations i need to do.
this is server.xml code which i changed
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
keystoreFile="/home/vikas/.keystore"
clientAuth="true" sslProtocol="TLS" />

i have generated the .keystore file in /home/vikas/ by the conventional method
and i have used the same pwd changeit


this change i did in axis2.xml (uncommented and done the changes)

<transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">

<parameter name="port" locked="false">9002</parameter>

<parameter name="non-blocking" locked="false">true</parameter>

<parameter name="keystore" locked="false">

<KeyStore>

<Location>/home/vikas/.keystore</Location>

<Type>JKS</Type>

<Password>changeit</Password>

<KeyPassword>changeit</KeyPassword>

</KeyStore>

</parameter>

<parameter name="truststore" locked="false">

<!-- <TrustStore>

<Location>trust.jks</Location>

<Type>JKS</Type>

<Password>password</Password>

</TrustStore>-->

</parameter>

<parameter name="SSLVerifyClient">require</parameter>

<!-- supports optional|require or defaults to none -->

</transportReceiver>


but i am getting this error while starting of tomcat

[INFO] Deploying Web service: version-1.4.aar - file:/home/vikas/jakarta-tomcat-5.5.9/webapps/PMCI_SERVICES/WEB-INF/services/version-1.4.aar
[INFO] Deploying Web service: Testing - file:/home/vikas/jakarta-tomcat-5.5.9/webapps/PMCI_SERVICES/WEB-INF/services/Testing/
[INFO]
java.lang.NullPointerException
at org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener.getSSLContext(HttpCoreNIOSSLListener.java:96)
at org.apache.axis2.transport.nhttp.HttpCoreNIOListener.init(HttpCoreNIOListener.java:151)
at org.apache.axis2.engine.ListenerManager.start(ListenerManager.java:125)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:442)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
Dec 5, 2008 12:13:01 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 5, 2008 12:13:01 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Dec 5, 2008 12:13:01 PM org.apache.jk.common.ChannelSocket init



can anybody please help me out
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

The only thing you need to change in the axis2.xml file is to enable the "<transportSender name="https" ... >", not the section you mentioned.

If you can access Tomcat via HTTPS with a browser, then you should be able to use HTTPS in a WS call.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may be of some help Axis2: Accessing Web Service via SSL.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!