|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.message.AbstractHeaderImpl
com.sun.xml.ws.security.opt.impl.incoming.GenericSecuredHeader
public class GenericSecuredHeader
| Nested Class Summary | |
|---|---|
protected static class |
GenericSecuredHeader.Attribute
|
| Field Summary |
|---|
| Fields inherited from class com.sun.xml.ws.message.AbstractHeaderImpl |
|---|
EMPTY_ATTS |
| Constructor Summary | |
|---|---|
GenericSecuredHeader(XMLStreamReader reader,
SOAPVersion soapVersion,
StreamReaderBufferCreator creator,
HashMap nsDecl,
XMLInputFactory staxIF,
boolean encHeaderContent)
|
|
| Method Summary | ||
|---|---|---|
String |
getAttribute(String nsUri,
String localName)
Gets the attribute value on the header element. |
|
HashMap<String,String> |
getInscopeNSContext()
map of all inscope namespace declarations. |
|
String |
getLocalPart()
Gets the local name of this header element. |
|
String |
getNamespaceURI()
Gets the namespace URI of this 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 |
hasEncData()
|
|
boolean |
hasID(String id)
|
|
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. |
|
|
readAsJAXB(Bridge<T> bridge)
Reads the header as a JAXB object by using the given unmarshaller. |
|
|
readAsJAXB(Unmarshaller um)
Reads the header as a JAXB object by using the given unmarshaller. |
|
XMLStreamReader |
readHeader()
Reads the header as a XMLStreamReader |
|
void |
writeTo(ContentHandler contentHandler,
ErrorHandler errorHandler)
Writes out the header as SAX events. |
|
void |
writeTo(SOAPMessage saaj)
Writes out the header to the given SOAPMessage. |
|
void |
writeTo(XMLStreamWriter w)
Writes out the header as a fragment. |
|
| Methods inherited from class com.sun.xml.ws.message.AbstractHeaderImpl |
|---|
getAttribute, parseBool, readAsEPR, readAsJAXB, readAsJAXB |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericSecuredHeader(XMLStreamReader reader,
SOAPVersion soapVersion,
StreamReaderBufferCreator creator,
HashMap nsDecl,
XMLInputFactory staxIF,
boolean encHeaderContent)
throws XMLStreamBufferException,
XMLStreamException
XMLStreamBufferException
XMLStreamException| Method Detail |
|---|
public boolean hasEncData()
public boolean hasID(String id)
hasID in interface SecuredHeaderid - true if the SecuredHeader refers to id.
public final boolean isIgnorable(SOAPVersion soapVersion,
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 HeaderisIgnorable in class AbstractHeaderImplsoapVersion - 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.
public String getRole(SOAPVersion soapVersion)
Header
If the attribute is omitted, the value defaults to SOAPVersion.implicitRole.
getRole in interface HeadergetRole in class AbstractHeaderImplsoapVersion - 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.
isRelay in interface HeaderisRelay in class AbstractHeaderImplpublic String getNamespaceURI()
Header
getNamespaceURI in interface Headerpublic String getLocalPart()
Header
getLocalPart in interface Header
public String getAttribute(String nsUri,
String localName)
Header
getAttribute in interface HeadernsUri - The namespace URI of the attribute. Can be empty.localName - The local name of the attribute.
Header implementation
doesn't have to do anything.
public XMLStreamReader readHeader()
throws XMLStreamException
XMLStreamReader
readHeader in interface HeaderXMLStreamException
public void writeTo(XMLStreamWriter w)
throws XMLStreamException
Header
writeTo in interface HeaderXMLStreamException - if the operation fails for some reason. This leaves the
writer to an undefined state.
public void writeTo(SOAPMessage saaj)
throws SOAPException
Header
Sometimes a Message needs to produce itself
as SOAPMessage, in which case each header needs
to turn itself into a header.
writeTo in interface HeaderSOAPException - if the operation fails for some reason. This leaves the
writer to an undefined state.
public void writeTo(ContentHandler contentHandler,
ErrorHandler errorHandler)
throws SAXException
Header
Sometimes a Message needs to produce SAX events,
and this method is necessary for headers to participate to it.
A header is responsible for producing the SAX events for its part, including startPrefixMapping and endPrefixMapping, but not startDocument/endDocument.
Note that SAX contract requires that any error that does NOT originate
from ContentHandler (meaning any parsing error and etc) must
be first reported to ErrorHandler. If the SAX event production
cannot be continued and the processing needs to abort, the code may
then throw the same SAXParseException reported to ErrorHandler.
writeTo in interface HeadercontentHandler - The ContentHandler that receives SAX events.errorHandler - The ErrorHandler that receives parsing errors.
SAXExceptionpublic String getStringContent()
Header
getStringContent in interface HeadergetStringContent in class AbstractHeaderImpl
public <T> T readAsJAXB(Unmarshaller um)
throws JAXBException
Header
readAsJAXB in interface HeaderreadAsJAXB in class AbstractHeaderImplJAXBException
public <T> T readAsJAXB(Bridge<T> bridge)
throws JAXBException
Header
readAsJAXB in interface HeaderreadAsJAXB in class AbstractHeaderImplJAXBExceptionpublic HashMap<String,String> getInscopeNSContext()
NamespaceContextInfo
getInscopeNSContext in interface NamespaceContextInfoHashMap of all inscope namespaces.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||