Skip to content
Permalink
Browse files
Add support for streaming WS-Security with the Dispatch API
git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1567968 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
coheigea committed Feb 13, 2014
1 parent 5065d9b commit 299f085b723321401460e4fc8343563f795b6b73
Showing 1 changed file with 17 additions and 5 deletions.
@@ -482,7 +482,7 @@ protected List<SecurityEventListener> configureSecurityEventListeners(
private PolicyEnforcer createPolicyEnforcer(
EndpointInfo endpointInfo, SoapMessage msg
) throws WSSPolicyException {

EffectivePolicy dispatchPolicy = null;
List<OperationPolicy> operationPolicies = new ArrayList<OperationPolicy>();
Collection<BindingOperationInfo> bindingOperationInfos = endpointInfo.getBinding().getOperations();
for (Iterator<BindingOperationInfo> bindingOperationInfoIterator =
@@ -502,13 +502,25 @@ private PolicyEnforcer createPolicyEnforcer(
if (MessageUtils.isRequestor(msg)) {
policy =
(EffectivePolicy)bindingOperationInfo.getProperty("policy-engine-info-client-response");
MessageInfo messageInfo = bindingOperationInfo.getOutput().getMessageInfo();
localName = messageInfo.getName().getLocalPart();
if (!messageInfo.getMessageParts().isEmpty()) {
localName = messageInfo.getMessagePart(0).getConcreteName().getLocalPart();
// Save the Dispatch Policy as it may be used on another BindingOperationInfo
if (policy != null
&& "http://cxf.apache.org/jaxws/dispatch".equals(operationName.getNamespaceURI())) {
dispatchPolicy = policy;
}
if (bindingOperationInfo.getOutput() != null) {
MessageInfo messageInfo = bindingOperationInfo.getOutput().getMessageInfo();
localName = messageInfo.getName().getLocalPart();
if (!messageInfo.getMessageParts().isEmpty()
&& messageInfo.getMessagePart(0).getConcreteName() != null) {
localName = messageInfo.getMessagePart(0).getConcreteName().getLocalPart();
}
}
}
SoapOperationInfo soapOperationInfo = bindingOperationInfo.getExtensor(SoapOperationInfo.class);
if (soapOperationInfo != null && policy == null && dispatchPolicy != null) {
policy = dispatchPolicy;
}

if (policy != null && soapOperationInfo != null) {
String soapNS;
BindingInfo bindingInfo = bindingOperationInfo.getBinding();

0 comments on commit 299f085

Please sign in to comment.