SendMessage Method
Sends a SOAP message to the server.
procedure SendMessage(Url: String);
Remarks
The SendMessage() does the following:
- Loads the data from InputBytes, InputFile or InputStream properties.
If the data contains a SOAP message, no pre-send processing is performed.
If the data contains XML content, then basing on OperationName, OperationNamespaceURI and SOAPVersion properties new SOAP envelope will be created. The XML content will be used either as either the operation itself or the operation parameters, depending on OperationName value.
- Sends the SOAP message to the service Url.
Use SOAPAction, Encoding and MimeType properties to set SOAP HTTP request parameters.
- If the request is successful, the received content is saved in either OutputBytes, OutputFile or OutputStream.
If the response contains attachment(s) then BeforeReceiveAttachment event will be fired for each attachment, following which the attachment will be saved to either OutputAttachmentBytes, OutputAttachmentFile or OutputAttachmentStream.
Use SOAPResponseType to get the type of the received content. If the received content is recognized as a SOAP message, then OperationResponseName, OperationResponseNamespaceURI OperationResponseTextContent and OperationResponseXML properties will be populated.
- If an error happens during the request, an exception is thrown.
Use SOAPResponseType to identify the received content. The type set to Unknown means that either a connection error has occurred or the service has returned an unexpected HTTP status code. In this case, the error details are published in StatusCode and ReasonPhrase properties.
If SOAPResponseType set to a different value indicates that the service has returned HTTP status code in the range 500 - 599, indicating a service error.
If the type of received content is SOAP message, then FaultActor, FaultCode, FaultDetail and FaultString properties will contain error details returned by the service.
If the request has succeeded then the received content will also be available in either OutputBytes, OutputFile or OutputStream properties.