You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2012/06/28 11:11:45 UTC
Re: WebClient request to HTTPS URL
On 27/06/12 18:50, Ganesan, Chandru wrote:
> Hi
>
> I could successfully use WebClient to make plain HTTP requests to the server. Now I'd like to change the request URL to HTTPS. Is there any special handling needed for this in the client code.
>
> I'm getting following error when accessing an HTTPS URL:
>
> [No Trust Decider for Conduit '{https://<suppressing the url in email>:443} WebClient.http-conduit'. An afirmative Trust Decision is assumed.]
> [Interceptor for {https:// ://<suppressing the url in email>:443}WebClient has thrown exception, unwinding now]
> org.apache.cxf.interceptor.Fault: Could not send Message.
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
> at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:595)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:576)
> at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:323)
> at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:390)
>
> Appreciate the help
Please see
http://cxf.apache.org/docs/secure-jax-rs-services.html#SecureJAX-RSServices-Configuringclients
http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-ConfiguringanHTTPConduitfromSpring
You can also experiment with setting the conduit from the code, example,
HTTPConduit conduit = WebClient.getConfig(client).getHTTPConduit();
// set TLS properties
This blog from Arul shows the example:
http://aruld.info/programming-ssl-for-jetty-based-cxf-services/
Sergey
>
> Thanks
> Chandru
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com