4D v16.3

WEB SERVICE GET RESULT

Home

 
4D v16.3
WEB SERVICE GET RESULT

WEB SERVICE GET RESULT 


 

WEB SERVICE GET 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 WEB SERVICE GET 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 WEB SERVICE CALL 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)
 
 WEB SERVICE SET PARAMETER("city";$1)
 WEB SERVICE SET PARAMETER("country_code";$2)
 
 WEB SERVICE CALL("http://www.citiesoftheworld.com/WS";"WSTime#City_time";"City_time";\
 "http://www.citiesoftheworld.com/namespace/default")
 
 If(OK=1)
    WEB SERVICE GET RESULT($0;"return";*)
 End if



See also 

WEB SERVICE CALL
WEB SERVICE SET PARAMETER

 
PROPERTIES 

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

 
HISTORY 

Created: 4D 2003
Renamed: 4D v13

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)