|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openliberty.wsc.WSFMessage
public class WSFMessage
WSFMessage is an openLiberty ID-WSF-specific implementation of an authentication message
| Field Summary | |
|---|---|
private java.lang.String |
actionString
This is the action that the message is intended to perform |
protected static org.opensaml.xml.XMLObjectBuilderFactory |
builderFactory
XMLObject builder factory. |
private boolean |
endpointUpdated
When an EndpointUpdate header is received and processed, this is set to true |
private org.opensaml.ws.soap.soap11.Envelope |
envelope
SOAP Request |
protected static org.apache.log4j.Logger |
log
|
protected static org.opensaml.xml.io.MarshallerFactory |
marshallerFactory
XMLObject marshaller factory. |
protected static org.opensaml.xml.parse.BasicParserPool |
parser
Parser manager used to parse XML. |
private RedirectRequest |
redirectRequest
If the SOAP Response contains a Fault with a RedirectRequest element, it is stored here. |
private org.opensaml.ws.soap.soap11.Envelope |
responseEnvelope
SOAP Response |
private BaseServiceClient |
serviceClient
This is the Service Client that is invoking a particular WSFMessage. |
private java.util.List<java.lang.String> |
signatureIds
Holds the reference IDs of the elements to be included in any signature |
protected static org.opensaml.xml.io.UnmarshallerFactory |
unmarshallerFactory
XMLObject marshaller factory. |
| Constructor Summary | |
|---|---|
private |
WSFMessage(BaseServiceClient serviceClient)
|
| Method Summary | |
|---|---|
void |
addSOAP11Attributes(org.opensaml.xml.AttributeExtensibleXMLObject obj,
boolean mustUnderstand)
|
void |
addWSUIdAttribute(org.opensaml.xml.AttributeExtensibleXMLObject obj,
java.lang.String id)
This method adds an id to an AttributeExtensibleXMLObject and then places that Id in signatureIds for signig |
static org.opensaml.ws.soap.soap11.Envelope |
buildSOAPEnvelope()
This method creates the Basic SOAP Envelope |
static WSFMessage |
createWSFMessage(BaseServiceClient serviceClient,
java.lang.String actionString)
Factory method to create a WSFMessage from an EPR. |
org.opensaml.ws.soap.soap11.Envelope |
getRequestEnvelope()
|
org.opensaml.ws.soap.soap11.Envelope |
getResponseEnvelope()
|
protected BaseServiceClient |
getServiceClient()
|
java.util.List<java.lang.String> |
getSignatureIds()
Holds the reference ids of the SOAP Body element (the element itself), the security token associated with the signature, and all headers in the message that have been defined in the Liberty SOAP Bindings specification, including both required and optional header blocks. |
private void |
handleEndpointUpdatedState()
After an EndpointUpdate, the original message is invoked again, with a different EPR |
private boolean |
handleInappropriateCredentials()
Handles the InappropriateCredentials Fault. |
private void |
handleRedirectRequestState()
If the WSC resends its request it MUST set the value of the wsa:RelatesTo SOAP Header to the same value of the wsa:MessageID SOAP Header of the SOAP Fault that carried the <RedirectRequest> element. |
boolean |
hasRedirectRequestBeenIssued()
The RedirectRequest element instructs the WSC to redirect the user to the WSP. |
boolean |
hasUpdatedEndpointReference()
This boolean indicates that there is an updated endpoint reference that needs to be processed by the service client. |
private void |
initializeRequestEnvelope()
|
void |
invoke()
Invoke the WSFMessage sending the SOAP requestEvelope and placing the response in the responseEnvelope. |
static java.lang.String |
prettyPrintRequestMessage(WSFMessage message)
Prints a nice looking output of the request message |
static java.lang.String |
prettyPrintResponseMessage(WSFMessage message)
Prints a nice looking output of the response message |
private boolean |
processEndpointUpdated()
This method handles the creation of a new EndpointReference from an EndpointUpdate element. |
private void |
processResponse(java.lang.String responseString)
This method will take care of all of the responsibilities required of a WSC when receiving a response from a WSP. |
void |
setHeaderProcessingContext(ProcessingContext processingContext)
Adds this ProcessingContext to the header or replaces an existing ProcessingContext with this one |
void |
setRequestEnvelope(org.opensaml.ws.soap.soap11.Envelope envelope)
|
void |
setResponseEnvelope(org.opensaml.ws.soap.soap11.Envelope envelope)
|
protected void |
setServiceClient(BaseServiceClient serviceClient)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
protected static org.opensaml.xml.parse.BasicParserPool parser
protected static org.opensaml.xml.io.MarshallerFactory marshallerFactory
protected static org.opensaml.xml.io.UnmarshallerFactory unmarshallerFactory
protected static org.opensaml.xml.XMLObjectBuilderFactory builderFactory
private BaseServiceClient serviceClient
private org.opensaml.ws.soap.soap11.Envelope envelope
private org.opensaml.ws.soap.soap11.Envelope responseEnvelope
private java.lang.String actionString
private java.util.List<java.lang.String> signatureIds
private RedirectRequest redirectRequest
private boolean endpointUpdated
| Constructor Detail |
|---|
private WSFMessage(BaseServiceClient serviceClient)
| Method Detail |
|---|
public void addWSUIdAttribute(org.opensaml.xml.AttributeExtensibleXMLObject obj,
java.lang.String id)
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
<xsd:attribute name="Id" type="xsd:ID">
<xsd:annotation>
<xsd:documentation>
This global attribute supports annotating arbitrary elements with an ID.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
public void addSOAP11Attributes(org.opensaml.xml.AttributeExtensibleXMLObject obj,
boolean mustUnderstand)
public static WSFMessage createWSFMessage(BaseServiceClient serviceClient,
java.lang.String actionString)
throws org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException
org.opensaml.xml.io.UnmarshallingException
org.opensaml.xml.parse.XMLParserException
private void initializeRequestEnvelope()
throws org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException
org.opensaml.xml.parse.XMLParserException
org.opensaml.xml.io.UnmarshallingExceptionpublic java.util.List<java.lang.String> getSignatureIds()
protected BaseServiceClient getServiceClient()
protected void setServiceClient(BaseServiceClient serviceClient)
public void setHeaderProcessingContext(ProcessingContext processingContext)
processingContext -
public void invoke()
throws java.io.IOException,
org.opensaml.xml.io.MarshallingException,
org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException,
WSCException,
java.security.GeneralSecurityException
java.io.IOException
org.opensaml.xml.io.MarshallingException
org.opensaml.xml.parse.XMLParserException
org.opensaml.xml.io.UnmarshallingException
WSCException
java.security.GeneralSecurityException
private void processResponse(java.lang.String responseString)
throws org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException,
WSCException,
java.io.IOException,
org.opensaml.xml.io.MarshallingException,
java.security.GeneralSecurityException
e.g. Fault:
<se:Fault xmlns:sb-ext="urn:liberty:sb:2004-04">
<faultcode>se:Client</faultcode>
<faultstring>soap fault</faultstring>
<detail namespace="urn:liberty:sb:2003-08">
<lu:Status xmlns:lu="urn:liberty:util:2006-08" code="IDStarMsgNotUnderstood"/>
</detail>
</se:Fault>
responseString -
org.opensaml.xml.parse.XMLParserException
org.opensaml.xml.io.UnmarshallingException
WSCException
org.opensaml.xml.io.MarshallingException
java.io.IOException
java.security.GeneralSecurityExceptionprivate boolean handleInappropriateCredentials()
In the case of a Fault with a Status code "InappropriateCredentials" this method examines the CredentialsContext header and attempts to renegotiate with the DS for a more appropriate SecurityMechanism or reauthenticate with the AS in the case of a RequestedAuthnContext element being present in the CredentialsContext header.
private boolean processEndpointUpdated()
EndpointReference from an EndpointUpdate element.
For a COMPLETE Update:
If updateType is not present or has the value urn:liberty:sb:2006-08:EndpointUpdate:Complete, the <wsa:EndpointUpdate> is a completely specified endpoint reference.
For a PARTIAL Update:
1. Take the <wsa:Address> from the <wsa:EndpointUpdate>. If the value is urn:liberty:sb:2006-08:EndpointUpdate:NoChange, then take the <wsa:Address> from the original endpoint reference.
2. Take the <wsa:ReferenceParameters> from the <wsa:EndpointUpdate>, if present. Then, if <wsa:ReferenceParameters> is present in the orginal endpoint reference, take each direct child from that element that does not match an element already taken from the update (comparing the namespace qualified names of the elements).
3. Take the <wsa:Metadata> from the <wsa:EndpointUpdate>, if present. Then, if <wsa:Metadata> is present in the orginal endpoint reference, take each direct child from that element that does not match an element already taken from the update (comparing the namespace qualified names of the elements).
4. Take any extension elements from the <wsa:EndpointUpdate>, if present. Then, if any extension elements are present in the orginal endpoint reference, take each one that does not match * @return
private void handleEndpointUpdatedState()
throws org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException
org.opensaml.xml.io.UnmarshallingException
org.opensaml.xml.parse.XMLParserException
private void handleRedirectRequestState()
throws org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException
(From Section 7 [LibertySOAPBinding] document http://www.projectliberty.org/specs )
org.opensaml.xml.io.UnmarshallingException
org.opensaml.xml.parse.XMLParserExceptionpublic static java.lang.String prettyPrintRequestMessage(WSFMessage message)
message - public static java.lang.String prettyPrintResponseMessage(WSFMessage message)
message -
public static org.opensaml.ws.soap.soap11.Envelope buildSOAPEnvelope()
throws org.opensaml.xml.parse.XMLParserException,
org.opensaml.xml.io.UnmarshallingException
Read in a SOAP Envelope and unmarshall it Currently being built by reading in SOAP template file (is) This may ultimately be built from scratch to improve performance
is -
org.opensaml.xml.parse.XMLParserException
org.opensaml.xml.io.UnmarshallingExceptionpublic org.opensaml.ws.soap.soap11.Envelope getRequestEnvelope()
public void setRequestEnvelope(org.opensaml.ws.soap.soap11.Envelope envelope)
public org.opensaml.ws.soap.soap11.Envelope getResponseEnvelope()
public void setResponseEnvelope(org.opensaml.ws.soap.soap11.Envelope envelope)
public boolean hasRedirectRequestBeenIssued()
public boolean hasUpdatedEndpointReference()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||