Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also set policy credentials for message level policies #434

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,26 @@ protected void collectPolicies(List<PolicyAlternativeHolder> alternatives) {
//This will be used for setting credentials like spVersion... etc for binding level policies
setPolicyCredentials(endpointPolicy);

//This will be used for setting credentials like spVersion... etc for operation level policies
//This will be used for setting credentials like spVersion... etc for operation and message level policies
for (WSDLBoundOperation operation : tubeConfig.getWSDLPort().getBinding().getBindingOperations()) {
QName operationName = new QName(operation.getBoundPortType().getName().getNamespaceURI(), operation.getName().getLocalPart());
PolicyMapKey operationKey = PolicyMap.createWsdlOperationScopeKey(serviceName, portName, operationName);
Policy operationPolicy = wsPolicyMap.getOperationEffectivePolicy(operationKey);
setPolicyCredentials(operationPolicy);

PolicyMapKey messageKey = PolicyMap.createWsdlMessageScopeKey(
serviceName, portName, operationName);
Policy inputMessagePolicy = wsPolicyMap.getInputMessageEffectivePolicy(messageKey);
setPolicyCredentials(inputMessagePolicy);
Policy outputMessagePolicy = wsPolicyMap.getOutputMessageEffectivePolicy(messageKey);
setPolicyCredentials(outputMessagePolicy);
for (WSDLFault fault : operation.getOperation().getFaults()) {
PolicyMapKey faultKey = PolicyMap.createWsdlFaultMessageScopeKey(
serviceName, portName, operationName,
new QName(operationName.getNamespaceURI(), fault.getName()));
Policy faultPolicy = wsPolicyMap.getFaultMessageEffectivePolicy(faultKey);
setPolicyCredentials(faultPolicy);
}
}

if (endpointPolicy == null) {
Expand Down