camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: How to add HTTP Basic and Digest Auth on CXF component
Date Fri, 15 Mar 2013 22:55:37 GMT
The cxf component supports basic auth (we use it in one of our project).
Google will help you to find a code snippet...

Sent from a mobile device
Am 15.03.2013 23:27 schrieb "santhosh" <ramukhsohtnas.g@gmail.com>:

> If you dont get it sorted out with a CXF client,the simplest way would be
> send the soap body to the route.It would suffice to make a post request
> with
> authorization header to get Basic auth working.It can be
> HttpConnection,HttpClient,Camel using HttpClient.
>
> <route>
>
>
>                                          <from
> uri="file:C:/soapEnvelopeInput.txt">
>                                         <setHeader
> headerName="CamelHttpMethod">
>                                                 <constant>POST</constant>
>                                         </setHeader>
>                                         <setHeader
> headerName="Authorization"> <constant>Basic
> userencoded:passencoded</constant>
>                                                 </setHeader>
>
>
>
>                                         <to uri="http:Serviceurl"></to>
> </route>
>
> or you can simply write a HttpClient and set the authorization
> header.Nothing to with camel.Just make sure the body is SoapEnvelope.
>
> for example something like this body will work
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope
> "
> xmlns:a="http://www.w3.org/2005/08/addressing">
>                         <soap-env:Header>
>
> </soap-env:Header>
>                         <soap-env:Body>
>                             ] <someContent>
>                         </soap-env:Body>
>                     </soap-env:Envelope>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-add-HTTP-Basic-and-Digest-Auth-on-CXF-component-tp5729234p5729272.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message