public abstract class AbstractHeaderImpl extends Object implements Header
| Modifier and Type | Field and Description |
|---|---|
protected static AttributesImpl |
EMPTY_ATTS |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHeaderImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(QName name)
Gets the attribute value on the header element.
|
String |
getRole(SOAPVersion soapVersion)
Gets the value of the soap:role attribute (or soap:actor for SOAP 1.1).
|
String |
getStringContent()
Used to obtain value XYZ from a header that looks like
"<header>XYZ</header>".
|
boolean |
isIgnorable(SOAPVersion soapVersion,
Set<String> roles)
Checks if this header is ignorable for us (IOW, make sure
that this header has a problematic "mustUnderstand" header value
that we have to reject.)
|
boolean |
isRelay()
True if this header is to be relayed if not processed.
|
protected boolean |
parseBool(String value)
Parses a string that looks like xs:boolean into boolean.
|
WSEndpointReference |
readAsEPR(AddressingVersion expected)
Default implementation that copies the infoset.
|
<T> T |
readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge)
Deprecated.
|
<T> T |
readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge,
com.sun.xml.bind.api.BridgeContext context)
Deprecated.
|
<T> T |
readAsJAXB(Unmarshaller unmarshaller)
Reads the header as a JAXB object by using the given unmarshaller.
|
<T> T |
readAsJAXB(XMLBridge<T> bridge)
Reads the header as a data-bond object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttribute, getLocalPart, getNamespaceURI, readHeader, writeTo, writeTo, writeToprotected static final AttributesImpl EMPTY_ATTS
public final <T> T readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge,
com.sun.xml.bind.api.BridgeContext context)
throws JAXBException
JAXBExceptionpublic <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException
HeaderreadAsJAXB in interface HeaderJAXBExceptionpublic <T> T readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge)
throws JAXBException
HeaderreadAsJAXB in interface HeaderJAXBExceptionpublic <T> T readAsJAXB(XMLBridge<T> bridge) throws JAXBException
HeaderreadAsJAXB in interface HeaderJAXBExceptionpublic WSEndpointReference readAsEPR(AddressingVersion expected) throws javax.xml.stream.XMLStreamException
readAsEPR in interface Headerexpected - The version of the addressing used to parse the EPR.
If the actual infoset and this doesn't agree, then
you'll get an WebServiceException stating that fact.javax.xml.stream.XMLStreamExceptionpublic boolean isIgnorable(@NotNull
SOAPVersion soapVersion,
@NotNull
Set<String> roles)
Header
This method is used as a part of the
mustUnderstanx processing.
At the end of the processing, the JAX-WS identifies a list of Headers
that were not understood. This method is invoked on those Headers,
to verify that we don't need to report an error for it.
specifically, this method has to perform the following tasks:
Header.getRole(SOAPVersion) for how the values are defaulted.
Now, see if the roles set contains the value.
If so, this method must return false (indicating that an error is in order.)
isIgnorable in interface HeadersoapVersion - The caller specifies the SOAP version that the pipeline is working against.
Often each Header implementation already knows the SOAP version
anyway, but this allows some Headers to avoid keeping it.
That's why this redundant parameter is passed in.roles - The set of role values that the current JAX-WS pipeline is assuming.
Note that SOAP 1.1 and SOAP 1.2 use different strings for the same role,
and the caller is responsible for supplying a proper value depending on the
active SOAP version in use.@NotNull public String getRole(@NotNull SOAPVersion soapVersion)
Header
If the attribute is omitted, the value defaults to SOAPVersion.implicitRole.
getRole in interface HeadersoapVersion - The caller specifies the SOAP version that the pipeline is working against.
Often each Header implementation already knows the SOAP version
anyway, but this allows some Headers to avoid keeping it.
That's why this redundant parameter is passed in.public boolean isRelay()
HeaderIOW, this method returns true if there's @soap:relay='true' is present.
The implementation needs to check for both "true" and "1", but because attribute values are normalized, it doesn't have to consider " true", " 1 ", and so on.
public String getAttribute(QName name)
Header
This is a convenience method that calls into Header.getAttribute(String, String)
getAttribute in interface Headername - Never null.Header.getAttribute(String, String)protected final boolean parseBool(String value)
public String getStringContent()
HeadergetStringContent in interface HeaderCopyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.