[JBossWS] - Re: How can I do mutual SSL when using JBoss as Web service
by zhijun
I have tried everything I can think of.
- Added the -Djavax.net.ssl.keystore=.... properties in my command to start the JBoss JVM.
- Added the following in my web.xml file
anonymous wrote : <service-ref>
| <service-ref-name>RemoteWebService</service-ref-name>
| <service-interface>javax.xml.rpc.Service</service-interface>
| <wsdl-file>RemoteWebService.wsdl</wsdl-file>
| <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
| <port-component-ref>
| <service-endpoint-interface>
| com.zzz.MyWebService
| </service-endpoint-interface>
| <call-property>
| <prop-name>javax.net.ssl.keyStore</prop-name>
| <prop-value>my.keystore</prop-value>
| </call-property>
| <call-property>
| <prop-name>javax.net.ssl.keyStorePassword</prop-name>
| <prop-value>password</prop-value>
| </call-property>
| <call-property>
| <prop-name>javax.net.ssl.trustStore</prop-name>
| <prop-value>keystore.trust</prop-value>
| </call-property>
| <call-property>
| <prop-name>javax.net.ssl.trustStorePassword</prop-name>
| <prop-value>password</prop-value>
| </call-property>
| </port-component-ref>
| </service-ref>
- I added the following lines in my Web service client that will run in JBoss
System.setProperty("javax.net.ssl.keyStore", "/opt/jboss/jas405/server/myserver/conf/my.keystore");
| System.setProperty("javax.net.ssl.keyStorePassword", "password");
| System.setProperty("javax.net.ssl.trustStore", "/opt/jboss/jas405/server/myserver/conf/trust.keystore");
| System.setProperty("javax.net.ssl.trustStorePassword", "password");
Now when I ran my Web service client in JBoss and when I tried to call the web service, I continued to get the following error in server log:
2007-03-14 10:37:31,054 DEBUG [org.jboss.remoting.Client] invoke called, but our invoker is disconnected, discarding and fetching another fresh invoker for: InvokerLocator [https://....:1443/.../services/MyWebService]
| 2007-03-14 10:37:31,054 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] connect called for: org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker@154fc43
| 2007-03-14 10:37:31,063 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] Setting request header with SOAPAction : ""
| 2007-03-14 10:37:31,063 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] Setting request header with Content-Type : text/xml; charset=UTF-8
| 2007-03-14 10:37:31,098 DEBUG [org.jboss.ws.soap.SOAPContentElement] Transitioning to dom-valid state, MTOM disabled
| 2007-03-14 10:37:31,132 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] Error invoking http client invoker.
| org.jboss.ws.WSException: Invalid HTTP server response [403] - Forbidden
| at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:73)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:175)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at org.apache.jsp.TestWS1_jsp._jspService(TestWS1_jsp.java:86)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 2007-03-14 10:37:31,133 ERROR [org.jboss.ws.jaxrpc.CallImpl] Call invocation failed with unkown Exception
| javax.xml.soap.SOAPException: Could not transmit message
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at org.apache.jsp.TestWS1_jsp._jspService(TestWS1_jsp.java:86)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:201)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189)
| ... 28 more
| Caused by: org.jboss.ws.WSException: Invalid HTTP server response [403] - Forbidden
| at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:73)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:175)
| ... 33 more
| 2007-03-14 10:37:31,135 DEBUG [org.jboss.ws.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.soap.SOAPMessageContextImpl@e782a8
| 2007-03-14 10:37:31,135 INFO [STDOUT] Call invocation failed: Could not transmit message; nested exception is:
| javax.xml.soap.SOAPException: Could not transmit message
I would highly appreciate it if anyone can provide any clue as to what I'm missing or what might be the problem.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027959#4027959
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027959
17 years, 9 months