/** * Constructor. * * @param op * Operation this arg list is for. * @param binding * Binding for the operation. * @param wsdlTypes * Wsdl types. */ protected WsdlOpParameterList( Operation op, Binding binding, WsdlTypes wsdlTypes ) { _wsdlTypes = wsdlTypes; _returnParam = null; _operation = op; _parameterStyle = WsdlOperation.SOAPParameterStyle.BARE; _headerNames = WsdlUtils.getSOAPHeaders( binding, op.getName() ); }
/** * Get a list of all operations defined in this WSDL. * * @return List of WsdlOperations. */ @SuppressWarnings( "unchecked" ) public List<WsdlOperation> getOperations() throws KettleStepException { List<WsdlOperation> opList = new ArrayList<WsdlOperation>(); PortType pt = _port.getBinding().getPortType(); List<Operation> operations = pt.getOperations(); for ( Iterator<Operation> itr = operations.iterator(); itr.hasNext(); ) { WsdlOperation operation = getOperation( itr.next().getName() ); if ( operation != null ) { opList.add( operation ); } } return opList; }
_operationQName = new QName( wsdlTypes.getTargetNamespace(), op.getName() ); _oneway = true; String soapBindingUse = WsdlUtils.getSOAPBindingUse( binding, op.getName() ); if ( "encoded".equals( soapBindingUse ) ) { _bindingUse = SOAPBindingUse.ENCODED; _soapAction = WsdlUtils.getSOAPAction( binding.getBindingOperation( op.getName(), null, null ) );
/** * Generate a WsdlOpParameter from the message part. * * @param part * A list of message part. * @param requesPart * true if part from request message. */ private List<WsdlOpParameter> getParameter( Part part, boolean requesPart ) throws KettleStepException { List<WsdlOpParameter> params = new ArrayList<WsdlOpParameter>(); if ( part.getElementName() != null ) { if ( WsdlUtils.isWrappedParameterStyle( _operation.getName(), !requesPart, part.getName() ) ) { _parameterStyle = WsdlOperation.SOAPParameterStyle.WRAPPED; } params.addAll( resolvePartElement( part ) ); } else { params.add( new WsdlOpParameter( part.getName(), part.getTypeName(), _wsdlTypes.findNamedType( part .getTypeName() ), _wsdlTypes ) ); } return params; }
String opName = op.getName();
operation.getName(), pw); DOMUtils.printAttribute(Constants.ATTR_PARAMETER_ORDER,
private static String toString(List wsdlOperationList) { String result = ""; Iterator wsdlOpIter = wsdlOperationList.iterator(); while (wsdlOpIter.hasNext()) { Object obj = wsdlOpIter.next(); if (obj instanceof Operation) { Operation operation = (Operation)obj; result += operation.getName() + " "; } } return result; }
private List<String> createWSDLOperationNameList(List wsdlOperationList) { List<String> opNameList = new ArrayList<String>(); Iterator wsdlOpIter = wsdlOperationList.iterator(); while (wsdlOpIter.hasNext()) { Object obj = wsdlOpIter.next(); if (obj instanceof Operation) { Operation operation = (Operation)obj; opNameList.add(operation.getName()); } } return opNameList; }
private static Operation getOperation(final PortType portType, final String operationName) { final List<Operation> operations = portType.getOperations(); for (final Operation operation : operations) { if (operation.getName().equals(operationName)) { return operation; } } return null; }
private Map<QName, Operation> getOperations(PortType portType) { Map<QName, Operation> operations = new HashMap<>(); Collection<Operation> pops = CastUtils.cast(portType.getOperations()); for (Operation op : pops) { operations.put(new QName(portType.getQName().getNamespaceURI(), op.getName()), op); } return operations; }
protected void visit(Operation operation) { opInfo = getServiceInfo(portType).addOperation(operation.getName(), null); Element docElem = operation.getDocumentationElement(); if (docElem != null) { String docText = docElem.getNodeValue();// TextContent(); opInfo.setDocumenation(docText); } wop2op.put(operation, opInfo); }
public boolean isMember(Operation o) { // Guard against WSDL4j funny business. if ((o.getInput() == null || o.getInput().getMessage() == null) && (o.getOutput() == null || o.getOutput().getMessage() == null)) { return false; } return o.getName().equals(operationName); } });
public boolean isMember(Operation o) { // Again, guard against WSDL4J's "help" if ((o.getInput() == null || o.getInput().getMessage() == null) && (o.getOutput() == null || o.getOutput().getMessage() == null)) return false; return o.getName().equals(operationName); } });
private BindingOperation getBindingOperation(Definition srcWsdl, PortType srcPortType, Operation srcOperation) throws WSDLException { Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName()); if (srcBinding == null) throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find binding for: " + srcPortType.getQName()); String srcOperationName = srcOperation.getName(); BindingOperation srcBindingOperation = srcBinding.getBindingOperation(srcOperationName, null, null); if (srcBindingOperation == null) throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find binding operation for: " + srcOperationName); return srcBindingOperation; }
private boolean checkR2209(final Operation operation, final BindingOperation bop) { if ((bop.getBindingInput() == null && operation.getInput() != null) || (bop.getBindingOutput() == null && operation.getOutput() != null)) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2209") + "Unbound PortType elements in Operation '" + operation.getName() + "'"); return false; } return true; }
private boolean checkR2209(final Operation operation, final BindingOperation bop) { if ((bop.getBindingInput() == null && operation.getInput() != null) || (bop.getBindingOutput() == null && operation.getOutput() != null)) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2209") + "Unbound PortType elements in Operation '" + operation.getName() + "'"); return false; } return true; }
private Operation getOperation(XmlSchemaCollection xmlSchema, javax.wsdl.Operation operation) { Input input = operation.getInput(); Output output = operation.getOutput(); Map<?, ?> faults = operation.getFaults(); String name = operation.getName(); List<DataType> inputType = getInputType(input, xmlSchema); DataType outputType = getOutputType(output, xmlSchema); List<DataType> faultTypes = getFaultTypes(faults, xmlSchema); Operation op = new Operation(name, inputType, outputType, faultTypes); op.setWsdlName(name); return op; }