SET WEB SERVICE OPTION

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 2004


SET WEB SERVICE OPTION (option; value)

ParameterTypeDescription
optionLongintCode of the option to set
valueLongint | TextValue of the option

Preliminary note: This command is designed for advanced Web Services users. Its use is optional.

Description

The SET WEB SERVICE OPTION command allows you to set different options that will be used during the next SOAP request triggered using the CALL WEB SERVICE command.

You can call this command as many times as there are options to be set.

In the option parameter, pass the number of the option to set and in the value parameter, pass the new value of the option. For these parameters, you can use one of the following predefined constants of the "Web Services (Client)" theme:

Constant (option param)TypeValue
Web Service HTTP TimeoutLongint1
Web Service SOAP HeaderLongint2
Web Service SOAP VersionLongint3

Constant (value param)TypeValue
Web Service SOAP_1_1 Longint0
Web Service SOAP_1_2Longint1

The following details each of the options and possible values:

option = Web Service HTTP Timeout

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 10 seconds by default. It can be modified for specific reasons (network status, Web Service specifics, etc.).

option = Web Service SOAP Header

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 CALL WEB SERVICE command. SOAP requests do not contain a specific header by default. However, certain Web Services require a header, for example when managing identification parameters.

option = Web Service SOAP Version

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.

The order in which the options are called is not important. If the same option is set several times, only the value of the last call is taken into account.

Examples

1. Insertion of a customized header in the SOAP request:

      ` Creating an XML reference
   C_STRING(16;vRootRef;vElemRef)
   vRootRef:=DOM Create XML Ref("RootElement")
   vxPath:="/RootElement/Elem1/Elem2/Elem3"
   vElemRef:=DOM Create XML element(vRootRef;vxPath)
      `Modifying SOAP header with reference
   SET WEB SERVICE OPTION(Web Service SOAP Header;vElemRef)

2. Using version 1.2 of the SOAP protocol:

   SET WEB SERVICE OPTION(Web Service SOAP Version;Web Service SOAP_1_2)

See Also

CALL WEB SERVICE.


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