FileDocCategorySizeDatePackage
WSDLUtils.javaAPI DocApache Axis 1.42232Sat Apr 22 18:57:28 BST 2006org.apache.axis.utils

WSDLUtils

public class WSDLUtils extends Object

Fields Summary
protected static Log
log
Constructors Summary
Methods Summary
public static java.lang.StringgetAddressFromPort(javax.wsdl.Port p)
Return the endpoint address from a tag


                  
         
        // Get the endpoint for a port
        List extensibilityList = p.getExtensibilityElements();
        for (ListIterator li = extensibilityList.listIterator(); li.hasNext();) {
            Object obj = li.next();
            if (obj instanceof SOAPAddress) {
                return ((SOAPAddress) obj).getLocationURI();
            } else if (obj instanceof UnknownExtensibilityElement){
                //TODO: After WSDL4J supports soap12, change this code
                UnknownExtensibilityElement unkElement = (UnknownExtensibilityElement) obj;
                QName name = unkElement.getElementType();
                if(name.getNamespaceURI().equals(Constants.URI_WSDL12_SOAP) && 
                   name.getLocalPart().equals("address")) {
                    return unkElement.getElement().getAttribute("location");
                }
            }
        }
        // didn't find it
        return null;