address = ((SOAPAddress)e).getLocationURI(); } else if (e instanceof HTTPAddress) { address = ((HTTPAddress)e).getLocationURI();
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPAddress httpAddress = (HTTPAddress)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) { httpAddress.setLocationURI(locationURI); } if (requiredStr != null) { httpAddress.setRequired(new Boolean(requiredStr)); } return httpAddress; } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPAddress httpAddress = (HTTPAddress)extension; if (httpAddress != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, httpAddress.getLocationURI(), pw); Boolean required = httpAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
String exsistingAddress = httpAddress.getLocationURI(); if (requestIP == null) { if (endpoint != null) { ((HTTPAddress) extensibilityEle) .setLocationURI(endpoint .calculateEndpointURL()); } else { ((HTTPAddress) extensibilityEle) .setLocationURI(getLocationURI( getEPRs(), exsistingAddress)); if (endpoint != null) { ((HTTPAddress) extensibilityEle) .setLocationURI(endpoint .calculateEndpointURL(requestIP)); } else { ((HTTPAddress) extensibilityEle) .setLocationURI(getLocationURI( calculateEPRs(requestIP), exsistingAddress));
public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException { String address = getOption(args, ToolConstants.CFG_ADDRESS); ExtensibilityElement addr = registry.createExtension(Port.class, WSDLConstants.QNAME_XMLHTTP_BINDING_ADDRESS); if (addr instanceof AddressType) { ((AddressType)addr).setLocation(address); } if (addr instanceof HTTPAddress) { ((HTTPAddress)addr).setLocationURI(address); } return addr; } }
String exsistingAddress = httpAddress.getLocationURI(); if (requestIP == null) { if (endpoint != null) { ((HTTPAddress) extensibilityEle) .setLocationURI(endpoint .calculateEndpointURL()); } else { ((HTTPAddress) extensibilityEle) .setLocationURI(getLocationURI( getEPRs(), exsistingAddress)); if (endpoint != null) { ((HTTPAddress) extensibilityEle) .setLocationURI(endpoint .calculateEndpointURL(requestIP)); } else { ((HTTPAddress) extensibilityEle) .setLocationURI(getLocationURI( calculateEPRs(requestIP), exsistingAddress));
address.setLocationURI(serviceEndpointURL);
private String getServiceLocation() { for (Object extElement : getPortDefinition().getExtensibilityElements()) { if (extElement instanceof HTTPAddress) { return ((HTTPAddress) extElement).getLocationURI(); } } throw new NullPointerException("Service Location is null. Cannot find HTTP Address from WSDL definition"); }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPAddress httpAddress = (HTTPAddress)extension; if (httpAddress != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, httpAddress.getLocationURI(), pw); Boolean required = httpAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException { String address = getOption(args, ToolConstants.CFG_ADDRESS); ExtensibilityElement addr = registry.createExtension(Port.class, WSDLConstants.QNAME_XMLHTTP_BINDING_ADDRESS); if (addr instanceof AddressType) { ((AddressType)addr).setLocation(address); } if (addr instanceof HTTPAddress) { ((HTTPAddress)addr).setLocationURI(address); } return addr; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPAddress httpAddress = (HTTPAddress)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) { httpAddress.setLocationURI(locationURI); } if (requiredStr != null) { httpAddress.setRequired(new Boolean(requiredStr)); } return httpAddress; } }
private String getPortAddress(Port port) { Iterator it = port.getExtensibilityElements().iterator(); String address = null; while (it.hasNext()) { Object obj = it.next(); if (obj instanceof SOAPAddress) { address = ((SOAPAddress)obj).getLocationURI(); } if (obj instanceof JMSAddress) { address = ((JMSAddress)obj).getAddress(); } if (obj instanceof HTTPAddress) { address = ((HTTPAddress)obj).getLocationURI(); } } return address; }
port.setBinding(bnd); HTTPAddress address = new HTTPAddressImpl(); address.setLocationURI(location); port.addExtensibilityElement(address); def.addNamespace("http", "http://schemas.xmlsoap.org/wsdl/http/");
String location = ((HTTPAddress)extElement).getLocationURI().trim(); if ((location != null) && location.startsWith("http:")){
String location = ((HTTPAddress)extElement).getLocationURI().trim(); if ((location != null) && location.startsWith("http:")){
private String getLocationFromWsdl(Definition definition, PortComponent portComponent) { if (definition == null) return null; try { javax.wsdl.Service service = definition.getService(portComponent.getWsdlService()); if (service == null) return null; Port port = service.getPort(portComponent.getWsdlPort().getLocalPart()); if (port == null) return null; for (Object element : port.getExtensibilityElements()) { if (element instanceof SOAPAddress) { SOAPAddress soapAddress = (SOAPAddress) element; URI uri = new URI(soapAddress.getLocationURI()); return uri.getPath(); } else if (element instanceof HTTPAddress) { HTTPAddress httpAddress = (HTTPAddress) element; URI uri = new URI(httpAddress.getLocationURI()); return uri.getPath(); } } } catch (Exception e) { } return null; }
Element httpAddr = doc.createElementNS(Namespaces.HTTP_NS, "address"); port.appendChild(httpAddr); httpAddr.setAttribute("location", ((HTTPAddress) extElmt).getLocationURI()); } else if (extElmt instanceof SOAP12Address) { Element soap12Addr = doc.createElementNS(Namespaces.SOAP12_NS, "address");
private String getLocationFromWsdl(final Definition definition, final PortComponent portComponent) { if (definition == null) { return null; } try { final Service service = definition.getService(portComponent.getWsdlService()); if (service == null) { return null; } final Port port = service.getPort(portComponent.getWsdlPort().getLocalPart()); if (port == null) { return null; } for (final Object element : port.getExtensibilityElements()) { if (element instanceof SOAPAddress) { final SOAPAddress soapAddress = (SOAPAddress) element; final URI uri = URLs.uri(soapAddress.getLocationURI()); return uri.getPath(); } else if (element instanceof HTTPAddress) { final HTTPAddress httpAddress = (HTTPAddress) element; final URI uri = URLs.uri(httpAddress.getLocationURI()); return uri.getPath(); } } } catch (final Exception e) { // no-op } return null; }
private String getLocationFromWsdl(final Definition definition, final PortComponent portComponent) { if (definition == null) { return null; } try { final Service service = definition.getService(portComponent.getWsdlService()); if (service == null) { return null; } final Port port = service.getPort(portComponent.getWsdlPort().getLocalPart()); if (port == null) { return null; } for (final Object element : port.getExtensibilityElements()) { if (element instanceof SOAPAddress) { final SOAPAddress soapAddress = (SOAPAddress) element; final URI uri = URLs.uri(soapAddress.getLocationURI()); return uri.getPath(); } else if (element instanceof HTTPAddress) { final HTTPAddress httpAddress = (HTTPAddress) element; final URI uri = URLs.uri(httpAddress.getLocationURI()); return uri.getPath(); } } } catch (final Exception e) { // no-op } return null; }
info.setAddress(httpAdd.getLocationURI()); info.addExtensor(httpAdd); return info;