port.addExtensibilityElement(parseExtensibilityElement(Port.class, tempEl, def));
/** * Called after the {@link javax.wsdl.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 calls {@link DefaultConcretePartProvider#populatePort(javax.wsdl.Definition,javax.wsdl.Port)}, * creates a {@link javax.wsdl.extensions.soap.SOAPAddress}, and calls {@link #populateSoapAddress(SOAP12Address)}. * * @param port the WSDL4J <code>Port</code> * @throws WSDLException in case of errors */ @Override protected void populatePort(Definition definition, Port port) throws WSDLException { for (Iterator<?> iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) { if (iterator.next() instanceof SOAP12Binding) { // this is a SOAP 1.2 binding, create a SOAP Address for it super.populatePort(definition, port); SOAP12Address soapAddress = (SOAP12Address) createSoapExtension(definition, Port.class, "address"); populateSoapAddress(soapAddress); port.addExtensibilityElement(soapAddress); return; } } }
/** * 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 calls {@link DefaultConcretePartProvider#populatePort(javax.wsdl.Definition,javax.wsdl.Port)}, * creates a {@link SOAPAddress}, and calls {@link #populateSoapAddress(SOAPAddress)}. * * @param port the WSDL4J {@code Port} * @throws WSDLException in case of errors */ @Override protected void populatePort(Definition definition, Port port) throws WSDLException { for (Iterator<?> iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) { if (iterator.next() instanceof SOAPBinding) { // this is a SOAP 1.1 binding, create a SOAP Address for it super.populatePort(definition, port); SOAPAddress soapAddress = (SOAPAddress) createSoapExtension(definition, Port.class, "address"); populateSoapAddress(soapAddress); port.addExtensibilityElement(soapAddress); return; } } }
/** * Called after the {@link javax.wsdl.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 calls {@link DefaultConcretePartProvider#populatePort(javax.wsdl.Definition,javax.wsdl.Port)}, * creates a {@link javax.wsdl.extensions.soap.SOAPAddress}, and calls {@link #populateSoapAddress(SOAP12Address)}. * * @param port the WSDL4J {@code Port} * @throws WSDLException in case of errors */ @Override protected void populatePort(Definition definition, Port port) throws WSDLException { for (Iterator<?> iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) { if (iterator.next() instanceof SOAP12Binding) { // this is a SOAP 1.2 binding, create a SOAP Address for it super.populatePort(definition, port); SOAP12Address soapAddress = (SOAP12Address) createSoapExtension(definition, Port.class, "address"); populateSoapAddress(soapAddress); port.addExtensibilityElement(soapAddress); return; } } }
/** * 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 calls {@link DefaultConcretePartProvider#populatePort(javax.wsdl.Definition,javax.wsdl.Port)}, * creates a {@link SOAPAddress}, and calls {@link #populateSoapAddress(SOAPAddress)}. * * @param port the WSDL4J <code>Port</code> * @throws WSDLException in case of errors */ @Override protected void populatePort(Definition definition, Port port) throws WSDLException { for (Iterator<?> iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) { if (iterator.next() instanceof SOAPBinding) { // this is a SOAP 1.1 binding, create a SOAP Address for it super.populatePort(definition, port); SOAPAddress soapAddress = (SOAPAddress) createSoapExtension(definition, Port.class, "address"); populateSoapAddress(soapAddress); port.addExtensibilityElement(soapAddress); return; } } }
/** * 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 calls {@link DefaultConcretePartProvider#populatePort(javax.wsdl.Definition,javax.wsdl.Port)}, * creates a {@link SOAPAddress}, and calls {@link #populateSoapAddress(SOAPAddress)}. * * @param port the WSDL4J {@code Port} * @throws WSDLException in case of errors */ @Override protected void populatePort(Definition definition, Port port) throws WSDLException { for (Iterator<?> iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) { if (iterator.next() instanceof SOAPBinding) { // this is a SOAP 1.1 binding, create a SOAP Address for it super.populatePort(definition, port); SOAPAddress soapAddress = (SOAPAddress) createSoapExtension(definition, Port.class, "address"); populateSoapAddress(soapAddress); port.addExtensibilityElement(soapAddress); return; } } }
/** * Called after the {@link javax.wsdl.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 calls {@link DefaultConcretePartProvider#populatePort(javax.wsdl.Definition,javax.wsdl.Port)}, * creates a {@link javax.wsdl.extensions.soap.SOAPAddress}, and calls {@link #populateSoapAddress(SOAP12Address)}. * * @param port the WSDL4J {@code Port} * @throws WSDLException in case of errors */ @Override protected void populatePort(Definition definition, Port port) throws WSDLException { for (Iterator<?> iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) { if (iterator.next() instanceof SOAP12Binding) { // this is a SOAP 1.2 binding, create a SOAP Address for it super.populatePort(definition, port); SOAP12Address soapAddress = (SOAP12Address) createSoapExtension(definition, Port.class, "address"); populateSoapAddress(soapAddress); port.addExtensibilityElement(soapAddress); return; } } }
private void setAddrElement() throws ToolException { Address address = AddressFactory.getInstance().getAddresser("xml"); for (Map.Entry<String, String> entry : address.getNamespaces(env).entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin generator = getWSDLPlugin("xml", Port.class); try { ExtensibilityElement extElement = generator.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG); throw new ToolException(msg); } }
private void setAddrElement() throws ToolException { Address address = AddressFactory.getInstance().getAddresser("xml"); for (Map.Entry<String, String> entry : address.getNamespaces(env).entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin generator = getWSDLPlugin("xml", Port.class); try { ExtensibilityElement extElement = generator.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG); throw new ToolException(msg); } }
private void setAddrElement() throws ToolException { String transport = (String)env.get(ToolConstants.CFG_TRANSPORT); Address address = AddressFactory.getInstance().getAddresser(transport); Map<String, String> ns = address.getNamespaces(env); for (Map.Entry<String, String> entry : ns.entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin plugin = getWSDLPlugin(transport, Port.class); try { ExtensibilityElement extElement = plugin.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAP_ADDRESS", LOG); throw new ToolException(msg, wse); } } }
private void setAddrElement() throws ToolException { String transport = (String)env.get(ToolConstants.CFG_TRANSPORT); Address address = AddressFactory.getInstance().getAddresser(transport); Map<String, String> ns = address.getNamespaces(env); for (Map.Entry<String, String> entry : ns.entrySet()) { wsdlDefinition.addNamespace(entry.getKey(), entry.getValue()); } WSDLExtensibilityPlugin plugin = getWSDLPlugin(transport, Port.class); try { ExtensibilityElement extElement = plugin.createExtension(address.buildAddressArguments(env)); port.addExtensibilityElement(extElement); } catch (WSDLException wse) { Message msg = new Message("FAIL_TO_CREATE_SOAP_ADDRESS", LOG); throw new ToolException(msg, wse); } } }
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; }
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; }
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; }
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; }
public void generate() { Service service = definition.createService(); service.setQName(new QName(WSDLConstants.WSDL_PREFIX, wmodel.getServiceName())); Port port = definition.createPort(); port.setName(wmodel.getPortName()); Binding binding = definition.createBinding(); String targetNameSpace = wmodel.getTargetNameSpace(); binding.setQName(new QName(targetNameSpace, wmodel.getPortTypeName() + "Binding")); port.setBinding(binding); SOAPAddress soapAddress = null; try { soapAddress = (SOAPAddress)extensionRegistry .createExtension(Port.class, new QName(WSDLConstants.SOAP11_NAMESPACE, "address")); soapAddress.setLocationURI(ADDRESS_URI); } catch (WSDLException e) { throw new ToolException(e.getMessage(), e); } port.addExtensibilityElement(soapAddress); service.addPort(port); definition.addService(service); } }
public Port createPort(Definition definition, Binding binding, Service service, String uri) { try { Port port = definition.createPort(); port.setBinding(binding); configurePort(port, binding); if (uri != null) { ExtensibilityElement portExtension = definition.getExtensionRegistry().createExtension(Port.class, soapAddress); if (requiresSOAP12) { ((SOAP12Address)portExtension).setLocationURI(uri); } else { ((SOAPAddress)portExtension).setLocationURI(uri); } port.addExtensibilityElement(portExtension); } service.addPort(port); return port; } catch (WSDLException e) { throw new WSDLGenerationException(e); } }
public Port createPort(Definition definition, Binding binding, Service service, String uri) { try { Port port = definition.createPort(); port.setBinding(binding); configurePort(port, binding); if (uri != null) { ExtensibilityElement portExtension = definition.getExtensionRegistry().createExtension(Port.class, soapAddress); if (requiresSOAP12) { ((SOAP12Address)portExtension).setLocationURI(uri); } else { ((SOAPAddress)portExtension).setLocationURI(uri); } port.addExtensibilityElement(portExtension); } service.addPort(port); return port; } catch (WSDLException e) { throw new WSDLGenerationException(e); } }
private void setAddrElement() throws ToolException { extReg = this.wsdlReader.getExtensionRegistry(); if (extReg == null) { extReg = wsdlFactory.newPopulatedExtensionRegistry(); } XMLHttpAddress xmlHttpAddress = null; try { xmlHttpAddress = (XMLHttpAddress)extReg.createExtension(Port.class, WSDLConstants.NS_XMLHTTP_BINDING_ADDRESS); } catch (WSDLException wse) { Message msg = new Message("FAIl_TO_CREATE_SOAPADDRESS", LOG); throw new ToolException(msg); } if (env.get(ToolConstants.CFG_ADDRESS) != null) { xmlHttpAddress.setLocation((String)env.get(ToolConstants.CFG_ADDRESS)); } else { xmlHttpAddress.setLocation(HTTP_PREFIX + "/" + env.get(ToolConstants.CFG_SERVICE) + "/" + env.get(ToolConstants.CFG_PORT)); } port.addExtensibilityElement(xmlHttpAddress); }
public Port createPort(WSDLBuilder builder, javax.wsdl.Binding wbinding) { Transport t = builder.getTransportManager().getTransport(getBindingId()); if (!(t instanceof WSDL11Transport)) return null; WSDL11Transport transport = (WSDL11Transport) t; SOAPAddressImpl add = new SOAPAddressImpl(); add.setLocationURI(transport.getServiceURL(builder.getService())); Port port = builder.getDefinition().createPort(); port.setBinding( wbinding ); QName portName = (QName) builder.getService().getProperty(ObjectServiceFactory.PORT_NAME); if (portName != null) { port.setName(portName.getLocalPart()); } else { port.setName( builder.getService().getSimpleName() + transport.getName() + "Port" ); } port.addExtensibilityElement( add ); return port; } }