4D v12.4

GET WEB SERVICE RESULT

Home

 
4D v12.4
GET WEB SERVICE RESULT

 

GET WEB SERVICE RESULT 


 

GET WEB SERVICE RESULT ( returnValue {; returnName {; *}} ) 
Parameter Type   Description
returnValue  Variable in Value returned by the Web Service
returnName  String in Name of the parameter to be retrieved
in Free up memory

The GET WEB SERVICE RESULT command retrieves a value sent back by the Web Service as a result of the processing performed.

Note: This command must be used only after the CALL WEB SERVICE command.

The returnValue parameter receives the value sent back by the Web Service. Pass a 4D variable in this parameter. This variable is generally $0, corresponding to the value returned by the proxy method. It is, however, possible to use intermediary variables (you must use process variables only).

Note: Each 4D variable or array used must be previously declared using the commands of the “Compiler and Arrays” themes.

The optional returnName parameter specifies the name of the parameter to be retrieved. However, since most Web Services only return a single value, this parameter is generally not necessary.

The optional * parameter signals the program to free up the memory devoted to the processing of the request. You must pass this parameter after retrieving the last value sent by the Web Service.

Example  

Imagine that a Web Service returns the current time in any city in the world. The parameters received by the Web Service are the name of the city and the country code. In return, the Web Service sends the corresponding time. The proxy calling method could be in the following form:

 C_TEXT($1)
 C_TEXT($2)
 C_TIME($0)
 
 SET WEB SERVICE PARAMETER("city";$1)
 SET WEB SERVICE PARAMETER("country_code";$2)
 
 CALL WEB SERVICE("http://www.citiesoftheworld.com/WS";"WSTime#City_time";"City_time";
 "http://www.citiesoftheworld.com/namespace/default")
 
 If(OK=1)
    GET WEB SERVICE RESULT($0;"return";*)
 End if

 
PROPERTIES 

Product: 4D
Theme: Web Services (Client)
Number: 779

 
HISTORY 

Created: 4D 2003

 
SEE ALSO 

CALL WEB SERVICE
SET WEB SERVICE PARAMETER