Hi Mike,

Turn logging to "DEBUG" and see what the reason for the
"WSSecurityException" was.

Colm.

On Thu, Jan 10, 2013 at 9:14 PM, Mike Thomsen <[email protected]>wrote:

> I'm still fairly new to CXF and Java web services, so please bear with me.
> The service I am calling expects a WS-Security header like this:
>
> <SOAP-ENV:Header>
>     <wsse:Security xmlns:wsse="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> soapenv:mustUnderstand="1">
>         <wsu:Timestamp xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> wsu:Id="Timestamp-29345020">
>             <wsu:Created>2008-11-24T19:17:43.880Z</wsu:Created>
>             <wsu:Expires>2008-11-24T19:22:43.880Z</wsu:Expires>
>         </wsu:Timestamp>
>         <wsse:UsernameToken xmlns:wsu="
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> wsu:Id="UsernameToken-18724539">
>             <wsse:Username>Mike</wsse:Username>
>         </wsse:UsernameToken>
>     </wsse:Security>
> </SOAP-ENV:Header>
>
> (No password)
>
> This is how I have it configured in my beans.xml file:
>
> <jaxws:endpoint id="managementService"
> implementor="com.mycompany.ManagementService" address="/ManagementService">
>         <jaxws:inInterceptors>
>             <bean
> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>                 <constructor-arg>
>                     <map>
>                         <entry key="action" value="UsernameToken
> Timestamp"/>
>                         <entry key="passwordType" value="PasswordNone"/>
>                     </map>
>                 </constructor-arg>
>             </bean>
>         </jaxws:inInterceptors>
>     </jaxws:endpoint>
>
> When I run the client I get this exception:
>
> org.apache.ws.security.WSSecurityException: An error was discovered
> processing the <wsse:Security> header
>
> I know the client (Spring-WS, not CXF) is sending WS-Security headers based
> on the debugging output from it.
>
> Any help would be appreciated.
>
> Thanks,
>
> Mike
>



-- 
Colm O hEigeartaigh

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

Reply via email to