private boolean needRootNode(BindingOperation operation, boolean out) { WSDLHelper helper = new WSDLHelper(); Map parts = helper.getParts(operation.getOperation(), out); return parts.size() != 1; }
public Map<String, WSDLOperationInfo> getAllOperationInfo() { if (allOperationInfo == null) { allOperationInfo = new HashMap<String, WSDLOperationInfo>(); for (Iterator it = binding.getBindingOperations().iterator(); it.hasNext();) { final BindingOperation bindingOperation = (BindingOperation)it.next(); if (bindingOperation.getOperation() != null) { WSDLOperationInfo data = new WSDLOperationInfo(this, bindingOperation); allOperationInfo.put(data.getName(), data); } } } return allOperationInfo; } public WSDLOperationInfo getOperationInfo(String operation) {
/** * Are there any MIME parameters in the given binding's operation? * * @param bEntry * @param operation * @return */ public static boolean hasMIME(BindingEntry bEntry, BindingOperation operation) { Parameters parameters = bEntry.getParameters(operation.getOperation()); if (parameters != null) { for (int idx = 0; idx < parameters.list.size(); ++idx) { Parameter p = (Parameter) parameters.list.get(idx); if (p.getMIMEInfo() != null) { return true; } } } return false; } // hasMIME
/** * Are there any MIME parameters in the given binding's operation? * * @param bEntry * @param operation * @return */ public static boolean hasMIME(BindingEntry bEntry, BindingOperation operation) { Parameters parameters = bEntry.getParameters(operation.getOperation()); if (parameters != null) { for (int idx = 0; idx < parameters.list.size(); ++idx) { Parameter p = (Parameter) parameters.list.get(idx); if (p.getMIMEInfo() != null) { return true; } } } return false; } // hasMIME
/** * Called after the {@link BindingOperation} has been created, but before any sub-elements are added. Subclasses can * override this method to define the binding name, or add extensions to it. * * <p>Default implementation sets the name of the binding operation to the name of the operation. * * @param definition the WSDL4J {@code Definition} * @param bindingOperation the WSDL4J {@code BindingOperation} * @throws WSDLException in case of errors */ protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation) throws WSDLException { bindingOperation.setName(bindingOperation.getOperation().getName()); }
/** * Are there any MIME parameters in the given binding's operation? * * @param bEntry * @param operation * @return */ public static boolean hasMIME(BindingEntry bEntry, BindingOperation operation) { Parameters parameters = bEntry.getParameters(operation.getOperation()); if (parameters != null) { for (int idx = 0; idx < parameters.list.size(); ++idx) { Parameter p = (Parameter) parameters.list.get(idx); if (p.getMIMEInfo() != null) { return true; } } } return false; } // hasMIME
/** * Called after the {@link BindingOperation} has been created, but before any sub-elements are added. Subclasses can * override this method to define the binding name, or add extensions to it. * <p/> * Default implementation sets the name of the binding operation to the name of the operation. * * @param definition the WSDL4J <code>Definition</code> * @param bindingOperation the WSDL4J <code>BindingOperation</code> * @throws WSDLException in case of errors */ protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation) throws WSDLException { bindingOperation.setName(bindingOperation.getOperation().getName()); }
/** * Called after the {@link BindingOperation} has been created, but before any sub-elements are added. Subclasses can * override this method to define the binding name, or add extensions to it. * * <p>Default implementation sets the name of the binding operation to the name of the operation. * * @param definition the WSDL4J {@code Definition} * @param bindingOperation the WSDL4J {@code BindingOperation} * @throws WSDLException in case of errors */ protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation) throws WSDLException { bindingOperation.setName(bindingOperation.getOperation().getName()); }
/** * Called after the {@link BindingOperation} has been created, but before any sub-elements are added. Subclasses can * override this method to define the binding name, or add extensions to it. * * <p>Default implementation sets the name of the binding operation to the name of the operation. * * @param definition the WSDL4J {@code Definition} * @param bindingOperation the WSDL4J {@code BindingOperation} * @throws WSDLException in case of errors */ protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation) throws WSDLException { bindingOperation.setName(bindingOperation.getOperation().getName()); }
public QName getXmlType(String partName) { return srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName(); }
public QName getXmlType(String partName) { return srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName(); }
private Message getMessage(boolean isInput) { Operation operation = bindingOp.getOperation(); if (operation == null) { return null; } if (isInput) { final Input input = operation.getInput(); return input == null ? null : input.getMessage(); } final Output output = operation.getOutput(); return output == null ? null : output.getMessage(); } private SOAPBody getSOAPBody(boolean input) {
public QName getOperationQname(String operationName) throws UnknownOperationException { if (getStyle().equals("document")) { try { // Get the QName of the first element of the input message return ((Part) getBindingOperation(operationName) .getOperation().getInput().getMessage() .getOrderedParts(null).get(0)).getElementName(); } catch (RuntimeException e) { logger.warn("Could not find qname of message for operation " + operationName, e); String ns = getDefinition().getTargetNamespace(); return new QName(ns, operationName); } } else { String ns = getOperationNamespaceURI(operationName); return new QName(ns, operationName); } }
public LightweightOperationInfoBuilder(final BindingOperation bindingOperation, final Method method) throws OpenEJBException { if (bindingOperation == null) { throw new OpenEJBException("No BindingOperation supplied for method " + method.getName()); } final Operation operation = bindingOperation.getOperation(); this.operationName = operation.getName(); this.inputMessage = operation.getInput().getMessage(); this.outputMessage = operation.getOutput() == null ? null : operation.getOutput().getMessage(); this.method = method; }
private Operation findOperation(PortType portType, BindingOperation wsdl4jBindingOperation) { Operation op = wsdl4jBindingOperation.getOperation(); String input = null; if (op != null && op.getInput() != null) { input = op.getInput().getName(); if (":none".equals(input)) { input = null; } } String output = null; if (op != null && op.getOutput() != null) { output = op.getOutput().getName(); if (":none".equals(output)) { output = null; } } Operation op2 = portType.getOperation(op.getName(), input, output); return ((op2 == null) ? op : op2); }
private Operation findOperation(PortType portType, BindingOperation wsdl4jBindingOperation) { Operation op = wsdl4jBindingOperation.getOperation(); String input = null; if (op != null && op.getInput() != null) { input = op.getInput().getName(); if (":none".equals(input)) { input = null; } } String output = null; if (op != null && op.getOutput() != null) { output = op.getOutput().getName(); if (":none".equals(output)) { output = null; } } Operation op2 = portType.getOperation(op.getName(), input, output); return ((op2 == null) ? op : op2); }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null /* || faultName == null*/ ) // may be it's possible to have legal fault with null name return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); if (f == null) return; Message m = f.getMessage(); // message should have only one part if (m == null || m.getParts() == null || m.getParts().size() != 1) return; checkPart((Part) m.getOrderedParts(null).get(0), ctx.getBinding()); }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null /* || faultName == null*/ ) // may be it's possible to have legal fault with null name return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); if (f == null) return; Message m = f.getMessage(); // message should have only one part if (m == null || m.getParts() == null || m.getParts().size() != 1) return; checkPart((Part) m.getOrderedParts(null).get(0), ctx.getBinding()); }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null) return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); // fault message should have 1 part if (f == null || f.getMessage() == null || f.getMessage().getParts().size() != 1) return; Part p = (Part) f.getMessage().getOrderedParts(null).get(0); removePart(f.getMessage().getQName(), p.getName()); }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null) return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); // fault message should have 1 part if (f == null || f.getMessage() == null || f.getMessage().getParts().size() != 1) return; Part p = (Part) f.getMessage().getOrderedParts(null).get(0); removePart(f.getMessage().getQName(), p.getName()); }