/** * Get the SOAP address location for the specified port. * * @param p * A WSDL Port instance. * @return The SOAP address URI. */ protected static String getSOAPAddress( Port p ) { ExtensibilityElement e = findExtensibilityElement( p, SOAP_PORT_ADDRESS_NAME ); if ( e instanceof SOAP12Address ) { return ( (SOAP12Address) e ).getLocationURI(); } else if ( e instanceof SOAPAddress ) { return ( (SOAPAddress) e ).getLocationURI(); } return null; }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAP12Address soapAddress = (SOAP12Address)extension; if (soapAddress != null) { String tagName = DOMUtils.getQualifiedValue(SOAP12Constants.NS_URI_SOAP12, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, soapAddress.getLocationURI(), pw); Boolean required = soapAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
address = ((AddressType)e).getLocation(); } else if (e instanceof SOAP12Address) { address = ((SOAP12Address)e).getLocationURI(); } else if (e instanceof SOAPAddress) { address = ((SOAPAddress)e).getLocationURI();
public static String getPortAddress(Port port) { List<?> es = port.getExtensibilityElements(); if (es != null && es.size() > 0) { Object ext = es.get(0); if (ext instanceof SOAPAddress) { return ((SOAPAddress)ext).getLocationURI(); } if (ext instanceof SOAP12Address) { return ((SOAP12Address)ext).getLocationURI(); } } return null; }
public static String getPortAddress(Port port) { Object ext = port.getExtensibilityElements().get(0); if (ext instanceof SOAPAddress) { return ((SOAPAddress)ext).getLocationURI(); } if (ext instanceof SOAP12Address) { return ((SOAP12Address)ext).getLocationURI(); } return null; }
public static String getPortAddress(Port port) { Object ext = port.getExtensibilityElements().get(0); if (ext instanceof SOAPAddress) { return ((SOAPAddress)ext).getLocationURI(); } if (ext instanceof SOAP12Address) { return ((SOAP12Address)ext).getLocationURI(); } return null; }
/** * Returns the endpoint of a given port. */ private static URI getEndpoint(Port wsdlPort) { if (wsdlPort != null) { List<?> wsdlPortExtensions = wsdlPort.getExtensibilityElements(); for (Object extension : wsdlPortExtensions) { if (extension instanceof SOAPAddress) { String uri = ((SOAPAddress)extension).getLocationURI(); return (uri == null || "".equals(uri)) ? null : URI.create(uri); } if (extension instanceof SOAP12Address) { SOAP12Address address = (SOAP12Address)extension; String uri = address.getLocationURI(); return (uri == null || "".equals(uri)) ? null : URI.create(uri); } } } return null; }
static String getSOAPAddressFromElement(ExtensibilityElement extElement) { String returnAddress = null; if (extElement != null) { if (SOAP_11_ADDRESS_ELEMENT.equals(extElement.getElementType())) { returnAddress = ((SOAPAddress)extElement).getLocationURI(); } else if (SOAP_12_ADDRESS_ELEMENT.equals(extElement.getElementType())) { returnAddress = ((SOAP12Address)extElement).getLocationURI(); } } return returnAddress; }
static String getSOAPAddressFromElement(ExtensibilityElement extElement) { String returnAddress = null; if (extElement != null) { if (SOAP_11_ADDRESS_ELEMENT.equals(extElement.getElementType())) { returnAddress = ((SOAPAddress)extElement).getLocationURI(); } else if (SOAP_12_ADDRESS_ELEMENT.equals(extElement.getElementType())) { returnAddress = ((SOAP12Address)extElement).getLocationURI(); } } return returnAddress; }
/** * Returns the endpoint of a given port. */ private static URI getEndpoint(Port wsdlPort) { if (wsdlPort != null) { List<?> wsdlPortExtensions = wsdlPort.getExtensibilityElements(); for (Object extension : wsdlPortExtensions) { if (extension instanceof SOAPAddress) { String uri = ((SOAPAddress)extension).getLocationURI(); return (uri == null || "".equals(uri)) ? null : URI.create(uri); } if (extension instanceof SOAP12Address) { SOAP12Address address = (SOAP12Address)extension; String uri = address.getLocationURI(); return (uri == null || "".equals(uri)) ? null : URI.create(uri); } } } return null; }
/** * Get the SOAP Binding Id for the specified {@link Port}. * * @param port The WSDL port. * @return The endpoint address. */ public static String getEndpointAddress(Port port) { String address = null; List<ExtensibilityElement> extElements = port.getExtensibilityElements(); for (ExtensibilityElement extElement : extElements) { if (extElement instanceof SOAPAddress) { address = ((SOAPAddress)extElement).getLocationURI(); break; } else if (extElement instanceof SOAP12Address) { address = ((SOAP12Address)extElement).getLocationURI(); break; } } return address; }
/** * Get the SOAP Binding Id for the specified {@link Port}. * * @param port The WSDL port. * @return The endpoint address. */ public static String getEndpointAddress(Port port) { String address = null; List<ExtensibilityElement> extElements = port.getExtensibilityElements(); for (ExtensibilityElement extElement : extElements) { if (extElement instanceof SOAPAddress) { address = ((SOAPAddress)extElement).getLocationURI(); break; } else if (extElement instanceof SOAP12Address) { address = ((SOAP12Address)extElement).getLocationURI(); break; } } return address; }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAP12Address soapAddress = (SOAP12Address)extension; if (soapAddress != null) { String tagName = DOMUtils.getQualifiedValue(SOAP12Constants.NS_URI_SOAP12, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, soapAddress.getLocationURI(), pw); Boolean required = soapAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
soapAddress = addr.getLocationURI(); break;
protected org.apache.axis2.addressing.EndpointReference getPortLocationEPR(WebServiceBinding binding) { String ep = null; if (binding.getPort() != null) { List<?> wsdlPortExtensions = binding.getPort().getExtensibilityElements(); for (final Object extension : wsdlPortExtensions) { if (extension instanceof SOAPAddress) { ep = ((SOAPAddress)extension).getLocationURI(); break; } if (extension instanceof SOAP12Address) { SOAP12Address address = (SOAP12Address)extension; ep = address.getLocationURI(); break; } } } if(ep == null || ep.equals("")) { ep = binding.getURI(); } return ep == null || "".equals(ep) ? null : new org.apache.axis2.addressing.EndpointReference(ep); }
protected String getPortLocation() { String ep = null; if (wsBinding.getPort() != null) { List<?> wsdlPortExtensions = wsBinding.getPort().getExtensibilityElements(); for (final Object extension : wsdlPortExtensions) { if (extension instanceof SOAPAddress) { ep = ((SOAPAddress)extension).getLocationURI(); break; } if (extension instanceof SOAP12Address) { SOAP12Address address = (SOAP12Address)extension; ep = address.getLocationURI(); break; } } } if (ep == null || ep.equals("")) { ep = endpointReference.getDeployedURI(); } return ep; }
/** * Get the EPR of this service from the WSDL. * * @param wsdlDef WSDL Definition * @param serviceName service name * @param portName port name * @return XML representation of the EPR */ public static String getEPRfromWSDL( final Definition wsdlDef, final QName serviceName, final String portName) { Service serviceDef = wsdlDef.getService(serviceName); if (serviceDef != null) { Port portDef = serviceDef.getPort(portName); if (portDef != null) { for (Object extElmt : portDef.getExtensibilityElements()) { if (extElmt instanceof SOAPAddress) { return ((SOAPAddress) extElmt).getLocationURI(); } else if (extElmt instanceof HTTPAddress) { return ((HTTPAddress) extElmt).getLocationURI(); } else if (extElmt instanceof SOAP12Address) { return ((SOAP12Address) extElmt).getLocationURI(); } } } } return null; }
address = ((AddressType)e).getLocation(); } else if (e instanceof SOAP12Address) { address = ((SOAP12Address)e).getLocationURI(); } else if (e instanceof SOAPAddress) { address = ((SOAPAddress)e).getLocationURI();
marshaler.setBaseUrl(sa11.getLocationURI()); } else if (sa12 != null) { marshaler.setBaseUrl(sa12.getLocationURI()); } else { throw new DeploymentException("No SOAP address defined on port '" + port.getName() + "'");
String actualUrl = null; if (extension instanceof SOAP12Address) { actualUrl = ((SOAP12Address)extension).getLocationURI(); } else if (extension instanceof SOAPAddress) { actualUrl = ((SOAPAddress)extension).getLocationURI();