private boolean checkPortTypeOperationInOut(BindingMessageInfo bmi) { InterfaceInfo ini = null; if ((bmi.getBindingOperation() != null) && (bmi.getBindingOperation().getOperationInfo() != null)) { ini = bmi.getBindingOperation().getOperationInfo().getInterface(); } if ((ini != null) && (ini.getName() != null) && (bmi.getMessageInfo() != null) && (bmi.getBindingOperation() != null) && (bmi.getBindingOperation().getName() != null)) { if ((Type.INPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesPortTypeOperationInput( ini.getName().getNamespaceURI(), ini.getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } if ((Type.OUTPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesPortTypeOperationOutput( ini.getName().getNamespaceURI(), ini.getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } } return false; }
private boolean checkBindingOperationInOut(BindingMessageInfo bmi) { if ((bmi.getMessageInfo() != null) && (bmi.getMessageInfo().getName() != null) && (bmi.getBindingOperation() != null) && (bmi.getBindingOperation().getName() != null) && (bmi.getBindingOperation().getBinding() != null) && (bmi.getBindingOperation().getBinding().getName() != null)) { if ((Type.INPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesBindingOperationInput( bmi.getMessageInfo().getName().getNamespaceURI(), bmi.getBindingOperation().getBinding().getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } if ((Type.OUTPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesBindingOperationOutput( bmi.getMessageInfo().getName().getNamespaceURI(), bmi.getBindingOperation().getBinding().getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } } return false; }
private boolean checkBindingOperationInOut(BindingMessageInfo bmi) { if ((bmi.getMessageInfo() != null) && (bmi.getMessageInfo().getName() != null) && (bmi.getBindingOperation() != null) && (bmi.getBindingOperation().getName() != null) && (bmi.getBindingOperation().getBinding() != null) && (bmi.getBindingOperation().getBinding().getName() != null)) { if ((Type.INPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesBindingOperationInput( bmi.getMessageInfo().getName().getNamespaceURI(), bmi.getBindingOperation().getBinding().getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } if ((Type.OUTPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesBindingOperationOutput( bmi.getMessageInfo().getName().getNamespaceURI(), bmi.getBindingOperation().getBinding().getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } } return false; }
private boolean checkPortTypeOperationInOut(BindingMessageInfo bmi) { InterfaceInfo ini = null; if ((bmi.getBindingOperation() != null) && (bmi.getBindingOperation().getOperationInfo() != null)) { ini = bmi.getBindingOperation().getOperationInfo().getInterface(); } if ((ini != null) && (ini.getName() != null) && (bmi.getMessageInfo() != null) && (bmi.getBindingOperation() != null) && (bmi.getBindingOperation().getName() != null)) { if ((Type.INPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesPortTypeOperationInput( ini.getName().getNamespaceURI(), ini.getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } if ((Type.OUTPUT == bmi.getMessageInfo().getType()) && wsdl11XPointer.matchesPortTypeOperationOutput( ini.getName().getNamespaceURI(), ini.getName().getLocalPart(), bmi.getBindingOperation().getName().getLocalPart())) { return true; } } return false; }
@Override public boolean appliesTo(BindingMessageInfo bmi) { String serviceName = bmi.getBindingOperation().getBinding().getService().getName().getLocalPart(); if ("JavaFirstAttachmentPolicyService".equals(serviceName) && "usernamepassword".equals(url)) { return ("doInputMessagePolicy".equals(bmi.getBindingOperation().getName().getLocalPart()) && MessageInfo.Type.INPUT.equals(bmi.getMessageInfo().getType())) || ("doOutputMessagePolicy".equals(bmi.getBindingOperation().getName().getLocalPart()) && MessageInfo.Type.OUTPUT.equals(bmi.getMessageInfo().getType())); } else if ("SslUsernamePasswordAttachmentService".equals(serviceName) && "sslusernamepassword".equals(url)) { return MessageInfo.Type.INPUT.equals(bmi.getMessageInfo().getType()); } else { return false; } }
+ bmsg.getBindingOperation().getName().getLocalPart() + " does not specify a part."); + bmsg.getBindingOperation().getName().getLocalPart() + " does not specify a part.");
+ bmsg.getBindingOperation().getName().getLocalPart() + " does not specify a part."); + bmsg.getBindingOperation().getName().getLocalPart() + " does not specify a part.");
/** * The effective policy for a specific WSDL message (input or output) is calculated * in relation to a specific port, and includes the element policy of the wsdl:message * element that defines the message's type merged with the element policy of the * wsdl11:binding and wsdl11:portType message definitions that describe the message. * For example, the effective policy of a specific input message for a specific port * would be the (element policies of the) wsdl11:message element defining the message type, * the wsdl11:portType/wsdl11:operation/wsdl11:input element and the corresponding * wsdl11:binding/wsdl11:operation/wsdl11:input element for that message. * * @param bmi the BindingMessageInfo identifiying the message * @return the effective policy */ public Policy getEffectivePolicy(BindingMessageInfo bmi, Message m) { ServiceInfo si = bmi.getBindingOperation().getBinding().getService(); DescriptionInfo di = si.getDescription(); Policy p = getElementPolicy(bmi, false, di); MessageInfo mi = bmi.getMessageInfo(); p = mergePolicies(p, getElementPolicy(mi, true, di)); Extensible ex = getMessageTypeInfo(mi.getName(), di); p = mergePolicies(p, getElementPolicy(ex, false, di)); return p; }
/** * The effective policy for a specific WSDL message (input or output) is calculated * in relation to a specific port, and includes the element policy of the wsdl:message * element that defines the message's type merged with the element policy of the * wsdl11:binding and wsdl11:portType message definitions that describe the message. * For example, the effective policy of a specific input message for a specific port * would be the (element policies of the) wsdl11:message element defining the message type, * the wsdl11:portType/wsdl11:operation/wsdl11:input element and the corresponding * wsdl11:binding/wsdl11:operation/wsdl11:input element for that message. * * @param bmi the BindingMessageInfo identifiying the message * @return the effective policy */ public Policy getEffectivePolicy(BindingMessageInfo bmi, Message m) { ServiceInfo si = bmi.getBindingOperation().getBinding().getService(); DescriptionInfo di = si.getDescription(); Policy p = getElementPolicy(bmi, false, di); MessageInfo mi = bmi.getMessageInfo(); p = mergePolicies(p, getElementPolicy(mi, true, di)); Extensible ex = getMessageTypeInfo(mi.getName(), di); p = mergePolicies(p, getElementPolicy(ex, false, di)); return p; }