Products Downloads


French version


 

 

      

VADELIA

      

WADELIA

      

 

(I/B) (C)

 

(I/B) (C)

 

 

Note: With VADELIA batch programs, this instruction is not compatible with the Mobile client generator.

 

Context for use

SOAP Web Service consumption.

 

Section for use

All

 

Syntax

WS_GET_VAL WebServiceId OperationId ReqId GetResult

 

ReqId

*ID(numId) | None

numId

VarNumId | CstNum

     

GetResult

ResVarId |

 

 

XPATHQuery ResVarId |

 

 

XPATHQuery *TEXT ResVarId |

 

 

XPATHQuery seriesAttributeOrElement

     

seriesAttributeOrElement

seriesAttributeOrElement, AttributeOrElement | AttributeOrElement

     

AttributeOrElement

AttributeId ResVarId | *TEXT ResVarId

 

 

Description

This instruction retrieves all the values returned by the WebServiceId Web service's OperationId for the numId request operation previously called using the WS_CALL instruction.

If the result parameter is of a simple (rather than complex) type, the following syntax should be used:

WS_GET_VAL WebServiceId OperationId ResVarId

With complex parameters, the syntax must include a XPATH query specifying:

- a leaf element in the result tree structure,

- and/or an element in the result tree structure that has one or more attributes.

The only time you need to use the *TEXT directive is if you want to retrieve the value associated with the element and the values associated with the element's attributes.

ResVarId result variables must be compatible with the variable types specifed by the operation.

 

Notes:

    • A valid XPATH query may return a blank element if the element can be defined by the Web service as being optional.
    • Data for which the basic type is real, date, time or timestamp must be in the ISO format to ensure correct interpretation by Adelia.
    • OperationId and the elements in the XPATH query are case-sensitive.
    • For an 'RPC/Encoded' SOAP style Web service called in "parameter" mode, the *ID keyword is not supported.

 

It is possible to check that the information has been retrieved by testing the *RETURN_CODE reserved word.

If this reserved word returns a value other than *NORMAL, the *RETURN_MSG provides a description of the error.

 

Example

* Retrieves a simple result: the result is retrieved directly

*

WS_GET_VAL CURRENCYCONVERT DM2EUR EF_EURO:

* Retrieves a complex result (tree structure: XPATH query): leaf element

*

WS_GET_VAL IP2GEO ResolveIP /ResolveIPResult/City *TEXT EF_CITY:

WS_GET_VAL IP2GEO ResolveIP /ResolveIPResult/City EF_CITY:

WS_GET_VAL IP2GEO ResolveIP /ResolveIPResult/ StateProvince *TEXT ResVar2

WS_GET_VAL IP2GEO ResolveIP *ID(2) /ResolveIPResult/ StateProvince *TEXTE VarRes2

WS_GET_VAL GOOGLESEARCH doGoogleSearch /return/resultElements/#[1]/summary  VarSummary

* Retrieves a complex result (tree structure: XPATH query): attributes

*

WS_GET_VAL SEARCHIDCalcId ResolveAttr/ElemIdent SurnameId EF_SURNAME:, FirstNameId EF_FIRSTNAME:

 

 

↑ Top of page

  • Aucune étiquette