/** * Get the PortType name for the service which has been specified by serviceName and portName at construction time. * * @return QName of the PortType. */ public QName getPortTypeQName() { Binding b = _port.getBinding(); return b.getPortType().getQName(); }
/** * 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; }
/** * Find the specified operation in the WSDL definition. * * @param operationName * Name of operation to find. * @return A WsdlOperation instance, null if operation can not be found in WSDL. */ public WsdlOperation getOperation( String operationName ) throws KettleStepException { // is the operation in the cache? if ( _operationCache.containsKey( operationName ) ) { return _operationCache.get( operationName ); } Binding b = _port.getBinding(); PortType pt = b.getPortType(); Operation op = pt.getOperation( operationName, null, null ); if ( op != null ) { try { WsdlOperation wop = new WsdlOperation( b, op, _wsdlTypes ); // cache the operation _operationCache.put( operationName, wop ); return wop; } catch ( KettleException kse ) { LogChannel.GENERAL.logError( "Could not retrieve WSDL Operator for operation name: " + operationName ); throw new KettleStepException( "Could not retrieve WSDL Operator for operation name: " + operationName, kse ); } } return null; }
PortType portType = binding.getPortType();
Definition def = wsdlManager.getDefinition(wsdlDocumentLocation); interfaceName = def.getService(serviceName).getPort(portName.getLocalPart()).getBinding() .getPortType().getQName(); } catch (Exception e) {
private void processBinding(Definition def, Binding binding) { QName qname = binding.getPortType().getQName(); log.info("\tBinding: {}", qname.getLocalPart()); processPortType(def, binding, binding.getPortType()); }
private PortType getServicePortType(Port port) { Binding binding = port.getBinding(); PortType servicePortType = null; if (binding != null) { servicePortType = binding.getPortType(); } return servicePortType; }
public String getTargetNamespace() { return binding.getPortType().getQName().getNamespaceURI(); }
protected void configurePort(Port port, Binding binding) throws WSDLException { if ( wsBindingName != null ) { port.setName(wsBindingName + getSOAPVersionString() + PORT_SUFFIX); } else if (binding.getPortType() != null && binding.getPortType().getQName() != null) { port.setName(binding.getPortType().getQName().getLocalPart() + PORT_SUFFIX); } }
protected void configurePort(Port port, Binding binding) throws WSDLException { if ( wsBindingName != null ) { port.setName(wsBindingName + getSOAPVersionString() + PORT_SUFFIX); } else if (binding.getPortType() != null && binding.getPortType().getQName() != null) { port.setName(binding.getPortType().getQName().getLocalPart() + PORT_SUFFIX); } }
private Binding findBinding(PortType intf) { Object[] bindings = rootDefinition.getBindings().values().toArray(); for (int i = 0; i < bindings.length; i++) { Binding binding = (Binding) bindings[i]; if (binding.getPortType().getQName().equals(intf.getQName())) { return binding; } } throw new RuntimeException("[InterfaceVisitor] Couldn't find binding for porttype " + intf.getQName()); }
public void visit(Binding binding, Object parent, WSDLTraversalContext ctx) { if (binding != null) { PortType pType = binding.getPortType(); if (pType != null) { checkNamespace(pType.getQName(), ctx); } } }
public void visit(Binding binding, Object parent, WSDLTraversalContext ctx) { if (binding != null) { PortType pType = binding.getPortType(); if (pType != null) { checkNamespace(pType.getQName(), ctx); } } }
public List<Port> getWSDLPortsUsingPortType(QName portTypeQN) { ArrayList<Port> portList = new ArrayList<Port>(); if (!DescriptionUtils.isEmpty(portTypeQN)) { Map wsdlPortMap = getWSDLPorts(); if (wsdlPortMap != null && !wsdlPortMap.isEmpty()) { for (Object mapElement : wsdlPortMap.values()) { Port wsdlPort = (Port)mapElement; PortType wsdlPortType = wsdlPort.getBinding().getPortType(); QName wsdlPortTypeQN = wsdlPortType.getQName(); if (portTypeQN.equals(wsdlPortTypeQN)) { portList.add(wsdlPort); } } } } return portList; }
/** * 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; }
private PortType getPortType(WebServiceBinding model) { PortType portType = null; if (model.getPort() != null) { portType = model.getPort().getBinding().getPortType(); } else if (model.getEndpoint() != null) { portType = model.getPort().getBinding().getPortType(); } else if (model.getBinding() != null) { portType = model.getBinding().getPortType(); } else if (model.getService() != null) { // FIXME: How to find the compatible port? Map ports = model.getService().getPorts(); if (!ports.isEmpty()) { Port port = (Port)ports.values().iterator().next(); portType = port.getBinding().getPortType(); } } return portType; }
public Service createService(Definition definition, Binding binding, String serviceName) { try { Service service = definition.createService(); configureService(definition, service, binding.getPortType(), serviceName); definition.addService(service); return service; } catch (WSDLException e) { throw new WSDLGenerationException(e); } }
public Service createService(Definition definition, Binding binding, String serviceName) { try { Service service = definition.createService(); configureService(definition, service, binding.getPortType(), serviceName); definition.addService(service); return service; } catch (WSDLException e) { throw new WSDLGenerationException(e); } }
public ReferenceEndpointDefinition resolveReferenceEndpoint(WsdlElement wsdlElement, Definition wsdl) throws EndpointResolutionException { QName serviceName = wsdlElement.getServiceName(); QName portName = wsdlElement.getPortName(); Port port = resolveAndValidatePort(serviceName, portName, wsdl); URL url = getAddress(port); QName portTypeName = port.getBinding().getPortType().getQName(); String serializedWsdl = serializeWsdl(wsdl); return new ReferenceEndpointDefinition(serviceName, true, portName, portTypeName, url, serializedWsdl); }
private void processPort(JCasBuilder casBuilder, Port port, Selector selector) { if (!selector.port.equals(lastPort)) { // Add Service name to textualServiceRepresentation // This is used in the new version of the reader casBuilder.add("Port:", StopWord.class); casBuilder.add(" "); casBuilder.add(port.getName(), Field.class).setName(FIELD_PORT_NAME); casBuilder.add("\n"); processDocumentation(casBuilder, port.getDocumentationElement(), "", "Port Documentation", FIELD_PORT_DOCUMENTATION); lastPort = selector.port; } processOperation(casBuilder, port.getBinding().getPortType().getOperation( selector.operation, selector.input, selector.output)); }