List extElements = bindingOperation.getExtensibilityElements();
private SOAPOperation getSOAPOperation() { List<?> extensibilityElements2= fOperation.getExtensibilityElements(); for (Object supposedSOAPOperation : extensibilityElements2) { if (supposedSOAPOperation instanceof SOAPOperation) { return ((SOAPOperation) supposedSOAPOperation); } } return null; }
/** * Returns whether the provided binding operation is of URL Replacement type * * @param bindingOperation Binding operation * @return whether the provided binding operation is of URL Replacement type */ private boolean isUrlReplacement(BindingOperation bindingOperation) { List extensibilityElements = bindingOperation.getExtensibilityElements(); if (extensibilityElements != null) { for (Object e : extensibilityElements) { if (e instanceof HTTPUrlReplacement) { return true; } } } return false; }
public static SOAPOperation getSOAPOperation(BindingOperation operation) { SOAPOperation soapOp = null; List extensibilityElements = operation.getExtensibilityElements(); for (int i = 0; i < extensibilityElements.size(); i++) { Object element = extensibilityElements.get(i); if (element instanceof SOAPOperation) { soapOp = (SOAPOperation) element; } } return soapOp; } }
public String getSOAPOperationStyle(BindingOperation bop) { String style = ""; Iterator ite = bop.getExtensibilityElements().iterator(); while (ite.hasNext()) { Object obj = ite.next(); if (obj instanceof SOAPOperation) { SOAPOperation soapOperation = (SOAPOperation)obj; style = soapOperation.getStyle(); break; } } return style; }
private Map getSoapOperationProp(BindingOperation bop) { Map<String, Object> soapOPProp = new HashMap<String, Object>(); if (bop.getExtensibilityElements() != null) { Iterator ite = bop.getExtensibilityElements().iterator(); while (ite.hasNext()) { Object obj = ite.next(); if (obj instanceof SOAPOperation) { SOAPOperation soapOP = (SOAPOperation)obj; soapOPProp.put(this.soapOPAction, soapOP.getSoapActionURI()); soapOPProp.put(this.soapOPStyle, soapOP.getStyle()); } } } return soapOPProp; }
private String getHTTPLocation(String operationName) { for (Object bindingOperation : httpBinding.getBindingOperations()) { if (((BindingOperation) bindingOperation).getName().equals(operationName)) { List<Object> extElements = ((BindingOperation) bindingOperation).getExtensibilityElements(); if (extElements.size() == 0) { throw new RuntimeException(); } else if (extElements.size() > 1) { throw new RuntimeException(); } else { return ((HTTPOperation) extElements.get(0)).getLocationURI(); } } } throw new NullPointerException("HTTP Operation's location attribute is null."); }
/** * A util method that returns the SOAP style included in the binding * operation * * @param bindingOp */ private String getSOAPStyle(BindingOperation bindingOp) { List extensibilityElements = bindingOp.getExtensibilityElements(); for (int i = 0; i < extensibilityElements.size(); i++) { Object extElement = extensibilityElements.get(i); if (extElement instanceof SOAPOperation) { return ((SOAPOperation) extElement).getStyle(); } else if (extElement instanceof SOAP12Operation) { return ((SOAP12Operation) extElement).getStyle(); } } return null; }
private void addOperation(BindingOperation bindingOperation, boolean isOneway) throws Exception { String name = null; Iterator<?> i = bindingOperation.getExtensibilityElements().iterator(); while (i.hasNext()) { org.apache.cxf.binding.corba.wsdl.OperationType opType = (org.apache.cxf.binding.corba.wsdl.OperationType)i .next(); name = opType.getName(); if (name.startsWith("_get_") || name.startsWith("_set_")) { createIdlAttribute(opType, name); } else { createIdlOperation(opType, name, isOneway); } root.flush(); } }
/** * Retrieves SoapAction parameter in a BindingOperation * * @param bindingOperation The given binding operation * @return The soap action or <code>null</code> if not present */ @SuppressWarnings("unchecked") public static String getSoapAction(BindingOperation bindingOperation) { final List<ExtensibilityElement> list = bindingOperation.getExtensibilityElements(); final SOAPOperation soapOperation = WsdlUtil.getExtensibilityElement(list, SOAPOperation.class); if (soapOperation != null) return soapOperation.getSoapActionURI(); return null; }
public String getSOAPAction() { if (soapAction == null) { SOAPOperation soapOp = getExtensibilityElement(bindingOp.getExtensibilityElements(), SOAPOperation.class); if (soapOp != null) { soapAction = soapOp.getSoapActionURI(); } if (soapAction == null) { soapAction = ""; } } return soapAction; } public String getTargetNamespace() {
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
WSDLFactory factory = WSDLFactory.newInstance(); WSDLReader reader = factory.newWSDLReader(); Definition definition = reader.readWSDL("http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"); Binding binding = definition.getBinding(new QName("http://tempuri.org/", "TempConvertSoap")); BindingOperation operation = binding.getBindingOperation("CelsiusToFahrenheit", null, null); List extensions = operation.getExtensibilityElements(); if (extensions != null) { for (int i = 0; i < extensions.size(); i++) { ExtensibilityElement extElement = (ExtensibilityElement) extensions.get(i); // .... if (extElement instanceof SOAPOperation) { SOAPOperation soapOp = (SOAPOperation) extElement; System.out.println(soapOp.getSoapActionURI()); } // .... } }
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
protected String getSOAPAction(String operationName) { Binding binding = wsBinding.getBinding(); if (binding != null) { for (Object o : binding.getBindingOperations()) { BindingOperation bop = (BindingOperation)o; if (bop.getName().equalsIgnoreCase(operationName)) { for (Object o2 : bop.getExtensibilityElements()) { if (o2 instanceof SOAPOperation) { return ((SOAPOperation)o2).getSoapActionURI(); } } } } } return null; } }
public SOAPBinding.Style getSOAPStyle() { if (style == null) { SOAPOperation soapOperation = getExtensibilityElement(bindingOp.getExtensibilityElements(), SOAPOperation.class); if (soapOperation != null && soapOperation.getStyle() != null && !"".equals(soapOperation.getStyle())) { style = SOAPBinding.Style.valueOf(soapOperation.getStyle().toUpperCase()); } if (style == null) { style = cache.getStyle(); } } return style; }
public String getSOAPAction(QName serviceQname) { Binding binding = getFirstPortBinding(serviceQname); if (binding == null) { return null; } List operations = binding.getBindingOperations(); for (Object opObj : operations) { BindingOperation operation = (BindingOperation)opObj; List exElements = operation.getExtensibilityElements(); for (Object elObj : exElements) { ExtensibilityElement exElement = (ExtensibilityElement)elObj; if (isSoapOperation(exElement)) { SOAPOperation soapOperation = (SOAPOperation)exElement; return soapOperation.getSoapActionURI(); } } } return null; }