//To check: Is this sufficient, any edge cases I need to take care
QName serviceName = tubeConfig.getWSDLPort().getOwner().getName();
QName portName = tubeConfig.getWSDLPort().getName();
//Review: will this take care of EndpointPolicySubject
//PolicyMerger policyMerge = PolicyMerger.getMerger();
PolicyMapKey endpointKey = PolicyMap.createWsdlEndpointScopeKey(serviceName, portName);
//createWsdlEndpointScopeKey(serviceName,portName);
//Review:Will getEffectivePolicy return null or empty policy ?.
Policy endpointPolicy = wsPolicyMap.getEndpointEffectivePolicy(endpointKey);
//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
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);
}
if (endpointPolicy == null) {