Is that the exact header that you are using? If so then it is incorrect, as
it should be "UsernameToken" and not "UserNameToken".

Colm.

On Thu, Apr 30, 2015 at 2:10 PM, DfCode <[email protected]> wrote:

> May be that this question is trivial, I'm sorry for that..
>
> I developed a SOAP service using CXF+Spring and it work fine. I have some
> problem when I try to secure the service via UserToken on Ws-Security.
>
> This is my configuration (using spring):
>
>
>         <jaxws:endpoint address="/soapservice" implementor="#soapservice">
>                 <jaxws:inInterceptors>
>                         <bean
> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>                                 <constructor-arg>
>                                         <map>
>                                                 <entry key="action"
> value="UsernameToken" />
>                                                 <entry key="passwordType"
> value="PasswordText" />
>                                                 <entry
> key="passwordCallbackRef">
>                                                         <ref
> bean="myPasswordCallback" />
>                                                 </entry>
>                                         </map>
>                                 </constructor-arg>
>                         </bean>
>                 </jaxws:inInterceptors>
>         </jaxws:endpoint>
>
>
>         <bean id="myPasswordCallback"
>
> class="org.uario.seaworkengine.web.services.security.PasswordCallback" />
>
>
>
> IN order to consume the service, I call it using this header:
>
> <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next";
>         soapenv:mustUnderstand="0"
>
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
>         xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>         <wsse:UserNameToken>
>                 <wsse:Username>joe</wsse:Username>
>                 <wsse:Password>joespassword</wsse:Password>
>         </wsse:UserNameToken>
> </wsse:Security>
>
>
> by mean of a java client developed with AXIS. The client works if the Web
> Services is not secured.
>
> The response of the call is:
>
> An error was discovered processing the <wsse:Security> header.
>
>
> Any idea?  In debug mode the myPasswordCallback bean is never used....
>
> That you for your help.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Ws-Security-client-newbie-tp5756790.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to