Package org.apache.axis2.jaxws.handler
Class SOAPHeadersAdapter
java.lang.Object
org.apache.axis2.jaxws.handler.SOAPHeadersAdapter
The JAX-WS exposes soap header properties whose value is Map<QName, List>. 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<QName, List> 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.)
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Returns a list of XML strings that have the same namespace as the QName key.static voidAdd the AttachmentAdapter as the property for the inbound and/or outbound attachment propertybooleanisEmpty()keySet()put will inject the headers into the SOAP message immediatelyvoidputAll will inject the headers into the SOAP message immediatelyremove will immediately remove the headers from the SOAP message that match the QName keyintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
install
Add the AttachmentAdapter as the property for the inbound and/or outbound attachment property- Parameters:
mc- MessageContext
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<QName,List<String>>
-
containsValue
- Specified by:
containsValuein interfaceMap<QName,List<String>>
-
entrySet
-
get
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. -
isEmpty
public boolean isEmpty() -
keySet
-
put
put will inject the headers into the SOAP message immediately -
putAll
putAll will inject the headers into the SOAP message immediately -
remove
remove will immediately remove the headers from the SOAP message that match the QName key -
size
public int size() -
values
-