ValidateSOAPDoc method: SOAPDoc class

Syntax

ValidateSOAPDoc()

Description

Use the ValidateSOAPDoc method to validate the SOAP document for correctness as follows:

SOAP message is:

  • Encoded using XML.

  • Has SOAP envelope.

  • Has SOAP body.

  • Used SOAP encoding and envelope namespaces.

Returns

This method returns either a number or a constant. The values are:

Numeric Value Constant Value Description

0

%SOAP_Valid

The SOAPDoc is valid.

1

%SOAP_NoEnvelope

Missing or invalid envelope section in XML document.

2

%SOAP_InvalidEnvelope

Envelope has improper Namespace used. Should be: SOAP-ENV or SOAP-ENC

3

%SOAP_NoBody

Missing body section in XML document.

4

%SOAP_NoMethod

Missing or invalid method section in XML document.

6

%SOAP_InvalidXml

Invalid XML syntax in SOAPDoc.

Example

&Return = &MyDoc.ValidateSOAPDoc();
If &Return <> 0 Then
   /* do error processing */
End-if;