Package com.adobe.xfa.soap
Class SOAP
java.lang.Object
com.adobe.xfa.soap.SOAP
SOAP is the class which allows sending and receiving of soap messages.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic SOAPcreateFromXMLStreams(InputStream headerStream, InputStream bodyStream, String loadOptions) Creates a Soap model from a header stream and a body stream.static booleanexportContentsToXML(Element element, OutputStream outputStream) Export the contents of a SOAP node (and its descendants) to XML.Gets the element which is the SOAP:Body elementGets the element which is the Envelope elementReturn the fault actor node.Return the fault code string (value of faultcode element).Return the fault detail string (value of faultdetail element).Return the SOAP fault node.Return the fault string (value of faultstring element).Gets the element which is the SOAP:Header elementGet an error string from the last operation.static final intgetNodeType(Node node) Return the SOAP type of a given DOM node.static SOAPloadFromStream(InputStream stream, String loadOptions) Loads a Soap message into a model from a stream, and creates a hierarchy for it.voidsaveAs(OutputStream outputStream) Writes the soap message into a stream.sendRequest(String inSOAPAddress, String inSOAPAction) Sends a SOAP message and returns the response.
-
Field Details
-
SOAP_UNKNOWN
public static final int SOAP_UNKNOWN- See Also:
-
SOAP_BODY
public static final int SOAP_BODY- See Also:
-
SOAP_ENVELOPE
public static final int SOAP_ENVELOPE- See Also:
-
SOAP_HEADER
public static final int SOAP_HEADER- See Also:
-
SOAP_FAULT
public static final int SOAP_FAULT- See Also:
-
-
Method Details
-
createFromXMLStreams
public static SOAP createFromXMLStreams(InputStream headerStream, InputStream bodyStream, String loadOptions) Creates a Soap model from a header stream and a body stream.- Parameters:
headerStream- - the stream that contains the XML data to load into the header.bodyStream- - the stream that contains the XML data to load into the Body.loadOptions- - (optional) loading options.- Returns:
- The created SOAPModel
-
exportContentsToXML
Export the contents of a SOAP node (and its descendants) to XML. Note that this method is used by the test program. It's unclear whether it has any other value in the public API.- Parameters:
element- SOAP node (element) to export.outputStream- Output stream to receive the contents of the exported node.- Returns:
- True if the node was a valid node and successfully exported. To be exported, the node must be a SOAP header or body element.
-
getNodeType
Return the SOAP type of a given DOM node.- Parameters:
node- Node for which the type is desired.- Returns:
- One of SOAP_ENVELOPE, SOAP_HEADER, SOAP_BODY, SOAP_FAULT or SOAP_UNKNOWN, depending on the node.
-
loadFromStream
Loads a Soap message into a model from a stream, and creates a hierarchy for it.- Parameters:
stream- - the stream that contains the data to load.loadOptions- - (optional) loading options.- Returns:
- The created SOAPModel
-
getBodyNode
Gets the element which is the SOAP:Body element- Returns:
- the SOAP:Body element.
-
getEnvelopeNode
Gets the element which is the Envelope element- Returns:
- the SOAP:Envelope element.
-
getFaultActor
Return the fault actor node.- Returns:
- The faultactor element from the SOAP operation; null if no fault actor.
-
getFaultCode
Return the fault code string (value of faultcode element).- Returns:
- The fault code from the SOAP operation; null if no fault code.
-
getFaultDetail
Return the fault detail string (value of faultdetail element).- Returns:
- The fault detail from the SOAP operation; null if no fault detail.
-
getFaultNode
Return the SOAP fault node.- Returns:
- The fault element from the SOAP operation; null if no fault element.
-
getFaultString
Return the fault string (value of faultstring element).- Returns:
- The fault string from the SOAP operation; null if no fault string.
-
getHeaderNode
Gets the element which is the SOAP:Header element- Returns:
- the SOAP:Header element.
-
getLastError
Get an error string from the last operation.- Returns:
- Error string from the last operation; null if that operation succeeded.
-
saveAs
Writes the soap message into a stream.- Parameters:
outputStream- - the stream to which the message will be written.
-
sendRequest
Sends a SOAP message and returns the response.- Parameters:
inSOAPAddress- The HTTP address where this SOAP message will be sent.inSOAPAction- The SOAP Action.- Returns:
- SOAPModel which is the response. If the message failed, this will contain the SOAP fault element
-