/** * 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; }
Binding binding = port.getBinding();
String bindingID = null; List<? extends ExtensibilityElement> extensions = CastUtils.cast(port.getBinding().getExtensibilityElements()); if (!extensions.isEmpty()) { ExtensibilityElement e = extensions.get(0);
try { Definition def = wsdlManager.getDefinition(wsdlDocumentLocation); interfaceName = def.getService(serviceName).getPort(portName.getLocalPart()).getBinding() .getPortType().getQName(); } catch (Exception e) {
/** * @see #useHTTPBinding(javax.wsdl.Binding) */ public static boolean useHTTPBinding(Port port) { return useHTTPBinding(port.getBinding()); }
private PortType getServicePortType(Port port) { Binding binding = port.getBinding(); PortType servicePortType = null; if (binding != null) { servicePortType = binding.getPortType(); } return servicePortType; }
public static String getPackageName(Port port, Map ns2pkgMap) { if (port != null) return getPackageName(port.getBinding(), ns2pkgMap); else return ""; }
public static String getPackageNameForBindingImpl(Port port) { if (port != null) { Binding binding = port.getBinding(); // PortType portType = binding.getPortType(); QName bndQName = binding.getQName(); String namespace = bndQName.getNamespaceURI(); return namespaceURI2PackageName(namespace); } return ""; }
public void visit(Port port, Object parent, WSDLTraversalContext ctx) { if (port .getBinding() .getQName() .getLocalPart() .equals(ctx.getParameter(BINDING_PARAM).toString())) { ((Vector) ctx.getParameter(PORTS_PARAM)).add(port); } }
public Binding getWSDLBinding() { Binding wsdlBinding = null; Port wsdlPort = getWSDLPort(); Definition wsdlDef = getWSDLDefinition(); if (wsdlPort != null && wsdlDef != null) { wsdlBinding = wsdlPort.getBinding(); } return wsdlBinding; }
public void visit(Port port, Object parent, WSDLTraversalContext ctx) { if (port != null) { Binding binding = port.getBinding(); if (binding != null) { checkNamespace(binding.getQName(), ctx); } } }
/** * Create new java implementations for each binding of the given definition. * * @param def - the definition to analyse. * @return a list of created classes */ private String updateImplementationFile(final Port port) { final Binding binding = port.getBinding(); return new BindingFileWriter(this.servicesDir, binding, this.bpelProcess).write(); }
public void configure() throws Exception { begin(wservice, portType); for (Iterator iterator1 = ports.iterator(); iterator1.hasNext();) { Port port = (Port) iterator1.next(); Binding binding = port.getBinding(); visit(binding); visit(port); } end(wservice, portType); }
/** * @see #getBindingExtension(javax.wsdl.Binding) */ public static ExtensibilityElement getBindingExtension(Port port) { Binding binding = port.getBinding(); if (binding == null) { throw new IllegalArgumentException(msgs.msgBindingNotFound(port.getName())); } return getBindingExtension(binding); }
public static QName getServiceName(Binding binding, Definition wsdlDef) { LOG.log(Level.FINE, "Getting service name for an object reference"); Collection<Service> services = CastUtils.cast(wsdlDef.getServices().values()); for (Service serv : services) { Collection<Port> ports = CastUtils.cast(serv.getPorts().values()); for (Port pt : ports) { if (pt.getBinding().equals(binding)) { return serv.getQName(); } } } return null; }
public static String getEndpointName(Binding binding, Definition wsdlDef) { LOG.log(Level.FINE, "Getting endpoint name for an object reference"); Collection<Service> services = CastUtils.cast(wsdlDef.getServices().values()); for (Service serv : services) { Collection<Port> ports = CastUtils.cast(serv.getPorts().values()); for (Port pt : ports) { if (pt.getBinding().equals(binding)) { return pt.getName(); } } } return null; }
private BindingOperation getBindingOperation(String operationName) throws WSDLException { WSDLHelper helper = new WSDLHelper(); Port port = EndpointReferenceUtils.getPort(this.bus.getWSDLManager(), this.endpointRef); return helper.getBindingOperation(port.getBinding(), operationName); }
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); }