Hi.
I expose a java interface using xfire. The service sits on a tomcat server
which sits behind Apache with the mod_jk connector:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/jk.workers.properties
JkLogFile logs/mod_jk.log
JkExtractSSL On
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
#JkMount /gridsphere/* ajp13
JkMount /manager/* ajp13
JkMount /my_service/* ajp13
Everything works fine when I connect unencrypted via port 80. But when I
try a https connection over port 443 I get the below exception.
To init the client I use:
ProtocolSocketFactory easy = new EasySSLProtocolSocketFactory();
Protocol protocol = new Protocol("https", easy, 443);
Protocol.registerProtocol("https", protocol);
Service serviceModel = new
ObjectServiceFactory().create(ServiceInterface.class,null,"http://nw.vpac.org/my-service",null);
XFireProxyFactory serviceFactory = new XFireProxyFactory();
ServiceInterface serviceInterface = (ServiceInterface)
serviceFactory.create(serviceModel, interfaceUrl);
Client client = Client.getInstance(serviceInterface);
client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0");
That should be enough, shouldn't it?
Ok, here's the exception:
22:42:41,624 ERROR HttpChannel:144 - java.net.ConnectException: Connection
refused
org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send
message.
org.codehaus.xfire.fault.XFireFault: Couldn't send message.
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30)
at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy0.login(Unknown Source)
at
org.vpac.nw.client.view.swing.login.MyProxyPanel.login(MyProxyPanel.java:166)
...
...
...
Caused by: org.codehaus.xfire.XFireException: Couldn't send message.
at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:145)
at
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
... 48 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:548)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:392)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
at
org.codehaus.xfire.transport.http.EasySSLProtocolSocketFactory.createSocket(EasySSLProtocolSocketFactory.java:182)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:369)
at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)
... 50 more
Any ideas? I found some post mentioning setting (http-)proxies. I don't
need to use these, do I? If so, why?
Thanks in advance.
Cheers,
Markus
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email