cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O hEigeartaigh, Colm" <>
Subject RE: WS-Security failing
Date Thu, 06 Mar 2008 14:10:28 GMT

>    cxfClient.getInInterceptors().add(new SAAJOutInterceptor()); 
>    cxfClient.getInInterceptors().add(createWSS4JOutInterceptor("jmb", 
You're adding "out" interceptors to the "in" interceptor list.


-----Original Message-----
From: John-M Baker [] 
Sent: 06 March 2008 12:23
Subject: WS-Security failing


I've setup a client with WS-Security but it would appear that the tokens

are not being sent with the request. The stack trace looks like this:

Exception in thread "main" 
WSDoAllReceiver: Incoming message does not contain required Security 
  at $Proxy32.echo(Unknown Source)

When I make the same request (without the WS-Security header) through 
SoapUI, the server generates the following response:

            <soapenv:Text xml:lang="en-US">WSDoAllReceiver: Incoming 
message does not contain required Security header</soapenv:Text>

So I'm fairly sure the request is being made, without the WS-Security 
header. Here's my code:

 public TestQuery(URL url)
    Query q = new Query(url);
    // q.getQueryHttpport generates the exception: 
    // org.apache.cxf.BusException: No binding factory for namespace registered.
    qPort = q.getQuerySOAP11PortHttps();

    Client cxfClient = ClientProxy.getClient(qPort);
    cxfClient.getInInterceptors().add(new SAAJOutInterceptor()); 

 protected WSS4JOutInterceptor createWSS4JOutInterceptor(String user, 
String password)
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("action", "UsernameToken Timestamp");
    map.put("user", user);
    map.put("passwordType", "PasswordDigest");
    map.put("passwordCallbackRef", new MyPasswordCallbackHandler(user, 
    return new WSS4JOutInterceptor(map);

Any thoughts?


John Baker
Web SSO 
IT Infrastructure 
Deutsche Bank London



This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

Please refer to for
additional EU corporate and regulatory disclosures.

IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

View raw message