I need to add a UsernameToken WS-Security header to a SOAP client. I can't 
find any information on how to do this inside AppEngine.

>From what I can tell, this is JAX-WS implementation specific.

If I was using CXF, it would look something like this:

        PartnerAPI service = new PartnerAPI();
        api = service.getSoap();
        Client client = org.apache.cxf.frontend.ClientProxy.getClient(api);

        // Setup authentication
        Map outProps = new HashMap();
        outProps.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
        outProps.put(WSHandlerConstants.USER, "jrodriguez");

        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
        outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new 
EmailServicePasswordTokenHandler());

        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
        client.getOutInterceptors().add(wssOut);

Both org.apache.cxf.endpoint.Client and 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor are CXF specific, and 
AppEngine bails if I include the CXF jars.

How would I go about adding a UsernameToken in AppEngine?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/0s7SdDOyAJAJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to