org.apache.axis2.jaxws.handler
Class SOAPHeadersAdapter
java.lang.Object
org.apache.axis2.jaxws.handler.SOAPHeadersAdapter
- All Implemented Interfaces:
- java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
public class SOAPHeadersAdapter
- extends java.lang.Object
- implements java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.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 |
java.util.Map.Entry<K,V> |
Method Summary |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set<java.util.Map.Entry<javax.xml.namespace.QName,java.util.List<java.lang.String>>> |
entrySet()
|
java.util.List<java.lang.String> |
get(java.lang.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 property |
boolean |
isEmpty()
|
java.util.Set<javax.xml.namespace.QName> |
keySet()
|
java.util.List<java.lang.String> |
put(javax.xml.namespace.QName key,
java.util.List<java.lang.String> values)
put will inject the headers into the SOAP message immediately |
void |
putAll(java.util.Map<? extends javax.xml.namespace.QName,? extends java.util.List<java.lang.String>> t)
putAll will inject the headers into the SOAP message immediately |
java.util.List<java.lang.String> |
remove(java.lang.Object _key)
remove will immediately remove the headers from the SOAP message that match the QName key |
int |
size()
|
java.util.Collection<java.util.List<java.lang.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 |
equals, hashCode |
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 java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
entrySet
public java.util.Set<java.util.Map.Entry<javax.xml.namespace.QName,java.util.List<java.lang.String>>> entrySet()
- Specified by:
entrySet
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
get
public java.util.List<java.lang.String> get(java.lang.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 java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
- Parameters:
_key
- Object -- QName key of header XML strings you intend to retrieve
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
keySet
public java.util.Set<javax.xml.namespace.QName> keySet()
- Specified by:
keySet
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
put
public java.util.List<java.lang.String> put(javax.xml.namespace.QName key,
java.util.List<java.lang.String> values)
- put will inject the headers into the SOAP message immediately
- Specified by:
put
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.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(java.util.Map<? extends javax.xml.namespace.QName,? extends java.util.List<java.lang.String>> t)
- putAll will inject the headers into the SOAP message immediately
- Specified by:
putAll
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
remove
public java.util.List<java.lang.String> remove(java.lang.Object _key)
- remove will immediately remove the headers from the SOAP message that match the QName key
- Specified by:
remove
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.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 java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
values
public java.util.Collection<java.util.List<java.lang.String>> values()
- Specified by:
values
in interface java.util.Map<javax.xml.namespace.QName,java.util.List<java.lang.String>>
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.