WEB SERVICE Get info
WEB SERVICE Get info ( infoType ) : Text
Parameter | Type | Description | |
---|---|---|---|
infoType | Integer | → | Information to be retrieved |
Function result | Text | ← | Information about the last SOAP error |
Description
The WEB SERVICE Get info command returns information about any error generated during the execution of the last SOAP request sent to a remote Web Service. This command should generally be called within an error-handling method installed by the ON ERR CALL command.
The infoType parameter allows you to indicate the type of information that you want to obtain. You must pass one of the constants listed below, located in the Web Services (Client) theme:
Constant | Type | Value | Comment |
---|---|---|---|
Web Service detailed message | Integer | 1 | Detailed message describing the error. The type of message differs according to the main error type. - If the main error = 9910 (Soap fault): the cause of the SOAP fault is returned (e.g.: “the remote method does not exist”). - If the main error = 9911 (Parser fault): the location of the error in the XML document is returned. - If the main error = 9912 (HTTP fault): - if the HTTP error is located in the interval [300-400] (problems linked to the location of the requested document), the new location of the requested URL is returned. - for any other HTTP error code, the is returned. - If the main error = 9913 (Network fault): the cause of the network fault is returned (e.g.: “ServerAddress: DNS lookup failure”) - If the main error = 9914 (Internal fault): the cause of the internal fault is returned |
Web Service error code | Integer | 0 | Main error code (defined by 4D). This code is also returned in the Error system variable. List of codes that may be returned: 9910: Soap fault (see also Web Service Fault Actor) 9911: Parser fault 9912: HTTP fault (see also Web Service HTTP Error code) 9913: Network fault 9914: Internal fault. |
Web Service fault actor | Integer | 3 | Cause of the error (returned by the SOAP protocol — to be used in the case of main error 9910). - Version Mismatch - Must Understand (the server was unable to interpret a parameter defined as mandatory) - Sender Fault - Receiver Fault - Encoding Unknown |
Web Service HTTP status code | Integer | 2 | HTTP error code (to be used in case of main error 9912). |
An empty string is returned when no information is available, more particularly when the last SOAP request did not generate any errors.