private static final String CIPHER_ELEMENT = "//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue";
public static void optimize(SOAPEnvelope env, Vector expressions, Map namespaces) throws RampartException {
SimpleNamespaceContext nsCtx = new SimpleNamespaceContext();
nsCtx.addNamespace(WSConstants.ENC_PREFIX,WSConstants.ENC_NS);
nsCtx.addNamespace(WSConstants.SIG_PREFIX,WSConstants.SIG_NS);
nsCtx.addNamespace(WSConstants.WSSE_PREFIX,WSConstants.WSSE_NS);
nsCtx.addNamespace(WSConstants.WSU_PREFIX,WSConstants.WSU_NS);
Iterator keys = namespaces.keySet().iterator();
while(keys.hasNext()){
String strPrefix = (String)keys.next();
String strNS = (String)namespaces.get(strPrefix);
nsCtx.addNamespace(strPrefix,strNS);
}
try {
for(int i=0; i<expressions.size(); i++){
String exp = (String)expressions.get(i);