Get Web Service error info

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2003


Get Web Service error info (infoType) String

ParameterTypeDescription
infoTypeLongintInformation to be retrieved
Function resultStringInformation about the last SOAP error

Description

The Get Web Service error info command returns information about the last error encountered during the execution of a SOAP request sent to a remote Web Service.

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:

ConstantTypeValue
Web Service Error CodeLongint0
Web Service Detailed MessageLongint1
Web Service HTTP Error codeLongint2
Web Service Fault ActorLongint3

These constants are used to retrieve the following values:

Web Service Error Code: 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 Detailed Message: 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 <body> 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 HTTP Error code: HTTP error code (to be used in case of main error 9912).

Web Service Fault Actor: 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)
- Client Fault
- Server Fault
- Encoding Unknown .

An empty string is returned when no information is available.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next