Class Soap
java.lang.Object
org.keycloak.protocol.saml.profile.util.Soap
- Author:
- Pedro Igor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Soap.SoapFaultBuilder
static Soap.SoapMessageBuilder
static Document
extractSoapMessage
(jakarta.xml.soap.SOAPMessage soapMessage) Returns Docuemnt based on the given SOAP message.static Document
extractSoapMessage
(InputStream inputStream) Returns Docuemnt based on the giveninputStream
which must contain a valid SOAP message.static Node
getFirstChild
(Node parent) Get the first direct child that is an XML element.static String
toSamlHttpPostMessage
(Document document) Returns a string encoded accordingly with the SAML HTTP POST Binding specification based on the giveninputStream
which must contain a valid SOAP message.
-
Constructor Details
-
Soap
public Soap()
-
-
Method Details
-
createFault
-
createMessage
-
toSamlHttpPostMessage
Returns a string encoded accordingly with the SAML HTTP POST Binding specification based on the given
inputStream
which must contain a valid SOAP message.The resulting string is based on the Body of the SOAP message, which should map to a valid SAML message.
- Parameters:
document
- the document containing a valid SOAP message with a Body that contains a SAML message- Returns:
- a string encoded accordingly with the SAML HTTP POST Binding specification
-
extractSoapMessage
Returns Docuemnt based on the given
inputStream
which must contain a valid SOAP message.The resulting string is based on the Body of the SOAP message, which should map to a valid SAML message.
- Parameters:
inputStream
- an InputStream consisting of a SOAPMessage- Returns:
- A document containing the body of the SOAP message
-
extractSoapMessage
Returns Docuemnt based on the given SOAP message.
The resulting string is based on the Body of the SOAP message, which should map to a valid SAML message.
- Parameters:
soapMessage
- a SOAPMessage from which to extract the body- Returns:
- A document containing the body of the SOAP message
-
getFirstChild
Get the first direct child that is an XML element. In case of pretty-printed XML (with newlines and spaces), this method skips non-element objects (e.g. text) to really fetch the next XML tag.
-