You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Fernando Cesar da Silva <fs...@synchro.com.br> on 2014/04/03 16:38:01 UTC

Re: How to consume a Rest Web Service passing through a proxy server


Thanks for the help.

One more question, what if my proxy (not NTLM) require user/pass to authenticate? The CXF Client Element doesn't have these attributes.

Regards.
Fernando Cesar

----- Mensagem original -----
De: "Aki Yoshida" <el...@gmail.com>
Para: users@camel.apache.org
Enviadas: Quarta-feira, 12 de março de 2014 18:15:57
Assunto: Re: How to consume a Rest Web Service passing through a proxy server

If you are using the cxf component, you will need to configure the
client setting in the cxf component.
Here is the link:
https://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Theclientelement

regards, aki

2014-03-12 20:02 GMT+01:00 Fernando Cesar da Silva <fs...@synchro.com.br>:
> Hi,
>
> I'm using CXFRS Component to consume a Rest Web Service and everything is working fine so far.
>
> Now I have to make the connection go through a proxy server.
>
> Using the HTTP Component, I have explicitly set the proxy in CamelContext and the connection reach the proxy as expected, but the CXFRS Component seems to ignore these settings.
>
>
>
>
>
> CamelContext context = obterCamelContext()
> context.getProperties().put("http.proxyHost","cavmtapp99")
> context.getProperties().put("http.proxyPort","3128")
>
>
>
>
> How / where could I set my proxy host and port to the CXFRS Component?
>
>
>
>
> Thanks!
> Fernando Cesar
>

Re: How to consume a Rest Web Service passing through a proxy server

Posted by Richard Kettelerij <ri...@gmail.com>.
You should be able to just specify the username and password in the URL
since Camel 2.12.3. See available options: http://camel.apache.org/cxf.html.
E.g.

to("cxf://.....&username=foo&password=bar");

Regards,
Richard
http://richardlog.com


On Thu, Apr 3, 2014 at 4:38 PM, Fernando Cesar da Silva <
fsilva@synchro.com.br> wrote:

>
>
> Thanks for the help.
>
> One more question, what if my proxy (not NTLM) require user/pass to
> authenticate? The CXF Client Element doesn't have these attributes.
>
> Regards.
> Fernando Cesar
>
> ----- Mensagem original -----
> De: "Aki Yoshida" <el...@gmail.com>
> Para: users@camel.apache.org
> Enviadas: Quarta-feira, 12 de março de 2014 18:15:57
> Assunto: Re: How to consume a Rest Web Service passing through a proxy
> server
>
> If you are using the cxf component, you will need to configure the
> client setting in the cxf component.
> Here is the link:
>
> https://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Theclientelement
>
> regards, aki
>
> 2014-03-12 20:02 GMT+01:00 Fernando Cesar da Silva <fsilva@synchro.com.br
> >:
> > Hi,
> >
> > I'm using CXFRS Component to consume a Rest Web Service and everything
> is working fine so far.
> >
> > Now I have to make the connection go through a proxy server.
> >
> > Using the HTTP Component, I have explicitly set the proxy in
> CamelContext and the connection reach the proxy as expected, but the CXFRS
> Component seems to ignore these settings.
> >
> >
> >
> >
> >
> > CamelContext context = obterCamelContext()
> > context.getProperties().put("http.proxyHost","cavmtapp99")
> > context.getProperties().put("http.proxyPort","3128")
> >
> >
> >
> >
> > How / where could I set my proxy host and port to the CXFRS Component?
> >
> >
> >
> >
> > Thanks!
> > Fernando Cesar
> >
>