public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAPAddress soapAddress = (SOAPAddress)extReg.createExtension(parentType, elementType); String locationURI = DOMUtils.getAttribute(el, Constants.ATTR_LOCATION); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (locationURI != null) { soapAddress.setLocationURI(locationURI); } if (requiredStr != null) { soapAddress.setRequired(new Boolean(requiredStr)); } return soapAddress; } }
public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); address.setLocationURI("dummy"); return address; } public static javax.wsdl.Service doAppendService(Definition wsdlDefinition,
public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); address.setLocationURI("dummy"); return address; } public static javax.wsdl.Service doAppendService(Definition wsdlDefinition,
/** * Called after the {@link SOAPAddress} has been created. Default implementation sets the location URI to the value * set on this builder. Subclasses can override this behavior. * * @param soapAddress the WSDL4J {@code SOAPAddress} * @throws WSDLException in case of errors * @see SOAPAddress#setLocationURI(String) * @see #setLocationUri(String) */ protected void populateSoapAddress(SOAPAddress soapAddress) throws WSDLException { soapAddress.setLocationURI(getLocationUri()); }
/** * Called after the {@link SOAPAddress} has been created. Default implementation sets the location URI to the value * set on this builder. Subclasses can override this behavior. * * @param soapAddress the WSDL4J {@code SOAPAddress} * @throws WSDLException in case of errors * @see SOAPAddress#setLocationURI(String) * @see #setLocationUri(String) */ protected void populateSoapAddress(SOAPAddress soapAddress) throws WSDLException { soapAddress.setLocationURI(getLocationUri()); }
public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); address.setLocationURI("dummy"); return address; } public static javax.wsdl.Service doAppendService(Definition wsdlDefinition,
/** * Called after the {@link SOAPAddress} has been created. Default implementation sets the location URI to the value * set on this builder. Subclasses can override this behavior. * * @param soapAddress the WSDL4J <code>SOAPAddress</code> * @throws WSDLException in case of errors * @see SOAPAddress#setLocationURI(String) * @see #setLocationUri(String) */ protected void populateSoapAddress(SOAPAddress soapAddress) throws WSDLException { soapAddress.setLocationURI(getLocationUri()); }
/** * Called after the {@link SOAPAddress} has been created. Default implementation sets the location URI to the value * set on this builder. Subclasses can override this behavior. * * @param soapAddress the WSDL4J {@code SOAPAddress} * @throws WSDLException in case of errors * @see SOAPAddress#setLocationURI(String) * @see #setLocationUri(String) */ protected void populateSoapAddress(SOAPAddress soapAddress) throws WSDLException { soapAddress.setLocationURI(getLocationUri()); }
public static void setPortAddress(Port port, String locationURI) { Object ext = port.getExtensibilityElements().get(0); if (ext instanceof SOAPAddress) { ((SOAPAddress)ext).setLocationURI(locationURI); } if (ext instanceof SOAP12Address) { ((SOAP12Address)ext).setLocationURI(locationURI); } }
/** * set the given port location if it exists. * @param portQName the port to set. * @param loc the port location. */ public void setLocation(QName portQName, URL loc) { Port port = getPort(portQName.getLocalPart()); if (port != null) { List ee = port.getExtensibilityElements(); Iterator eeIt = ee.iterator(); while (eeIt.hasNext()) { // find the soap address element Object elem = eeIt.next(); if ((elem != null) && elem instanceof SOAPAddress) { ((SOAPAddress) elem).setLocationURI(loc.toString()); } } } }
/** * set the given port location if it exists. * @param portQName the port to set. * @param loc the port location. */ public void setLocation(QName portQName, URL loc) { Port port = getPort(portQName.getLocalPart()); if (port != null) { List ee = port.getExtensibilityElements(); Iterator eeIt = ee.iterator(); while (eeIt.hasNext()) { // find the soap address element Object elem = eeIt.next(); if ((elem != null) && elem instanceof SOAPAddress) { ((SOAPAddress) elem).setLocationURI(loc.toString()); } } } }
protected void setSoapAddressLocationOn(Port port, String url) { List<?> extensions = port.getExtensibilityElements(); for (Object extension : extensions) { if (extension instanceof SOAP12Address) { ((SOAP12Address)extension).setLocationURI(url); } else if (extension instanceof SOAPAddress) { ((SOAPAddress)extension).setLocationURI(url); } } }
protected void setSoapAddressLocationOn(Port port, String url) { List<?> extensions = port.getExtensibilityElements(); for (Object extension : extensions) { if (extension instanceof SOAP12Address) { ((SOAP12Address)extension).setLocationURI(url); } else if (extension instanceof SOAPAddress) { ((SOAPAddress)extension).setLocationURI(url); } } }
private void setSoapAddressLocationOn(Port port, String url) { List<?> extensions = port.getExtensibilityElements(); for (Object extension : extensions) { if (extension instanceof SOAP12Address) { ((SOAP12Address)extension).setLocationURI(url); } else if (extension instanceof SOAPAddress) { ((SOAPAddress)extension).setLocationURI(url); } } }
/** * Filters the WSDL document. * * @param definition location pointing to a WSDL XML definition. * @param propertyResolver the Property Resolver */ public static void filterWSDL(Definition definition, PropertyResolver propertyResolver) { for (Object serviceObject : definition.getServices().values()) { Service service = (Service) serviceObject; for (Object portObject : service.getPorts().values()) { Port port = (Port) portObject; for (Object extObject : port.getExtensibilityElements()) { if (extObject instanceof SOAPAddress) { SOAPAddress address = (SOAPAddress) extObject; String toReplace = Strings.replaceProperties(address.getLocationURI(), propertyResolver); if (!toReplace.isEmpty() && !toReplace.equals(address.getLocationURI())) { address.setLocationURI(toReplace); } } } } } }
add = add.substring(0, idx) + ":" + port2 + add.substring(idx + port1.length() + 1); ((SOAPAddress)e).setLocationURI(add);
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); } }
addr.setLocationURI(locationUrl); port.addExtensibilityElement(addr); service.addPort(port);