Back to Contents


Configuration API Functions - version 1.3 only

The following table lists those configuration API functions that can modify the behavior of the Web Services engine for the client as well as for the server.

Note: These functions are valid for backwards compatibility, but they are not the preferred way to handle Genero Web Services. See the GWS Com Extension Library classes and methods.

      Function       Description
fgl_ws_setOption() Sets an option flag with a given value.
fgl_ws_getOption() Returns the value of an option flag.

 


fgl_ws_setOption()

Purpose:

This function sets an option flag with a given value, changing the global behavior of the Web Services engine.

Syntax:

FUNCTION fgl_ws_setOption(optionName VARCHAR, 
         optionValue INTEGER)

Parameters:

  1. optionName is one of the global flags.
  2. optionValue is the value of the flag. 

Return values:

None

Possible runtime error:

INVALID_OPTION_NAME

Example:

01 CALL fgl_ws_setOption("http_invoketimeout",5)

fgl_ws_getOption()

Purpose:

This function returns the value of an option flag.

Syntax:

FUNCTION fgl_ws_getOption(optionName VARCHAR)
     RETURNING optionValue INTEGER

Parameter:

  1. optionName is one of the global flags.

Return value:

  1. optionValue is the value of the flag.

Possible runtime error:

INVALID_OPTION_NAME

Example:

01 DEFINE value INTEGER
02 LET value=fgl_ws_getOption("http_invoketimeout")
 

Option Flags

     Flags Client or Server        Commentary
 http_invoketimeout  Client Defines the maximum time in seconds a client has to wait before the client connection raises an error because the server is not responding. Note: A value of -1 means that it has to wait until the server responds (the default value is -1).
 tcp_connectiontimeout  Client Defines the maximum time in seconds a client has to wait for the establishment of a TCP connection with a server. Note: A value of -1 means infinite wait (the default value is 30 seconds except for Windows, where it is 5 seconds).
 soap_ignoretimezone  Both Defines if, during the marshalling and unmarshalling process of a BDL DATETIME data type, the SOAP engine should ignore the time zone information. Note: A value of zero means false (the default value is false).
 soap_usetypedefinition  Both Defines if the Web Services engine must specify the type of data in all SOAP requests. (This will add an "xsi:type" attribute to each parameter of the request.) Note: A value of zero means false (the default value is false).
wsdl_decimalsize  Server Defines if, during the WSDL generation, the precision and scale of a DECIMAL variable will be taken into account. See Notes on WSDL Generation Options below. Note: A value of zero means false (the default value is true).
wsdl_arraysize  Server Defines if, during the WSDL generation, the size of a BDL array will be taken into account. See Notes on WSDL Generation Options below. Note: A value of zero means false (the default value is true).
wsdl_stringsize  Server Defines if, during the WSDL generation, the size of a CHAR or VARCHAR variable will be taken into account. See Notes on WSDL Generation Options below. Note: A value of zero means false (the default value is true).


Notes on WSDL Generation Options

1. For a BDL type DECIMAL(5,2), when "wsdl_decimalsize" is TRUE, the generated WSDL file contains the total size and the size of the fractional part of the decimal:
<types>
   <schema xmlns="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.4js.com/types/">
      <simpleType name="echoDecimal5_2_a_dec5_2_out_FGLDecimal">
         <restriction base="decimal">
            <totalDigits value="5" /> 
            <fractionDigits value="2" /> 
         </restriction>
      </simpleType>
   </schema>
</types>
<message name="echoDecimal5_2">
  <part name="dec5_2" type="f:echoDecimal5_2_a_dec5_2_in_FGLDecimal" /> 
</message>

When "wsdl_decimalsize" is FALSE, the total size and the size of the fractional part are not mentioned:

<message name="echoDecimal5_2">
  <part name="dec5_2" type="xsd:decimal" /> 
</message>

2. If the WSDL file does not contain the size, the client application has no way of knowing the size. In this scenario, a default value for the size is generated. For example, the exported server type DECIMAL(5,2) becomes a DECIMAL(32) on the client side.

3. It is better to keep the options "wsdl_arraysize", "wsdl_stringsize", "wsdl_decimalsize" set to TRUE (default) so that the BDL client application can do an exact type mapping.