Package org.apache.axis2.jaxws.handler
Class SOAPHeadersAdapter
- java.lang.Object
-
- org.apache.axis2.jaxws.handler.SOAPHeadersAdapter
-
public class SOAPHeadersAdapter extends Object implements Map<QName,List<String>>
The JAX-WS exposes soap header properties whose value is Map>. The QName is the name of the header and List are the xml values of the headers for qname. The JAX-WS MessageContext stores soap headers in an Axiom tree object located on the JAX-WS Message. This class, SOAPHeadersAdapter, is an adapter between the Map > interface needed by the properties and the actual implementation. All useful function is delegated through the MessageContext, so that we only have one copy of the soap header information. To use this class, invoke the install method. This will create an SOAPHeaderAdapter (if necessary) and install it on to provide the JAX-WS soap headers property. (See BaseMessageContext.)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<QName,List<String>>>
entrySet()
List<String>
get(Object _key)
Returns a list of XML strings that have the same namespace as the QName key.static void
install(MessageContext mc)
Add the AttachmentAdapter as the property for the inbound and/or outbound attachment propertyboolean
isEmpty()
Set<QName>
keySet()
List<String>
put(QName key, List<String> values)
put will inject the headers into the SOAP message immediatelyvoid
putAll(Map<? extends QName,? extends List<String>> t)
putAll will inject the headers into the SOAP message immediatelyList<String>
remove(Object _key)
remove will immediately remove the headers from the SOAP message that match the QName keyint
size()
Collection<List<String>>
values()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
install
public static void install(MessageContext mc)
Add the AttachmentAdapter as the property for the inbound and/or outbound attachment property- Parameters:
mc
- MessageContext
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<QName,List<String>>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<QName,List<String>>
-
get
public List<String> get(Object _key)
Returns a list of XML strings that have the same namespace as the QName key. The returned list is not "live"; it manipulating the list will not result in changed headers on the message.
-
put
public List<String> put(QName key, List<String> values)
put will inject the headers into the SOAP message immediately
-
putAll
public void putAll(Map<? extends QName,? extends List<String>> t)
putAll will inject the headers into the SOAP message immediately
-
remove
public List<String> remove(Object _key)
remove will immediately remove the headers from the SOAP message that match the QName key
-
-