You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Sheck, Jacob" <Ja...@windlogics.com> on 2014/01/01 21:39:22 UTC
CXF SOAP web service - Basic Authentication - username password
I have configured a CXF web service using blueprint, with wsdl2java and it works well.
<from uri="cxf:/productservice?bus=#cxf&serviceClass=com.company.services.productservice&wsdlURL=META-INF/wsdl/productservice.wsdl" />
I would like to add http basic authentication, when working with jetty I can get the username and password from the camel headers, and pass the values through my authentication bean. The web service used by cxf and camel in karaf does not expose the username and password this way.
Could anyone explain, or direct me to an example, of how to get the basic authentication http request header values from a request to a cxf web service in karaf?
Thank You
Jacob Sheck
________________________________
CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.
RE: CXF SOAP web service - Basic Authentication - username password
Posted by "Sheck, Jacob" <Ja...@windlogics.com>.
<route id="productservice">
<from uri="cxf:/productservice?bus=#cxf&serviceClass=com.company.services.productservice&wsdlURL=META-INF/wsdl/productservice.wsdl" />
<setProperty propertyName="username">
<header>username</header>
</setProperty>
<setProperty propertyName="password">
<header>password</header>
</setProperty>
<setProperty propertyName="incommingBody">
<simple resultType="java.io.InputStream">${body}</simple>
</setProperty>
<log loggingLevel="WARN" message="${property.username} ${property.password}" />
<!-- blank log message even though SOAPUI log shows the values being sent-->
<!-- Authentication -->
...
</route>
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com]
Sent: Wednesday, January 01, 2014 8:59 PM
To: users@camel.apache.org
Subject: Re: CXF SOAP web service - Basic Authentication - username password
Can I have a look at your camel route?
It looks like the Karaf Servlet transport doesn’t put username and password into the message context.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On January 2, 2014 at 4:39:51 AM, Sheck, Jacob (jacob.sheck@windlogics.com) wrote:
>
> I have configured a CXF web service using blueprint, with wsdl2java
> and it works well.
> > />
> I would like to add http basic authentication, when working with jetty
> I can get the username and password from the camel headers, and pass
> the values through my authentication bean. The web service used by cxf
> and camel in karaf does not expose the username and password this way.
>
> Could anyone explain, or direct me to an example, of how to get the
> basic authentication http request header values from a request to a
> cxf web service in karaf?
>
> Thank You
> Jacob Sheck
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or distribution
> of any kind is strictly prohibited.
> If you are not the intended recipient, please contact the sender via
> reply e-mail and destroy all copies of the original message.
> Thank you.
>
Re: CXF SOAP web service - Basic Authentication - username
password
Posted by Willem Jiang <wi...@gmail.com>.
Can I have a look at your camel route?
It looks like the Karaf Servlet transport doesn’t put username and password into the message context.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On January 2, 2014 at 4:39:51 AM, Sheck, Jacob (jacob.sheck@windlogics.com) wrote:
>
> I have configured a CXF web service using blueprint, with wsdl2java
> and it works well.
> > />
> I would like to add http basic authentication, when working with
> jetty I can get the username and password from the camel headers,
> and pass the values through my authentication bean. The web service
> used by cxf and camel in karaf does not expose the username and
> password this way.
>
> Could anyone explain, or direct me to an example, of how to get
> the basic authentication http request header values from a request
> to a cxf web service in karaf?
>
> Thank You
> Jacob Sheck
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This e-mail message is for the sole
> use of the intended recipient(s) and may contain confidential
> and privileged information. Any unauthorized review, use,
> disclosure or distribution of any kind is strictly prohibited.
> If you are not the intended recipient, please contact the sender
> via reply e-mail and destroy all copies of the original message.
> Thank you.
>