4D v16.3

Web Services (Client)

Home

 
4D v16.3
Web Services (Client)

Web Services (Client) 

 

Constant  Type Value Comment
Web Service compression  Longint 1  
Web Service detailed message  Longint 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 <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 display auth dialog  Longint 4 value =  0 (do not display dialog box) or 1 (display dialog box)
This option manages the display of the authentication dialog box during execution of the WEB SERVICE CALL command. By default, this command never displays the dialog box; normally, you have to use the WEB SERVICE AUTHENTICATE command to do so. However, if you want the authentication dialog box to appear in order for the user to enter their identifiers, you will need to use this option: pass 1 in value to display the dialog box and 0 otherwise. The dialog box only appears if the Web service requires authentication
Web Service dynamic  Longint 0  
Web Service error code  Longint 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  Longint 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 compression  Longint 6 value = Web Service Compression
This option is used to enable an internal compression mechanism for SOAP requests in order to accelerate inter-4D application exchanges. When you execute the statement WEB SERVICE SET OPTION(Web Service HTTP Compression; Web Service Compression) on the 4D client of the Web Service, the data of the next SOAP request sent by the client will be compressed using a standard HTTP mechanism ("gzip" or "deflate", depending on the request contents) before being sent to the 4D SOAP server. The server will decompress and parse the request, then will reply automatically using the same mechanism. Only the request that follows the call to the WEB SERVICE SET OPTION command is affected. You must therefore call this command each time you want to use compression. By default, 4D does not compress Web Service HTTP requests.
Note: This mechanism cannot be used for requests sent to a 4D SOAP server whose version is earlier than 11.3. So that you can further optimize this functioning, additional options configure the threshold and compression rate of the requests. These options can be accessed via the SET DATABASE PARAMETER command
Web Service HTTP error code  Longint 2 HTTP error code (to be used in case of main error 9912).
Web Service HTTP timeout  Longint 1 value = timeout of the client portion expressed in seconds.
The timeout of the client portion is the wait period of the Web Service client in case the server does not respond. After this period, the client closes the session and the request is lost.
This timeout is 180 seconds by default. It can be modified for specific reasons (network status, Web Service specifics, etc.).
Web Service manual  Longint 3  
Web Service manual in  Longint 1  
Web Service manual out  Longint 2  
Web Service reset auth settings  Longint 5 value = 0 (do not erase information) or 1 (erase information)
This option lets you indicate to 4D whether to memorize the authentication information of the user (user name, password, method, etc.), in order to reuse it subsequently. By default, this information is erased after each execution of the WEB SERVICE CALL command. Pass 0 in value to store the information and 1 to erase it. Note that when you pass 0, the information is kept during the session but is not stored.
Web Service SOAP header  Longint 2 value = XML root element reference to insert as a header in the SOAP request.
This option allows you to insert a header in a SOAP request generated using the WEB SERVICE CALL command. SOAP requests do not contain a specific header by default. However, certain Web Services require a header, for example when managing identification parameters
Web Service SOAP version  Longint 3 value = Web Service SOAP_1_1 or Web Service SOAP_1_2
This option lets you specify the SOAP protocol version used in the request. Pass the Web Service SOAP_1_1 constant in value to indicate version 1.1 and Web Service SOAP_1_2 to indicate version 1.2.
Web Service SOAP_1_1  Longint 0  
Web Service SOAP_1_2  Longint 1  


See also 

WEB SERVICE CALL
WEB SERVICE Get info
WEB SERVICE SET OPTION

 
PROPERTIES 

Product: 4D
Theme: List of constant themes

 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)