public static String getQualifiedValue(URI namespaceURI, String localPart, WSDLElement elem) throws WSDLException { String prefix = null; if (namespaceURI != null && !namespaceURI.toString().equals("")) { prefix = elem.getNamespacePrefix(namespaceURI); } String qv = ((prefix != null && !prefix.equals("")) ? prefix + ":" : "") + localPart; return qv; }
public URI getNamespaceURI(String prefix) { //See if the prefix is local. prefix = (prefix != null) ? prefix : emptyString; URI namespace = (URI)prefixToNamespaceMap.get(prefix); if (namespace == null && this instanceof NestedElement) { //If not call parents to find prefix if I'm nested. return ((NestedElement)this).getParentElement().getNamespaceURI(prefix); } else { //Otherwise return the found namespace or null. return namespace; } }
protected void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException { Element elem = (Element)xmlElem.getSource(); NamedNodeMap attrs = elem.getAttributes(); int size = attrs.getLength(); for (int i = 0; i < size; i++) { Attr attr = (Attr)attrs.item(i); String namespaceURI = attr.getNamespaceURI(); String localPart = attr.getLocalName(); String value = attr.getValue(); if ((Constants.NS_STRING_XMLNS).equals(namespaceURI)) { if (!(Constants.ATTR_XMLNS).equals(localPart)) { wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace } else { wsdlElem.addNamespace(null, getURI(value)); //the default namespace } } } }
public Boolean isHttpCookies() { BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)getParent()) .getExtensionAttribute(HTTPConstants.Q_ATTR_COOKIES); return cookiesUsed != null ? cookiesUsed.getBoolean() : new Boolean(false); //defaults to false if omitted }
public SOAPModule[] getSoapModules() { ExtensionElement[] extEls = ((WSDLElement)getParent()) .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE); int len = extEls.length; SOAPModule[] soapMods = new SOAPModule[len]; System.arraycopy(extEls, 0, soapMods, 0, len); return soapMods; }
if(xmlAttr != null) //TODO use an 'UnknownAttr' class in place of null wsdlObj.setExtensionAttribute(attrType, xmlAttr);
public Boolean isHttpLocationIgnoreUncited() { BooleanAttr ignoreUncited = (BooleanAttr) ((WSDLElement) getParent()) .getExtensionAttribute(HTTPConstants.Q_ATTR_IGNORE_UNCITED); return ignoreUncited != null ? ignoreUncited.getBoolean() : new Boolean(false); }
public HTTPHeader[] getHttpHeaders() { ExtensionElement[] extEls = ((WSDLElement) getParent()) .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER); int len = extEls.length; HTTPHeader[] httpHeaders = new HTTPHeader[len]; System.arraycopy(extEls, 0, httpHeaders, 0, len); return httpHeaders; }
if(xmlAttr != null) //TODO use an 'UnknownAttr' class in place of null wsdlObj.setExtensionAttribute(attrType, xmlAttr);
public Boolean isHttpLocationIgnoreUncited() { BooleanAttr ignoreUncited = (BooleanAttr) ((WSDLElement) getParent()) .getExtensionAttribute(HTTPConstants.Q_ATTR_IGNORE_UNCITED); return ignoreUncited != null ? ignoreUncited.getBoolean() : new Boolean(false); }
public SOAPModule[] getSoapModules() { ExtensionElement[] extEls = ((WSDLElement)getParent()) .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE); int len = extEls.length; SOAPModule[] soapMods = new SOAPModule[len]; System.arraycopy(extEls, 0, soapMods, 0, len); return soapMods; }
public static String getQualifiedValue(URI namespaceURI, String localPart, WSDLElement elem) throws WSDLException { String prefix = null; if (namespaceURI != null && !namespaceURI.toString().equals("")) { prefix = elem.getNamespacePrefix(namespaceURI); } String qv = ((prefix != null && !prefix.equals("")) ? prefix + ":" : "") + localPart; return qv; }
public URI getNamespaceURI(String prefix) { //See if the prefix is local. prefix = (prefix != null) ? prefix : emptyString; URI namespace = (URI)prefixToNamespaceMap.get(prefix); if (namespace == null && this instanceof NestedElement) { //If not call parents to find prefix if I'm nested. return ((NestedElement)this).getParentElement().getNamespaceURI(prefix); } else { //Otherwise return the found namespace or null. return namespace; } }
protected void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException { Element elem = (Element)xmlElem.getSource(); NamedNodeMap attrs = elem.getAttributes(); int size = attrs.getLength(); for (int i = 0; i < size; i++) { Attr attr = (Attr)attrs.item(i); String namespaceURI = attr.getNamespaceURI(); String localPart = attr.getLocalName(); String value = attr.getValue(); if ((Constants.NS_STRING_XMLNS).equals(namespaceURI)) { if (!(Constants.ATTR_XMLNS).equals(localPart)) { wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace } else { wsdlElem.addNamespace(null, getURI(value)); //the default namespace } } } }
public Boolean isHttpCookies() { BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)getParent()) .getExtensionAttribute(HTTPConstants.Q_ATTR_COOKIES); return cookiesUsed != null ? cookiesUsed.getBoolean() : new Boolean(false); //defaults to false if omitted }
public SOAPModule[] getSoapModules() { ExtensionElement[] extEls = ((WSDLElement)getParent()) .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE); int len = extEls.length; SOAPModule[] soapMods = new SOAPModule[len]; System.arraycopy(extEls, 0, soapMods, 0, len); return soapMods; }
public static String getQualifiedValue(URI namespaceURI, String localPart, WSDLElement elem) throws WSDLException { String prefix = null; if (namespaceURI != null && !namespaceURI.toString().equals("")) { prefix = elem.getNamespacePrefix(namespaceURI); } String qv = ((prefix != null && !prefix.equals("")) ? prefix + ":" : "") + localPart; return qv; }
String attrPrefix=ns.getPrefix(); attrName= DOMUtils.getQualifiedValue(ownerElem.getNamespaceURI(attrPrefix).toString(), attrLocalName, ownerElem); }else{
protected void parseNamespaceDeclarations( XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException { OMElement omDescription = (OMElement)xmlElem.getSource(); Iterator namespaces = omDescription.getAllDeclaredNamespaces(); while(namespaces.hasNext()){ OMNamespace namespace = (OMNamespace)namespaces.next(); String localPart = namespace.getPrefix(); String value = namespace.getNamespaceURI(); if (!(Constants.ATTR_XMLNS).equals(localPart)){ wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace } else{ wsdlElem.addNamespace(null, getURI(value)); //the default namespace } } }
public URI getSoapUnderlyingProtocol() { URIAttr protocol = (URIAttr) ((WSDLElement)getParent()) .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_PROTOCOL); return protocol != null ? protocol.getURI() : null; }