public class SOAPCommunicator extends Object
Modifier and Type | Method and Description |
---|---|
SOAPMessage |
createSOAPFault(String faultCode,
String faultString,
String detail)
Forms a SOAP Fault and puts it in the SOAP Message Body.
|
SOAPMessage |
createSOAPMessage(String xmlString,
boolean isClientMessage)
Creates
SOAPMessage with the input XML String
as message body. |
SOAPMessage |
createSOAPMessage(String header,
String body,
boolean isClientMessage)
Creates
SOAPMessage with the input XML String
as message header and body. |
MimeHeaders |
getHeaders(javax.servlet.http.HttpServletRequest req)
Returns mime headers in HTTP servlet request.
|
static SOAPCommunicator |
getInstance()
Gets the singleton instance of the SOAPCommunicator.
|
Element |
getSamlpElement(SOAPMessage message,
String localName)
Returns first Element with given local name in samlp name space inside
SOAP message.
|
Element |
getSOAPBody(SOAPMessage message)
Returns SOAP body as DOM Element from SOAPMessage.
|
SOAPMessage |
getSOAPMessage(javax.servlet.http.HttpServletRequest request)
Returns SOAP Message from
HttpServletRequest . |
SOAPConnection |
openSOAPConnection()
Opens a SOAP Connection.
|
SOAPMessage |
sendSOAPMessage(String xmlMessage,
String soapUrl,
boolean isClientMessage)
Send SOAP Message to specified url and returns message from peer.
|
String |
soapMessageToString(SOAPMessage message)
Converts a
SOAPMessage to a String . |
public static SOAPCommunicator getInstance()
public SOAPConnection openSOAPConnection() throws SOAPException
SOAPConnection
if
- there was an exception creating the
SOAPConnection
object.SOAPException
public SOAPMessage createSOAPMessage(String xmlString, boolean isClientMessage) throws SOAPException, SAML2Exception
SOAPMessage
with the input XML String
as message body.xmlString
- XML string to be put into SOAPMessage
body.isClientMessage
- true if the message is sent from SOAP client to
server.SOAPMessage
.SOAPException
- if it cannot create the
SOAPMessage
.SAML2Exception
public SOAPMessage createSOAPMessage(String header, String body, boolean isClientMessage) throws SOAPException, SAML2Exception
SOAPMessage
with the input XML String
as message header and body.header
- XML string to be put into SOAPMessage
header.body
- XML string to be put into SOAPMessage
body.isClientMessage
- true if the message is sent from SOAP client to
server.SOAPMessage
.SOAPException
- if it cannot create the SOAPMessage
.SAML2Exception
public Element getSOAPBody(SOAPMessage message) throws SAML2Exception
message
- SOAPMessage object.SAML2Exception
public SOAPMessage createSOAPFault(String faultCode, String faultString, String detail)
faultCode
- Fault code.faultString
- Fault string.detail
- Fault details.public SOAPMessage getSOAPMessage(javax.servlet.http.HttpServletRequest request) throws IOException, SOAPException
HttpServletRequest
.request
- HttpServletRequest
includes SOAP Message.IOException
- if error in creating input stream.SOAPException
- if error in creating soap message.public SOAPMessage sendSOAPMessage(String xmlMessage, String soapUrl, boolean isClientMessage) throws SOAPException, SAML2Exception
xmlMessage
- String
will be sent.soapUrl
- URL the mesaage send to.isClientMessage
- true if the message is sent from SOAP client to
server.SOAPException
- if error in creating soap message.SAML2Exception
- if error in creating soap message.public String soapMessageToString(SOAPMessage message)
SOAPMessage
to a String
.message
- SOAPMessage object.String
converted from the
SOAPMessage
or null if an error ocurred.public Element getSamlpElement(SOAPMessage message, String localName) throws SAML2Exception
message
- SOAP message.localName
- local name of the Element to be returned.SAML2Exception
- if the Element could not be found or there is
SOAP Fault present.public MimeHeaders getHeaders(javax.servlet.http.HttpServletRequest req)
req
- HTTP servlet request.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.