org.apache.axis2.jaxws.handler
Class SOAPHeadersAdapter
java.lang.Object
org.apache.axis2.jaxws.handler.SOAPHeadersAdapter
- All Implemented Interfaces:
- Map<QName,List<String>>
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.)
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
install
public static void install(MessageContext mc)
- Add the AttachmentAdapter as the property for the inbound and/or
outbound attachment property
- Parameters:
mc
- MessageContext
clear
public void clear()
- Specified by:
clear
in interface Map<QName,List<String>>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<QName,List<String>>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map<QName,List<String>>
entrySet
public Set<Map.Entry<QName,List<String>>> entrySet()
- Specified by:
entrySet
in interface Map<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.
- Specified by:
get
in interface Map<QName,List<String>>
- Parameters:
_key
- Object -- QName key of header XML strings you intend to retrieve
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<QName,List<String>>
keySet
public Set<QName> keySet()
- Specified by:
keySet
in interface Map<QName,List<String>>
put
public List<String> put(QName key,
List<String> values)
- put will inject the headers into the SOAP message immediately
- Specified by:
put
in interface Map<QName,List<String>>
- Parameters:
key
- Object -- QName key of header XML strings you wish to be put on the SOAP headervalues
- List -- list of XML strings that have the same namespace as the QName key
putAll
public void putAll(Map<? extends QName,? extends List<String>> t)
- putAll will inject the headers into the SOAP message immediately
- Specified by:
putAll
in interface Map<QName,List<String>>
remove
public List<String> remove(Object _key)
- remove will immediately remove the headers from the SOAP message that match the QName key
- Specified by:
remove
in interface Map<QName,List<String>>
- Parameters:
_key
- Object -- QName key of header XML strings you wish to remove from the SOAP header
size
public int size()
- Specified by:
size
in interface Map<QName,List<String>>
values
public Collection<List<String>> values()
- Specified by:
values
in interface Map<QName,List<String>>
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.