|
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_XMLRES WebServiceId OperationId QueryId DataRes
QueryId |
Þ |
*ID(numId) | None |
numId |
Þ |
VarNumId | CstNum |
DataRes |
Þ |
SoaphdrRes | SoaphdrRes | SoapbodyRes SoaphdrRes |
SoapbodyRes |
Þ |
*SOAPBODY_MEM(SoapbodyResMem) | *SOAPBODY_FILE(SoapbodyResFile) |
SoapbodyResMem |
Þ |
VarRes | VarRes, Encoding |
SoapbodyResFile |
Þ |
FileRes | FileRes, Encoding |
SoaphdrRes |
Þ |
*SOAPHDR_MEM (SoaphdrMemRes) | * SOAPHDR_FILE(SoaphdrFileRes) |
SoaphdrMemRes |
Þ |
MemRes | MemRes, Encoding |
SoaphdrFileRes |
Þ |
FileRes | FileRes, Encoding |
MemRes |
Þ |
AlphaVar | varImage |
FileRes |
Þ |
AlphaVar | 'AlphaConstant' |
Encoding |
Þ |
AlphaVar | 'AlphaConstant' |
Description
This instruction is used either to retrieve the SOAP message header, the body of the SOAP message, or both simultaneously.
The result is retrieved to an IMAGE variable, an ALPHA variable, or to an XML file. Target character encoding can be specified; by default UTF-8 encoding is used.
Notes:
-
- Instruction not supported for a SOAP 'RPC/Encoded' Web service called in "parameter" mode.
- The instruction can be called multiple times and is not exclusive with the WS_GET_VAL and WS_COUNT_VAL instructions.
Example
/* Retrieves the body of the result message to an ALPHA variable with 'windows-1252' encoding.
ALPHA(32000) SoapbodyRes
WS_GET_XMLRES GLOBALWEATHER GetWeather *SOAPBODY_MEM(SoapbodyRes, 'windows-1252')
/* Retrieves the body of the result message to a file with 'UTF-8' encoding:
WS_GET_XMLRES GLOBALWEATHER GetWeather *SOAPBODY_FILE('c:\resService\resBody.xml')
/* Retrieves the body of the result message to a file with 'windows-1252' encoding:
ALPHA(32) resficname
ALPHA(32) encoding
resficname = 'c:\resService\resBody.xml'
encoding = 'windows-1252'
WS_GET_XMLRES GLOBALWEATHER GetWeather *SOAPBODY_FILE(resficname, encoding)
/* Retrieves the header of the result message to an ALPHA variable with 'windows-1252' encoding.
ALPHA(32000) resHdr
WS_GET_XMLRES GLOBALWEATHER GetWeather *SOAPHDR_MEM(resHdr, 'windows-1252')
/* Retrieves the header of the result message to a file with 'UTF-8' encoding:
WS_GET_XMLRES GLOBALWEATHER GetWeather *SOAPHDR_FILE('c:\resService\resHdr.xml')
/* Retrieves the header of the result message to a file with 'windows-1252' encoding:
ALPHA(32) resficname
ALPHA(32) encoding
resficname = 'c:\resService\resHdr.xml'
encoding = 'windows-1252'
WS_GET_XMLRES GLOBALWEATHER GetWeather *SOAPHDR_FILE(resficname, encoding)