This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Axis2, Tomcat 5.5.25Null pointer exception thrown when using HTTPS client connection. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2, Tomcat 5.5.25Null pointer exception thrown when using HTTPS client connection." Watch "Axis2, Tomcat 5.5.25Null pointer exception thrown when using HTTPS client connection." New topic
Author

Axis2, Tomcat 5.5.25Null pointer exception thrown when using HTTPS client connection.

Steve Wu
Greenhorn

Joined: Nov 28, 2007
Posts: 4
Hi
I configure my Tomcat5.5.25 for SSL connection. I can access my Axis2 Webservices through "https://localhost:8443/mytest/services/LoginService".

I setup a client to use HTTPS to call a web service method as follow:

System.setProperty( "javax.net.ssl.trustStore", "C:/keystore_certs/client.keystore");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");


AuthenticationServiceStub stub = new AuthenticationServiceStub(https://localhost:8443/mytest/services/LoginService);
// initialize data here

// web service call
stub.login(doc);

When I made this call I get the following exception on the client console:

.apache.axis2.AxisFault: java.lang.NullPointerException
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

Here's the exception thatis thrown in Tomcat console:

java.lang.NullPointerException
at org.apache.axis2.engine.DispatchPhase.fillContextsFromSessionContext(DispatchPhase.java:227)
at org.apache.axis2.engine.DispatchPhase.loadContexts(DispatchPhase.java:156)
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:95)
at org.apache.axis2.engine.Phase.invoke(Phase.java:308)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)


But if I had a browser asscessing my services in HTTPS mode as (https://localhost:8443/mytest/Services/), the above client call succeed.

My question are:
1) why do I have the browser open in order to make a HTTPS webservice call?
2) Am I missing some configuration in Axis2 or Tomcat that can initialize or esteblish HTTPS connection?

Steve
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Axis2, Tomcat 5.5.25Null pointer exception thrown when using HTTPS client connection.
 
Similar Threads
Calling webservice problem - Urgent Please
Using HTTPS with Axis2 1.3
How to speed up AXIS2 HTTPS/SSL connection?
Getting error on sending chinese text
not able to call a service from another service using axis2