Java SOAP Message getDeclaredNamespaces(SOAPElement aElement, Map aPrefixMap)

Here you can find the source of getDeclaredNamespaces(SOAPElement aElement, Map aPrefixMap)

Description

Finds all the namespaces and prefixes in effect for a SOAPElement using SAAJ interface methods

License

Open Source License

Parameter

Parameter Description
aElement element
aPrefixMap map of prefixes to namespaces

Declaration

public static void getDeclaredNamespaces(SOAPElement aElement, Map aPrefixMap) 

Method Source Code


//package com.java2s;

import java.util.Iterator;
import java.util.Map;
import javax.xml.soap.SOAPElement;

public class Main {
    /**// w  w w .ja va2  s.c  o m
     * Finds all the namespaces and prefixes in effect for a SOAPElement
     * using SAAJ interface methods
     *  
     * @param aElement element 
     * @param aPrefixMap map of prefixes to namespaces
     */
    public static void getDeclaredNamespaces(SOAPElement aElement, Map aPrefixMap) {
        for (SOAPElement element = aElement; element != null; element = element.getParentElement()) {
            for (Iterator it = element.getNamespacePrefixes(); it.hasNext();) {
                String prefix = (String) it.next();
                String ns = element.getNamespaceURI(prefix);
                if (!aPrefixMap.containsKey(prefix)) {
                    aPrefixMap.put(prefix, ns);
                }
            }
        }
    }
}

Related

  1. extractXMLPayloadFromSOAPMessage(SOAPMessage messageSOAP)
  2. getAttachmentContentType(SOAPMessage message)
  3. getBody(SOAPMessage m)
  4. getBodyContent(SOAPBody body)
  5. getBytes(SOAPMessage soap)
  6. getExcludedTypes()
  7. getFaultCodeAndString(SOAPMessage message)
  8. getHeaderValue(SOAPMessage message, String tagName)
  9. getJarredPluginPath(String bundleId)