Integration Server 10.3 | Built-In Services Reference Guide | SOAP Folder | Summary of Elements in this Folder | pub.soap.utils:streamToSoapData
 
pub.soap.utils:streamToSoapData
WmPublic. Converts an InputStream containing a SOAP message to a SOAP object.
(A SOAP message must be represented as a SOAP object to be used with the data-retrieval services such as pub.soap.utils:getHeader and pub.soap.utils:getBody).
Note:
This service is a convenient way to produce a SOAP object during development and testing. It is not meant to be used for production purposes because it does not ensure that a valid SOAP message is produced. For production purposes, we recommend that you create SOAP objects with the pub.soap.utils:createSoapData service and populate them with the message-composition services (for example, pub.soap.utils:addBodyEntry and pub.soap.utils:addHeaderEntry).
Input Parameters
stream
java.io.InputStream SOAP message that is to be converted to a SOAP object.
soapProtocol
String Optional. Indicates the SOAP protocol that the resulting SOAP object will work with. The default value is read from the watt.server.SOAP.defaultProtocol property. Set to:
*SOAP 1.1 Protocol to indicate the SOAP object works with SOAP 1.1.
*SOAP 1.2 Protocol to indicate the SOAP object works with SOAP 1.2.
Output Parameters
soapData
Object SOAP object representation of the SOAP message in stream.
Usage Notes
Be aware that if stream does not contain a valid SOAP message, this service does not throw an exception. Instead, it produces a soapData that contains a representation of whatever it received in stream (which might not even be an XML document). This will cause problems later when you attempt to use the soapData with other SOAP utilities or pass it to the message handler. To determine whether soapData represents a valid SOAP message, we recommend that you always execute the pub.soap.utils:validateSoapData service immediately after using streamToSoapData.
See Also
pub.soap.utils:soapDataToBytes
pub.soap.utils:stringToSoapData
pub.soap.utils:validateSoapData