You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Jason Essington <ja...@GreenRiverComputing.com> on 2004/04/06 01:11:55 UTC
using call.setProperty() with WSS4J
I started trying to send some test messages today that set some of the
WSS4J options via code as described in the javadocs for
WSDoAllConstants . . .
This sort of thing:
call.setProperty(WSDoAllConstants.ACTION, "Signature Encrypt");
call.setProperty(WSDoAllConstants.ENCRYPTION_USER, "server");
call.setProperty(WSDoAllConstants.PW_CALLBACK_REF, this);
well it turns out that the DoAllHandlers are trying to find these
properties in the MessageContext rather than the call.
for instance from WSDoAllSender:
msgContext = mc;
/*
* Get the action first.
*/
Vector actions = new Vector();
String action = null;
if ((action = (String) getOption(WSDoAllConstants.ACTION)) == null) {
action = (String) msgContext.getProperty(WSDoAllConstants.ACTION);
}
The set properties never make their way into the message context.
perhaps something like:
msgContext = mc;
call = (Call) msgContext.getProperty(MessageContext.CALL); // added
private field Call call = null
/*
* Get the action first.
*/
Vector actions = new Vector();
String action = null;
if ((action = (String) getOption(WSDoAllConstants.ACTION)) == null) {
action = (String) call.getProperty(WSDoAllConstants.ACTION);
}
Of course there are about a dozen places in WSDoAllSender where the
msgContext.getProperty would have to be changed to call.getProperty
I would be happy to submit patches if this is the right thing to do.
-jason