Skip to main content
Version: 20 R7 BETA

WEB SERVICE SET PARAMETER

WEB SERVICE SET PARAMETER ( name ; value {; soapType} )

ParameterTypeDescription
nameTextName of parameter to include in SOAP request
valueVariable4D variable containing the value of the parameter
soapTypeTextSOAP type of the parameter

Description

The WEB SERVICE SET PARAMETER command enables the definition of a parameter used for a client SOAP request. Call this command for each parameter in the request (the number of times the command is called depends on the number of parameters).

In name, pass the name of the parameter as it must appear in the SOAP request.

In value, pass the 4D variable containing the value of the parameter. In the case of proxy methods, this variable is generally $1, $2, $3, etc., corresponding to a 4D parameter passed to the proxy method when it was called. It is, however, possible to use intermediary variables.

Note: Each 4D variable or array used must first be declared using the commands of the theme Compiler or Arrays.

By default, 4D automatically determines the most appropriate SOAP type for the name parameter according to the content of value. The indication of the type is included in the request.

However, you may want to “force” the definition of the SOAP type of a parameter. In this case, you can pass the optional soapType parameter using one of the following character strings (primary data types):

soapTypeDescription
stringText
intInteger
booleanBoolean
float32-bit real
decimalReal with decimal
double64-bit real
durationDuration in years, months, days, hours, minutes, seconds, for example
P1Y2M3DT10H30M
datetimeDate and time in ISO8601 format, for example 2003-05-31T13:20:00
timeTime, for example 13:20:00
dateDate, for example 2003-05-31
gyearmonthYear and month (Gregorian calender), for example 2003-05
gyearYear (Gregorian calender), for example 2003
gmonthdayMonth and day (Gregorian calender), for example --05-31
gdayDay (Gregorian calender), for example ---31
gmonthMonth (Gregorian calender), for example --10--
hexbinaryValue expressed in hexadecimal
base64binaryBLOB
anyuriUniform Resource Identifier (URI), for example
http://www.company.com/page
qnameQualified XML name (namespace and local part)
notationNotation attribute
  • Notes:
    • For more information about XML data types, refer to the URL http://www.w3.org/TR/xmlschema-2/
    • This command does not support blob objects (4D.Blob type). See Passing blobs and blob objects to 4D commands on developer.4d.com.

Example

This example defines two parameters:

 var $1 : Text
 var $2 : Text
 WEB SERVICE SET PARAMETER("city";$1)
 WEB SERVICE SET PARAMETER("country";$2)

See also

WEB SERVICE CALL
WEB SERVICE GET RESULT