Methods Summary |
---|
public SignatureTargetCreator | getTargetCreator()
return targetCreator;
|
public void | process(com.sun.xml.ws.security.policy.SignedParts signedParts, SignaturePolicy.FeatureBinding binding)
Iterator tv = signedParts.getHeaders();
if(SecurityPolicyUtil.isSignedPartsEmpty(signedParts)){
if(!allHeaders){
SignatureTarget target = targetCreator.newURISignatureTarget("");
target.setValue(SignatureTarget.ALL_MESSAGE_HEADERS);
target.isSOAPHeadersOnly(true);
binding.addTargetBinding(target);
target.setContentOnly(contentOnly);
allHeaders = true;
}
if(!seenBody){
SignatureTarget target = targetCreator.newQNameSignatureTarget(Target.BODY_QNAME);
binding.addTargetBinding(target);
target.setContentOnly(contentOnly);
seenBody = true;
}
}else{
while(tv.hasNext()){
Header ht = (Header)tv.next();
if(!allHeaders && !seenSignTarget(ht)){
SignatureTarget target = targetCreator.newQNameSignatureTarget(new QName(ht.getURI(),ht.getLocalName()));
target.isSOAPHeadersOnly(true);
target.setContentOnly(contentOnly);
binding.addTargetBinding(target);
}
}
if(signedParts.hasBody()){
if(!seenBody){
SignatureTarget target = targetCreator.newQNameSignatureTarget(Target.BODY_QNAME);
target.setContentOnly(contentOnly);
binding.addTargetBinding(target);
seenBody = true;
}
}
}
|
public void | process(com.sun.xml.ws.security.policy.SignedElements signedElements, SignaturePolicy.FeatureBinding binding)
Iterator<String> itr = signedElements.getTargets();
while(itr.hasNext()){
String xpathTarget = itr.next();
SignatureTarget target = targetCreator.newXpathSignatureTarget(xpathTarget);
target.setContentOnly(contentOnly);
// target.setXPathVersion(signedElements.)
binding.addTargetBinding(target);
}
|
public void | process(javax.xml.namespace.QName targetName, SignaturePolicy.FeatureBinding binding)
SignatureTarget target = targetCreator.newQNameSignatureTarget(targetName);
binding.addTargetBinding(target);
|
private boolean | seenSignTarget(com.sun.xml.ws.security.policy.Header name)
// Iterator<Header> itr = signParts.iterator();
// while(itr.hasNext()){
// Header header = itr.next();
// if(header.getLocalName().equals(name.getLocalName()) && header.getURI().equals(name.getURI())){
// return true;
// }
// }
if(signParts.contains(name)){
return true;
}
signParts.add(name);
return false;
|