public void handleMessage(Message message) throws Fault { BindingOperationInfo bop = message.getExchange().getBindingOperationInfo(); if (bop == null || !bindingName.equals(bop.getBinding().getName())) { return; } Object o = message.getContent(soapMsgClass); if (o != null) { doFromSoapMessage(message, o); } else if (DataSource.class.isAssignableFrom(type)) { doDataSource(message); } }
BindingOperationInfo boi = getBindingOperationInfo(exchange); if (boi != null) { ret = boi.getBinding().getService().getName(); ret = boi.getBinding().getService().getInterface().getName();
public void handleMessage(Message message) throws Fault { BindingOperationInfo bop = message.getExchange().getBindingOperationInfo(); if (bop != null && !bindingName.equals(bop.getBinding().getName())) { return;
public void updateBindingOperation(BindingOperationInfo boi) { Method m = getMethodDispatcher().getMethod(boi); sendEvent(FactoryBeanListener.Event.BINDING_OPERATION_CREATED, boi.getBinding(), boi, m); }
public void handleMessage(Message message) throws Fault { BindingOperationInfo bop = message.getExchange().getBindingOperationInfo(); if (bop == null || !bindingName.equals(bop.getBinding().getName())) { return; } Object o = message.getContent(soapMsgClass); if (o != null) { doFromSoapMessage(message, o); } else if (DataSource.class.isAssignableFrom(type)) { doDataSource(message); } }
private boolean checkBindingOperationFault(BindingFaultInfo bfi) { return (bfi.getFaultInfo() != null) && (bfi.getFaultInfo().getFaultName() != null) && (bfi.getBindingOperation().getName() != null) && (bfi.getBindingOperation().getBinding() != null) && (bfi.getBindingOperation().getBinding().getName() != null) && wsdl11XPointer.matchesBindingOperationFault( bfi.getFaultInfo().getFaultName().getNamespaceURI(), bfi.getBindingOperation().getBinding().getName().getLocalPart(), bfi.getBindingOperation().getName().getLocalPart(), bfi.getFaultInfo().getFaultName().getLocalPart()); }
@Override public boolean appliesTo(BindingOperationInfo boi) { if (boi == null) { return false; } if ((boi.getBinding() != null) && (boi.getBinding().getName() != null) && wsdl11XPointer.matchesBinding( boi.getBinding().getName().getNamespaceURI(), boi.getBinding().getName().getLocalPart())) { return true; } if ((boi.getName() != null) && (boi.getBinding() != null) && (boi.getBinding().getName() != null) && wsdl11XPointer.matchesBindingOperation( boi.getBinding().getName().getNamespaceURI(), boi.getBinding().getName().getLocalPart(), boi.getName().getLocalPart())) { return true; } return (boi.getOperationInfo() != null) && (boi.getOperationInfo().getInterface() != null) && (boi.getOperationInfo().getInterface().getName() != null) && (boi.getOperationInfo().getName() != null) && wsdl11XPointer.matchesPortTypeOperation( boi.getOperationInfo().getInterface().getName().getNamespaceURI(), boi.getOperationInfo().getInterface().getName().getLocalPart(), boi.getOperationInfo().getName().getLocalPart()); }
private boolean checkBindingOperationFault(BindingFaultInfo bfi) { return (bfi.getFaultInfo() != null) && (bfi.getFaultInfo().getFaultName() != null) && (bfi.getBindingOperation().getName() != null) && (bfi.getBindingOperation().getBinding() != null) && (bfi.getBindingOperation().getBinding().getName() != null) && wsdl11XPointer.matchesBindingOperationFault( bfi.getFaultInfo().getFaultName().getNamespaceURI(), bfi.getBindingOperation().getBinding().getName().getLocalPart(), bfi.getBindingOperation().getName().getLocalPart(), bfi.getFaultInfo().getFaultName().getLocalPart()); }
private Map<String, Object> getSoapOperationProp(BindingOperationInfo bop) { Map<String, Object> soapOPProp = new HashMap<>(); if (bop.getExtensor(ExtensibilityElement.class) != null) { for (ExtensibilityElement ext : bop.getExtensors(ExtensibilityElement.class)) { if (SOAPBindingUtil.isSOAPOperation(ext)) { SoapOperation soapOP = SOAPBindingUtil.getSoapOperation(ext); soapOPProp.put(this.soapOPAction, soapOP.getSoapActionURI()); soapOPProp.put(this.soapOPStyle, soapOP.getStyle()); } } } else { for (ExtensibilityElement ext : bop.getBinding().getExtensors(ExtensibilityElement.class)) { if (SOAPBindingUtil.isSOAPOperation(ext)) { SoapOperation soapOP = SOAPBindingUtil.getSoapOperation(ext); soapOPProp.put(this.soapOPAction, soapOP.getSoapActionURI()); soapOPProp.put(this.soapOPStyle, soapOP.getStyle()); } } } return soapOPProp; }
/** * The effective policy for a WSDL operation policy subject is calculated in relation to a * specific port, and includes the element policy of the wsdl11:portType/wsdl11:operation * element that defines the operation merged with that of the corresponding * wsdl11:binding/wsdl11:operation element. * * @param bi the BindingOperationInfo identifying the operation in relation to a port * @return the effective policy */ public Policy getEffectivePolicy(BindingOperationInfo bi, Message m) { DescriptionInfo di = bi.getBinding().getDescription(); Policy p = getElementPolicy(bi, false, di); p = mergePolicies(p, getElementPolicy(bi.getOperationInfo(), false, di)); return p; }
/** * The effective policy for a WSDL operation policy subject is calculated in relation to a * specific port, and includes the element policy of the wsdl11:portType/wsdl11:operation * element that defines the operation merged with that of the corresponding * wsdl11:binding/wsdl11:operation element. * * @param bi the BindingOperationInfo identifying the operation in relation to a port * @return the effective policy */ public Policy getEffectivePolicy(BindingOperationInfo bi, Message m) { DescriptionInfo di = bi.getBinding().getDescription(); Policy p = getElementPolicy(bi, false, di); p = mergePolicies(p, getElementPolicy(bi.getOperationInfo(), false, di)); return p; }
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; }
protected void addMessageFromBinding(ExtensibilityElement ext, BindingOperationInfo bop, boolean isInput) { SoapHeader header = SOAPBindingUtil.getSoapHeader(ext); ServiceInfo serviceInfo = bop.getBinding().getService(); if (header != null && header.getMessage() == null) { throw new RuntimeException("Problem with WSDL: soap:header element" + " for operation " + bop.getName() + " under binding " + bop.getBinding().getName() + " does not contain a valid message attribute."); } if (header != null && serviceInfo.getMessage(header.getMessage()) == null) { Definition def = (Definition)serviceInfo.getProperty(WSDLServiceBuilder.WSDL_DEFINITION); SchemaCollection schemas = serviceInfo.getXmlSchemaCollection(); if (def != null && schemas != null) { QName qn = header.getMessage(); javax.wsdl.Message msg = findMessage(qn, def); if (msg != null) { addOutOfBandParts(bop, msg, schemas, isInput, header.getPart()); serviceInfo.refresh(); } else { throw new RuntimeException("Problem with WSDL: soap:header element" + " for operation " + bop.getName() + " is referring to an undefined wsdl:message element: " + qn); } } } } private javax.wsdl.Message findMessage(QName qn, Definition def) {
public void handleMessage(Message message) throws Fault { Exchange ex = message.getExchange(); message.put(LocalConduit.DIRECT_DISPATCH, Boolean.TRUE); message.put(LocalTransportFactory.MESSAGE_INCLUDE_PROPERTIES, includes); BindingOperationInfo bop = ex.getBindingOperationInfo(); message.put(ObjectBinding.OPERATION, bop.getName()); message.put(ObjectBinding.BINDING, bop.getBinding().getName()); }
@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; } }
public Policy getEffectivePolicy(BindingFaultInfo bfi, Message m) { ServiceInfo si = bfi.getBindingOperation().getBinding().getService(); DescriptionInfo di = si.getDescription(); Policy p = getElementPolicy(bfi, false, di); FaultInfo fi = bfi.getFaultInfo(); p = mergePolicies(p, getElementPolicy(fi, true, di)); Extensible ex = getMessageTypeInfo(fi.getName(), di); p = mergePolicies(p, getElementPolicy(ex, false, di)); return p; }
public Policy getEffectivePolicy(BindingFaultInfo bfi, Message m) { ServiceInfo si = bfi.getBindingOperation().getBinding().getService(); DescriptionInfo di = si.getDescription(); Policy p = getElementPolicy(bfi, false, di); FaultInfo fi = bfi.getFaultInfo(); p = mergePolicies(p, getElementPolicy(fi, true, di)); Extensible ex = getMessageTypeInfo(fi.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; }
/** * 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; }