[ https://issues.apache.org/activemq/browse/SM-690?page=all ]
Fabrice Dewasmes updated SM-690:
--------------------------------
Attachment: patch.txt
ProxyParameters.java
here is a new version of the patch. I've separated the proxy configuration from
the other properties of the endpiont with a nested <http:proxy> element.
Configuration looks like :
<http:endpoint service="eur:PersonService" endpoint="myTarget"
role="provider"
locationURI="https://example.net/webservices/myservice"
wsdlResource="https://example.net/webservices/myservice?WSDL">
<http:proxy>
<http:proxyParameters proxyHost="proxyHost"
proxyPort="8082">
<http:proxyCredentials>
<http:basicAuthCredentials username="testuser"
password="testpass" />
</http:proxyCredentials>
</http:proxyParameters>
</http:proxy>
<http:ssl>
<http:sslParameters keyStore="file:///ks.ks"
keyStorePassword="password"
trustStore="file:///ks.ks"
trustStorePassword="password"
wantClientAuth="true"
needClientAuth="true" />
</http:ssl>
</http:endpoint>
I've not propagated the possibility of setting username and passowrd using the
configuration MBean.
> add ability to setup a proxy for provider endpoints
> ---------------------------------------------------
>
> Key: SM-690
> URL: https://issues.apache.org/activemq/browse/SM-690
> Project: ServiceMix
> Issue Type: Improvement
> Components: servicemix-http
> Affects Versions: 3.0
> Reporter: Fabrice Dewasmes
> Priority: Minor
> Fix For: 3.1
>
> Attachments: patch.txt, patch.txt, ProxyParameters.java
>
>
> Hi !
> I'm trying to proxy (in the servicemix sense) an external web service. This
> external web service is available under https. I've set the SSL parameters on
> the endpoint (see configuration below). However i'm behind non authenticated
> proxy. I've set the usual system properties :
> -Dhttps.proxyHost=myproxyHost.example.org
> -Dhttps.proxyPort=8082
> The endpoint is correctly started but I still get an UnknownHostException. It
> seems that system proxy parameters are not used. Have you got a solution ?
> here are some details :
> - environment : winXP
> - servicemix 3.0-incubating (downloaded yesterday afternoon !)
> - my endpoint configuration :
> <http:endpoint service="pe:PersonService" endpoint="myTarget"
> role="provider"
> locationURI="https://externalWebService.example.org/foo"
> wsdlResource="https://externalWebService.example.org/foo?WSDL"
> soap="true" soapVersion="1.1">
> <http:ssl>
> <http:sslParameters keyStore="file:///mykeystore.ks"
> keyStorePassword="password"
> trustStore="file:///mykeystore.ks"
> trustStorePassword="password" />
> </http:ssl>
> </http:endpoint>
> <http:endpoint service="pe:PersonServiceProxy" endpoint="proxy"
> role="consumer" locationURI="http://0.0.0.0:8192/person/"
> targetService="pe:PersonService" targetEndpoint="myTarget"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out" soap="true"
> soapVersion="1.1" />
> And here is the stack trace :
> 10:58:23,059 WARN [jetty] /person/
> java.lang.Exception: java.net.UnknownHostException:
> externalWebService.example.org
> at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:202)
> at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:443)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:615)
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
> at org.mortbay.jetty.Server.handle(Server.java:265)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:333)
> at
> org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> Caused by: java.net.UnknownHostException: externalWebService.example.org
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> at java.net.Socket.connect(Socket.java:507)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:546)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:390)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:121)
> at
> org.apache.servicemix.http.processors.CommonsHttpSSLSocketFactory.createSocket(CommonsHttpSSLSocketFactory.java:138)
> at
> org.apache.servicemix.http.processors.CommonsHttpSSLSocketFactory.createSocket(CommonsHttpSSLSocketFactory.java:147)
> 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.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> at
> org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:153)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:410)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:177)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:227)
> at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira