/** * 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; }
printOperations(portType.getOperations(), def, pw);
private List<Operation> introspectOperations(PortType portType, WSDLDefinition wsdlDefinition, ModelResolver resolver, Monitor monitor) throws InvalidWSDLException { List<Operation> operations = new ArrayList<Operation>(); for (Object o : portType.getOperations()) { javax.wsdl.Operation wsdlOp = (javax.wsdl.Operation)o; Operation operation = getOperation(wsdlOp, wsdlDefinition, resolver, xsdFactory, monitor); operations.add(operation); } return operations; }
/** * Write the body of the portType interface file. * * @param pw * @throws IOException */ protected void writeFileBody(PrintWriter pw) throws IOException { Iterator operations = portType.getOperations().iterator(); while (operations.hasNext()) { Operation operation = (Operation) operations.next(); writeOperation(pw, operation); } } // writeFileBody
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 List<Operation> introspectOperations(PortType portType, WSDLDefinition wsdlDefinition, ModelResolver resolver, Monitor monitor) throws InvalidWSDLException { List<Operation> operations = new ArrayList<Operation>(); for (Object o : portType.getOperations()) { javax.wsdl.Operation wsdlOp = (javax.wsdl.Operation)o; Operation operation = getOperation(wsdlOp, wsdlDefinition, resolver, xsdFactory, monitor); operations.add(operation); } return operations; }
/** * Write the body of the portType interface file. * * @param pw * @throws IOException */ protected void writeFileBody(PrintWriter pw) throws IOException { Iterator operations = portType.getOperations().iterator(); while (operations.hasNext()) { Operation operation = (Operation) operations.next(); writeOperation(pw, operation); } } // writeFileBody
/** * Write the body of the portType interface file. * * @param pw * @throws IOException */ protected void writeFileBody(PrintWriter pw) throws IOException { Iterator operations = portType.getOperations().iterator(); while (operations.hasNext()) { Operation operation = (Operation) operations.next(); writeOperation(pw, operation); } } // writeFileBody
@SuppressWarnings("unchecked") public boolean isOneWayOnly() { PortType portType = _plinkDef.myRolePortType; if (portType == null) { return false; } for (Operation operation : (List<Operation>) portType.getOperations()) { if (operation.getOutput() != null) { return false; } } return true; } }
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; }
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; }
public WsdlServiceContract introspect(PortType portType, Definition definition, XmlSchemaCollection collection, IntrospectionContext context) { List<Operation> operations = new LinkedList<>(); for (Object object : portType.getOperations()) { javax.wsdl.Operation wsdlOperation = (javax.wsdl.Operation) object; Operation operation = createOperation(wsdlOperation, collection, portType, context); operations.add(operation); } WsdlServiceContract contract = new WsdlServiceContract(portType, definition); contract.setOperations(operations); return contract; }
public void checkPortTypes() { for (Iterator itPt = definition.getPortTypes().values().iterator(); itPt.hasNext();) { PortType portType = (PortType) itPt.next(); Set<String> operationNames = new HashSet<String>(); for (Iterator itOp = portType.getOperations().iterator(); itOp.hasNext();) { Operation operation = (Operation) itOp.next(); if (operation.getStyle() != OperationType.ONE_WAY && operation.getStyle() != OperationType.REQUEST_RESPONSE) { error(Code.R2303, portType); } if (!operationNames.add(operation.getName())) { error(Code.R2304, portType); } } } }
@SuppressWarnings("unchecked") public void createBindingOperations(Definition definition, Binding binding, PortType portType) { try { for (Iterator oi = portType.getOperations().iterator(); oi.hasNext();) { Operation operation = (Operation)oi.next(); // Removed improper defaulting of SOAP action. createBindingOperations() is called // when binding.ws does not supply a WSDL binding and the reference is using interface.wsdl. // In this case there is no source for a user-supplied action. // The correct default is "" (empty string). BindingOperation bindingOperation = createBindingOperation(definition, operation, ""); binding.addBindingOperation(bindingOperation); } } catch (WSDLException e) { throw new WSDLGenerationException(e); } }
public boolean isValid() { Iterator ite = def.getPortTypes().values().iterator(); while (ite.hasNext()) { PortType portType = (PortType)ite.next(); Iterator ite2 = portType.getOperations().iterator(); while (ite2.hasNext()) { Operation operation = (Operation)ite2.next(); if (operation.getInput() != null) { Message inMessage = operation.getInput().getMessage(); if (inMessage != null && !isUniqueBodyPart(operation.getName(), inMessage)) { return false; } } } } return true; }
/** * Get the {@link Operation} instance for the specified SOAP operation name. * @param port The WSDL port. * @param operationName The SOAP Body element name. * @return The Operation instance, or null if the operation was not found on the port. */ public static Operation getOperationByName(Port port, String operationName) { Operation operation = null; List<Operation> operationList = port.getBinding().getPortType().getOperations(); for (Operation op : operationList) { if (op.getName().equals(operationName)) { operation = op; break; } } return operation; }
public void buildInterface(ServiceInfo si, PortType p) { InterfaceInfo inf = si.createInterface(p.getQName()); DescriptionInfo d = si.getDescription(); if (null != d) { d.getDescribed().add(inf); } copyDocumentation(inf, p); this.copyExtensors(inf, p.getExtensibilityElements()); this.copyExtensionAttributes(inf, p); if (recordOriginal) { inf.setProperty(WSDL_PORTTYPE, p); } for (Operation op : cast(p.getOperations(), Operation.class)) { buildInterfaceOperation(inf, op); } }
public void buildInterface(ServiceInfo si, PortType p) { InterfaceInfo inf = si.createInterface(p.getQName()); DescriptionInfo d = si.getDescription(); if (null != d) { d.getDescribed().add(inf); } copyDocumentation(inf, p); this.copyExtensors(inf, p.getExtensibilityElements()); this.copyExtensionAttributes(inf, p); if (recordOriginal) { inf.setProperty(WSDL_PORTTYPE, p); } for (Operation op : cast(p.getOperations(), Operation.class)) { buildInterfaceOperation(inf, op); } }
public void buildInterface(ServiceInfo si, PortType p) { InterfaceInfo inf = si.createInterface(p.getQName()); DescriptionInfo d = si.getDescription(); if (null != d) { d.getDescribed().add(inf); } copyDocumentation(inf, p); this.copyExtensors(inf, p.getExtensibilityElements()); this.copyExtensionAttributes(inf, p); if (recordOriginal) { inf.setProperty(WSDL_PORTTYPE, p); } for (Operation op : cast(p.getOperations(), Operation.class)) { buildInterfaceOperation(inf, op); } }
@SuppressWarnings("unchecked") private void addBindingOperation() throws ToolException { List<Operation> ops = portType.getOperations(); for (Operation op : ops) { BindingOperation bindingOperation = wsdlDefinition.createBindingOperation(); bindingOperation.setName(op.getName()); if (op.getInput() != null) { bindingOperation.setBindingInput(getBindingInput(op.getInput(), op.getName())); } if (op.getOutput() != null) { bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), op.getName())); } if (op.getFaults() != null && op.getFaults().size() > 0) { addXMLFaults(op, bindingOperation); } bindingOperation.setOperation(op); binding.addBindingOperation(bindingOperation); } }