version 11.2 (Modified)
AUTHENTICATE WEB SERVICE (name; password{; authMethod})
| Parameter | Type | Description | |
| name | String | User name | |
| password | String | User password | |
| authMethod | Longint | Authentication method | |
| 0 or omitted = not specified, 1 = BASIC, 2 = DIGEST |
Description
The AUTHENTICATE WEB SERVICE command enables the use of Web Services requiring authentication of the client application (simple authentication). The BASIC and DIGEST methods are supported.
Note: For more information about the BASIC and DIGEST authentication methods, please refer to the Connection Security section.
In the name and password parameters, pass the required identification information (user name and password). This information will be encoded and added to the HTTP request sent to the Web Service using the CALL WEB SERVICE command. It is thus necessary to call the AUTHENTICATE WEB SERVICE command before calling the CALL WEB SERVICE command.
The optional authMethod parameter can be used to indicate the authentication method to be used for the next call to the CALL WEB SERVICE command. You can pass one of the following values:
2 = use the DIGEST authentication method
1 = use the BASIC authentication method
0 (or parameter omitted) = use the appropriate method. In this case, 4D sends an additional request in order to negotiate the authentication method.
By default, the authentication information is reset to zero after each request. Therefore, you must use the AUTHENTICATE WEB SERVICE command before each CALL WEB SERVICE command. It is nevertheless possible to temporarily keep this information using an option of the SET WEB OPTION SERVICE command. In this case, it is not necessary to execute the AUTHENTICATE WEB SERVICE command before each CALL WEB SERVICE command.
If authentication fails, the SOAP server returns an error that you can identify using the Get Web Service error info command.
See Also
CALL WEB SERVICE, Get Web Service error info.