|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.message.AbstractHeaderImpl
public abstract class AbstractHeaderImpl
Partial default implementation of Header
.
This is meant to be a convenient base class
for Header
-derived classes.
Field Summary | |
---|---|
protected static AttributesImpl |
EMPTY_ATTS
|
Constructor Summary | |
---|---|
protected |
AbstractHeaderImpl()
|
Method Summary | ||
---|---|---|
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. |
|
|
readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge)
Deprecated. |
|
|
readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge,
com.sun.xml.bind.api.BridgeContext context)
Deprecated. |
|
|
readAsJAXB(Unmarshaller unmarshaller)
Reads the header as a JAXB object by using the given unmarshaller. |
|
|
readAsJAXB(XMLBridge<T> bridge)
Reads the header as a data-bond object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.xml.ws.api.message.Header |
---|
getAttribute, getLocalPart, getNamespaceURI, readHeader, writeTo, writeTo, writeTo |
Field Detail |
---|
protected static final AttributesImpl EMPTY_ATTS
Constructor Detail |
---|
protected AbstractHeaderImpl()
Method Detail |
---|
public final <T> T readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge, com.sun.xml.bind.api.BridgeContext context) throws JAXBException
JAXBException
public <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException
Header
readAsJAXB
in interface Header
JAXBException
public <T> T readAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge) throws JAXBException
Header
readAsJAXB
in interface Header
JAXBException
public <T> T readAsJAXB(XMLBridge<T> bridge) throws JAXBException
Header
readAsJAXB
in interface Header
JAXBException
public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException
readAsEPR
in interface Header
expected
- 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.
XMLStreamException
public 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 Header
s
that were not understood. This method is invoked on those Header
s,
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 Header
soapVersion
- 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 Header
s 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 Header
soapVersion
- 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 Header
s to avoid keeping it.
That's why this redundant parameter is passed in.
public boolean isRelay()
Header
IOW, 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.
isRelay
in interface Header
public String getAttribute(QName name)
Header
This is a convenience method that calls into Header.getAttribute(String, String)
getAttribute
in interface Header
name
- Never null.Header.getAttribute(String, String)
protected final boolean parseBool(String value)
public String getStringContent()
Header
getStringContent
in interface Header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |