Refine search
/** * 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; }
/** * Get the name of the current port. * * @return Name of the current port. */ public String getPortName() { return _port.getName(); }
if (existingService != null) { String existingServiceNS = ((Port) existingService.getPorts().values().iterator().next()) .getBinding().getPortType().getQName().getNamespaceURI(); existingService.setQName(new QName(def.getTargetNamespace(), serviceNames.get(existingServiceNS))); serviceMap.put(existingServiceNS, existingService); Port port = def.createPort(); port.setName(portTypeName.getLocalPart() + "CORBAPort"); AddressType address = (AddressType) def.getExtensionRegistry().createExtension(Port.class, port.addExtensibilityElement((ExtensibilityElement)address); service.addPort(port); port.setBinding(bindings[i]);
@SuppressWarnings("unchecked") private void processServices(Definition def) { Map<QName, Service> services = def.getServices(); log.info("Services: "); for (Service svc : services.values()) { String svcName = svc.getQName().getLocalPart(); log.info("\t{}", svcName); Map<QName, Port> ports = svc.getPorts(); for (Port port : ports.values()) { log.info("\tPort: {}", port.getName()); processBinding(def, port.getBinding()); } } }
protected Dispatch<SOAPMessage> createDispatchFromURI(String uri) { QName serviceName = wsBinding.getService().getQName(); QName portName = new QName(serviceName.getNamespaceURI(), wsBinding.getPort().getName()); Service service = Service.create(serviceName); service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, uri); return service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE); }
private Map<QName, XNode> getBindings(Service service) { Map<QName, XNode> bindings = new HashMap<>(); if (service.getPorts().values().isEmpty()) { throw new ToolException("Service " + service.getQName() + " does not contain any usable ports"); } Collection<Port> ports = CastUtils.cast(service.getPorts().values()); for (Port port : ports) { Binding binding = port.getBinding(); bindings.put(binding.getQName(), getXNode(service, port)); if (WSDLConstants.NS_WSDL11.equals(binding.getQName().getNamespaceURI())) { throw new ToolException("Binding " + binding.getQName().getLocalPart() + " namespace set improperly."); } } return bindings; }
private void doAppendService() throws ToolException { if (service == null) { service = wsdlDefinition.createService(); service .setQName(new QName(WSDLConstants.WSDL_PREFIX, (String)env.get(ToolConstants.CFG_SERVICE))); } if (port == null) { port = wsdlDefinition.createPort(); port.setName((String)env.get(ToolConstants.CFG_PORT)); port.setBinding(binding); } setAddrElement(); service.addPort(port); wsdlDefinition.addService(service); }
PortType portType) throws AxisFault { Map wsdl4jPorts = wsdl4jService.getPorts(); QName bindingName = binding.getQName(); port = (Port) iterator.next(); if ((this.portName == null) || (this.portName.equals(port.getName()))) { port.getBinding().getQName(), COMPONENT_BINDING, new HashSet()); currentBinding = currentBindingWSDL.getBinding(port.getBinding().getQName()); if (currentBinding.getPortType().getQName().equals(binding.getPortType().getQName())) { axisEndpoint = new AxisEndpoint(); axisEndpoint.setName(port.getName()); bindingName.equals(port.getBinding().getQName())) { populateEndpoint(axisEndpoint, port, currentBinding, bindingWSDL, portType, true); axisService.setEndpointName(axisEndpoint.getName()); axisService.setBindingName(axisEndpoint.getBinding().getName().getLocalPart()); } else { populateEndpoint(axisEndpoint, port, currentBinding, axisService.addEndpoint(port.getName(), axisEndpoint);
public static javax.wsdl.Service doAppendService(Definition wsdlDefinition, String existPortName, ExtensionRegistry extReg, Binding binding) throws Exception { javax.wsdl.Service wsdlService = wsdlDefinition.createService(); wsdlService.setQName(new QName(wsdlDefinition.getTargetNamespace(), existPortName + serviceName)); Port port = wsdlDefinition.createPort(); port.setName(existPortName + portName); port.setBinding(binding); SOAPAddress address = PartialWSDLProcessor.setAddrElement(wsdlDefinition, port, extReg); port.addExtensibilityElement(address); wsdlService.addPort(port); return wsdlService; }
try { Definition def = wsdlManager.getDefinition(wsdlDocumentLocation); interfaceName = def.getService(serviceName).getPort(portName.getLocalPart()).getBinding() .getPortType().getQName(); } catch (Exception e) { ? serviceName.getNamespaceURI() + " " + wsdlDocumentLocation : wsdlDocumentLocation; writer.writeNamespace(JAXWSAConstants.WSDLI_PFX, JAXWSAConstants.WSAM_INTERFACE_NAME, JAXWSAConstants.NS_WSAM); String portTypePrefix = interfaceName.getPrefix(); if (portTypePrefix == null || portTypePrefix.isEmpty()) { portTypePrefix = "ns1";
/** * Called after the {@link Port} has been created, but before any sub-elements are added. Subclasses can implement * this method to define the port name, or add extensions to it. * <p/> * Default implementation sets the port name to the binding name. * * @param definition the WSDL4J <code>Definition</code> * @param port the WSDL4J <code>Port</code> * @throws WSDLException in case of errors */ protected void populatePort(Definition definition, Port port) throws WSDLException { String portName = port.getBinding().getQName().getLocalPart(); port.setName(portName); }
public String getPortBinding(QName serviceQname, QName portQname) { Port port = getPort(serviceQname, portQname); if (port == null) { return null; } Binding binding = port.getBinding(); return binding.getQName().getLocalPart(); }
private void initializePorts() { try { Definition def = bus.getExtension(WSDLManager.class).getDefinition(wsdlURL); javax.wsdl.Service serv = def.getService(serviceName); if (serv == null) { throw new WebServiceException("Could not find service named " + serviceName Map<String, Port> wsdlports = CastUtils.cast(serv.getPorts()); for (Port port : wsdlports.values()) { QName name = new QName(serviceName.getNamespaceURI(), port.getName()); = CastUtils.cast(port.getBinding().getExtensibilityElements()); if (!extensions.isEmpty()) { ExtensibilityElement e = extensions.get(0); extensions = CastUtils.cast(port.getExtensibilityElements()); if (!extensions.isEmpty()) { ExtensibilityElement e = extensions.get(0);
QName serviceElementQName = new QName(implNS, getServiceElementName()); Service service = def.getService(serviceElementQName); service = def.createService(); service.setQName(serviceElementQName); def.addService(service); service.setDocumentationElement( createDocumentationElement(description)); } else if (serviceDesc.getDocumentation() != null) { service.setDocumentationElement( createDocumentationElement( serviceDesc.getDocumentation())); Port port = def.createPort(); port.setBinding(binding); port.setName(getServicePortName()); port.addExtensibilityElement(addr); service.addPort(port);
/** * Init the wsdlPorts list. */ private void fillWsdlPorts() { Map svcs = def.getServices(); Iterator svcsIt = svcs.values().iterator(); while (svcsIt.hasNext()) { Service svc = (Service) svcsIt.next(); if (svc != null) { for (Iterator j = svc.getPorts().values().iterator(); j.hasNext();) { Port p = (Port) j.next(); wsdlPorts.add(new QName(def.getTargetNamespace(), p.getName())); } } } }
String targetNamespace = wsdl.getTargetNamespace(); String localName = logicalBinding.getParent().getUri().getFragment(); QName serviceName = new QName(targetNamespace, localName); String localPortName = localName + "Port"; copy.addBinding(binding); QName portName = new QName(targetNamespace, localPortName); Port port = copy.createPort(); port.setName(localPortName); port.setBinding(binding); SOAPAddress soapAddress = (SOAPAddress) copy.getExtensionRegistry().createExtension(Port.class, SOAP_ADDRESS); soapAddress.setLocationURI(endpointAddress); port.addExtensibilityElement(soapAddress); Service service = copy.createService(); service.setQName(serviceName); service.addPort(port); copy.addService(service);
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); } }
Binding binding = def.createBinding(); binding.setQName(new QName(def.getTargetNamespace(), bindingName)); binding.setPortType(portType); binding.setUndefined(false); List<?> operations = portType.getOperations(); for (Iterator<?> iter = operations.iterator(); iter.hasNext();) { Operation operation = (Operation) iter.next(); Service service = def.createService(); service.setQName(new QName(def.getTargetNamespace(), serviceName)); Port port = def.createPort(); port.setName(portName); port.setBinding(binding); if (soap11) { SOAPAddress address = new SOAPAddressImpl(); address.setLocationURI(locationUri); port.addExtensibilityElement(address); } else { SOAP12Address address = new SOAP12AddressImpl(); address.setLocationURI(locationUri); port.addExtensibilityElement(address); service.addPort(port); def.addService(service);
public Port createPort(Endpoint endpoint, WSDLBuilder builder, javax.wsdl.Binding wbinding) { SOAPAddressImpl add = new SOAPAddressImpl(); add.setLocationURI(endpoint.getUrl()); Port port = builder.getDefinition().createPort(); port.setBinding( wbinding ); port.setName( endpoint.getName().getLocalPart() ); port.addExtensibilityElement( add ); return port; }