SoapOperationInfo soi = bop.getExtensor(SoapOperationInfo.class); if (soi != null) {
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; }
public Policy getEffectivePolicy(BindingOperationInfo bi, Message m) { return bi.getExtensor(Policy.class); }
public Policy getEffectivePolicy(BindingOperationInfo bi, Message m) { return bi.getExtensor(Policy.class); }
public static SoapOperationInfo getSoapOperationInfo(BindingOperationInfo bindingOpInfo) { SoapOperationInfo soi = bindingOpInfo.getExtensor(SoapOperationInfo.class); if (soi == null && bindingOpInfo.isUnwrapped()) { soi = bindingOpInfo.getWrappedOperation() .getExtensor(SoapOperationInfo.class); } return soi; }
public static SoapOperationInfo getSoapOperationInfo(BindingOperationInfo bindingOpInfo) { SoapOperationInfo soi = bindingOpInfo.getExtensor(SoapOperationInfo.class); if (soi == null && bindingOpInfo.isUnwrapped()) { soi = bindingOpInfo.getWrappedOperation() .getExtensor(SoapOperationInfo.class); } return soi; }
private String getSoapAction(SoapMessage message, BindingOperationInfo boi) { // allow an interceptor to override the SOAPAction if need be String action = (String) message.get(SoapBindingConstants.SOAP_ACTION); // Fall back on the SOAPAction in the operation info if (action == null) { if (boi == null) { action = "\"\""; } else { SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class); action = soi == null ? "\"\"" : soi.getAction() == null ? "\"\"" : soi.getAction(); } } if (!action.startsWith("\"")) { action = new StringBuilder().append("\"").append(action).append("\"").toString(); } return action; }
private String getSoapAction(SoapMessage message, BindingOperationInfo boi) { // allow an interceptor to override the SOAPAction if need be String action = (String) message.get(SoapBindingConstants.SOAP_ACTION); // Fall back on the SOAPAction in the operation info if (action == null) { if (boi == null) { action = "\"\""; } else { SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class); action = soi == null ? "\"\"" : soi.getAction() == null ? "\"\"" : soi.getAction(); } } if (!action.startsWith("\"")) { action = new StringBuilder().append("\"").append(action).append("\"").toString(); } return action; }
public OperationInfo getOperationByAction(String action) { for (BindingOperationInfo b : getOperations()) { SoapOperationInfo opInfo = b.getExtensor(SoapOperationInfo.class); if (opInfo.getAction().equals(action)) { return b.getOperationInfo(); } } return null; }
public OperationInfo getOperationByAction(String action) { for (BindingOperationInfo b : getOperations()) { SoapOperationInfo opInfo = b.getExtensor(SoapOperationInfo.class); if (opInfo.getAction().equals(action)) { return b.getOperationInfo(); } } return null; }
private String getSoapAction(final SoapMessage message, BindingOperationInfo boi) { // allow an interceptor to override the SOAPAction if need be String action = (String) message.get(SoapBindingConstants.SOAP_ACTION); // Fall back on the SOAPAction in the operation info if (action == null) { if (boi == null) { action = "\"\""; } else { final BindingOperationInfo dboi = (BindingOperationInfo) boi.getProperty("dispatchToOperation"); if (null != dboi) { boi = dboi; } final SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class); action = soi == null || StringUtils.isBlank(soi.getAction()) || StringUtils.isBlank(SOAPActionUriPrefix) ? "\"\"" : (SOAPActionUriPrefix + soi.getAction()); } } if (!action.startsWith("\"")) { action = new StringBuilder().append("\"").append(action).append("\"").toString(); } return action; } }
public String getStyle(OperationInfo operation) { SoapOperationInfo opInfo = getOperation(operation.getName()).getExtensor(SoapOperationInfo.class); if (opInfo != null) { return opInfo.getStyle(); } return style; }
private void handleOutBoundMessage(CorbaMessage message, BindingOperationInfo boi) { boolean wrap = false; if (boi.isUnwrappedCapable()) { wrap = true; } OperationType opType = boi.getExtensor(OperationType.class); List<ParamType> paramTypes = opType.getParam(); List<ArgType> params = new ArrayList<>(); for (Iterator<ParamType> iter = paramTypes.iterator(); iter.hasNext();) { ParamType param = iter.next(); if (!param.getMode().equals(ModeType.OUT)) { params.add(param); } } CorbaStreamWriter writer = new CorbaStreamWriter(orb, params, typeMap, service, wrap); message.setContent(XMLStreamWriter.class, writer); }
public String getStyle(OperationInfo operation) { SoapOperationInfo opInfo = getOperation(operation.getName()).getExtensor(SoapOperationInfo.class); if (opInfo != null) { return opInfo.getStyle(); } return style; }
private void handleInBoundMessage(CorbaMessage message, BindingOperationInfo boi) { boolean wrap = false; if (boi.isUnwrappedCapable()) { wrap = true; } OperationType opType = boi.getExtensor(OperationType.class); ArgType returnParam = opType.getReturn(); List<ParamType> paramTypes = opType.getParam(); List<ArgType> params = new ArrayList<>(); if (returnParam != null) { params.add(returnParam); } for (Iterator<ParamType> iter = paramTypes.iterator(); iter.hasNext();) { ParamType param = iter.next(); if (!param.getMode().equals(ModeType.IN)) { params.add(param); } } CorbaStreamWriter writer = new CorbaStreamWriter(orb, params, typeMap, service, wrap); message.setContent(XMLStreamWriter.class, writer); }
public void close(Message message) throws IOException { if (message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT) != null) { BindingOperationInfo boi = message.getExchange().getBindingOperationInfo(); OperationType opType = boi.getExtensor(OperationType.class); try { if (message instanceof CorbaMessage) { buildRequest((CorbaMessage)message, opType); } message.getContent(OutputStream.class).close(); } catch (Exception ex) { LOG.log(Level.SEVERE, "Could not build the corba request"); throw new CorbaBindingException(ex); } } }
/** * Get the soap action for an operation. Will never return null. * * @param operation * @return */ public String getSoapAction(OperationInfo operation) { BindingOperationInfo b = getOperation(operation.getName()); SoapOperationInfo opInfo = b.getExtensor(SoapOperationInfo.class); if (opInfo != null && opInfo.getAction() != null) { return opInfo.getAction(); } return ""; }
/** * Get the soap action for an operation. Will never return null. * * @param operation * @return */ public String getSoapAction(OperationInfo operation) { BindingOperationInfo b = getOperation(operation.getName()); SoapOperationInfo opInfo = b.getExtensor(SoapOperationInfo.class); if (opInfo != null && opInfo.getAction() != null) { return opInfo.getAction(); } return ""; }
private static boolean isActionMatch(SoapMessage message, BindingOperationInfo boi, String action) { SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class); if (soi == null) { return false; } boolean allowNoMatchingToDefault = MessageUtils.getContextualBoolean(message, ALLOW_NON_MATCHING_TO_DEFAULT, false); return action.equals(soi.getAction()) || (allowNoMatchingToDefault && StringUtils.isEmpty(soi.getAction()) || (message.getVersion() instanceof Soap12) && StringUtils.isEmpty(soi.getAction())); }
private static boolean isActionMatch(SoapMessage message, BindingOperationInfo boi, String action) { SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class); if (soi == null) { return false; } boolean allowNoMatchingToDefault = MessageUtils.getContextualBoolean(message, ALLOW_NON_MATCHING_TO_DEFAULT, false); return action.equals(soi.getAction()) || (allowNoMatchingToDefault && StringUtils.isEmpty(soi.getAction()) || (message.getVersion() instanceof Soap12) && StringUtils.isEmpty(soi.getAction())); }