|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.security.opt.impl.message.SecurityHeaderWrapper
public class SecurityHeaderWrapper
| Constructor Summary | |
|---|---|
SecurityHeaderWrapper(SecurityHeader sh)
Creates a new instance of HeaderWrapper |
|
| Method Summary | ||
|---|---|---|
java.lang.String |
getAttribute(javax.xml.namespace.QName name)
Gets the attribute value on the header element. |
|
java.lang.String |
getAttribute(java.lang.String nsUri,
java.lang.String localName)
Gets the attribute value on the header element. |
|
java.lang.String |
getLocalPart()
Gets the local name of this header element. |
|
java.lang.String |
getNamespaceURI()
Gets the namespace URI of this header element. |
|
java.lang.String |
getRole(com.sun.xml.ws.api.SOAPVersion soapVersion)
Gets the value of the soap:role attribute (or soap:actor for SOAP 1.1). |
|
java.lang.String |
getStringContent()
|
|
boolean |
isIgnorable(com.sun.xml.ws.api.SOAPVersion soapVersion,
java.util.Set<java.lang.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. |
|
com.sun.xml.ws.api.addressing.WSEndpointReference |
readAsEPR(com.sun.xml.ws.api.addressing.AddressingVersion expected)
|
|
|
readAsJAXB(Bridge<T> bridge)
Reads the header as a JAXB object by using the given unmarshaller. |
|
|
readAsJAXB(Bridge<T> bridge,
BridgeContext context)
Deprecated. Use readAsJAXB(Bridge). To be removed after JavaOne. |
|
|
readAsJAXB(Unmarshaller unmarshaller)
Reads the header as a JAXB object by using the given unmarshaller. |
|
|
readAsJAXB(com.sun.xml.ws.spi.db.XMLBridge<T> arg0)
|
|
javax.xml.stream.XMLStreamReader |
readHeader()
Reads the header as a XMLStreamReader. |
|
void |
writeTo(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler)
Writes out the header as SAX events. |
|
void |
writeTo(SOAPMessage saaj)
Writes out the header to the given SOAPMessage. |
|
void |
writeTo(javax.xml.stream.XMLStreamWriter w)
Writes out the header. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecurityHeaderWrapper(SecurityHeader sh)
| Method Detail |
|---|
public boolean isIgnorable(com.sun.xml.ws.api.SOAPVersion soapVersion,
java.util.Set<java.lang.String> roles)
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:
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 com.sun.xml.ws.api.message.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.
public java.lang.String getRole(com.sun.xml.ws.api.SOAPVersion soapVersion)
If the attribute is omitted, the value defaults to SOAPVersion.implicitRole.
getRole in interface com.sun.xml.ws.api.message.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()
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 com.sun.xml.ws.api.message.Headerpublic java.lang.String getNamespaceURI()
getNamespaceURI in interface com.sun.xml.ws.api.message.Headerpublic java.lang.String getLocalPart()
getLocalPart in interface com.sun.xml.ws.api.message.Header
public java.lang.String getAttribute(java.lang.String nsUri,
java.lang.String localName)
getAttribute in interface com.sun.xml.ws.api.message.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 java.lang.String getAttribute(javax.xml.namespace.QName name)
This is a convenience method that calls into getAttribute(String, String)
getAttribute in interface com.sun.xml.ws.api.message.Headername - Never null.getAttribute(String, String)
public javax.xml.stream.XMLStreamReader readHeader()
throws javax.xml.stream.XMLStreamException
XMLStreamReader.
The returned parser points at the start element of this header.
(IOW, XMLStreamReader.getEventType() would return
XMLStreamConstants.START_ELEMENT.
For some Header implementations, this operation
is a non-trivial operation. Therefore, use of this method
is discouraged unless the caller is interested in reading
the whole header.
Similarly, if the caller wants to use this method only to do
the API conversion (such as simply firing SAX events from
XMLStreamReader), then the JAX-WS team requests
that you talk to us.
Messages that come from tranport usually provides
a reasonably efficient implementation of this method.
readHeader in interface com.sun.xml.ws.api.message.Headerjavax.xml.stream.XMLStreamException
public <T> T readAsJAXB(Unmarshaller unmarshaller)
throws JAXBException
readAsJAXB in interface com.sun.xml.ws.api.message.HeaderJAXBException
public <T> T readAsJAXB(Bridge<T> bridge,
BridgeContext context)
throws JAXBException
readAsJAXB(Bridge). To be removed after JavaOne.
JAXBException
public <T> T readAsJAXB(Bridge<T> bridge)
throws JAXBException
readAsJAXB in interface com.sun.xml.ws.api.message.HeaderJAXBException
public void writeTo(javax.xml.stream.XMLStreamWriter w)
throws javax.xml.stream.XMLStreamException
writeTo in interface com.sun.xml.ws.api.message.Headerjavax.xml.stream.XMLStreamException - if the operation fails for some reason. This leaves the
writer to an undefined state.
public void writeTo(SOAPMessage saaj)
throws SOAPException
Sometimes a Message needs to produce itself
as SOAPMessage, in which case each header needs
to turn itself into a header.
writeTo in interface com.sun.xml.ws.api.message.HeaderSOAPException - if the operation fails for some reason. This leaves the
writer to an undefined state.
public void writeTo(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler)
throws org.xml.sax.SAXException
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 com.sun.xml.ws.api.message.HeadercontentHandler - The ContentHandler that receives SAX events.errorHandler - The ErrorHandler that receives parsing errors.
org.xml.sax.SAXExceptionpublic java.lang.String getStringContent()
getStringContent in interface com.sun.xml.ws.api.message.Header
@NotNull
public com.sun.xml.ws.api.addressing.WSEndpointReference readAsEPR(com.sun.xml.ws.api.addressing.AddressingVersion expected)
throws javax.xml.stream.XMLStreamException
readAsEPR in interface com.sun.xml.ws.api.message.Headerjavax.xml.stream.XMLStreamException
public <T> T readAsJAXB(com.sun.xml.ws.spi.db.XMLBridge<T> arg0)
throws JAXBException
readAsJAXB in interface com.sun.xml.ws.api.message.HeaderJAXBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||