Kbase P94165: Does Web Service 4GL client support the use of Progress 4GL TEMP-TABLES?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Verified
GOAL:
Does Web Service 4GL client support the use of Progress 4GL TEMP-TABLES?
GOAL:
How to consume a Web Service's TEMP-TABLE using 4GL?
FACT(s) (Environment):
OpenEdge 10.0x
FIX:
Enhancement Request# 20041012-023 has been implemented. Upgrade to OpenEdge 10.1A.
If upgrading is not possible, the Progress OpenEdge 10.0x Web Service client does not have the ability to automatically reconstruct the temp-table from a Web Service. The 4GL client will receive the temp-table as an output parameter in one of the following data types:
1- Using the Document/Literal WSDL Style:
a) LONGCHAR variable for a dynamic temp-table or static temp-table
2- Using the RPC/Encoded WSDL Style:
a) LONGCHAR EXTENT for a dynamic temp-table
b) LONGCHAR variable for a static temp-table
The following illustrates an example of a static temp-table:
1- Create and deploy the following 4GL code using ProxyGen and the Progress Explorer Tool:
DEFINE TEMP-TABLE ttvar
FIELD cod AS INTEGER
FIELD NAME AS CHAR
INDEX cod IS PRIMARY cod.
DEFINE OUTPUT PARAMETER TABLE-HANDLE tth.
CREATE ttvar.
ASSIGN ttvar.cod = 10
ttvar.NAME ="Myname".
tth = TEMP-TABLE ttvar:HANDLE.
2- Create the '4GL consumer' program:
DEFINE VARIABLE hWebService AS HANDLE.
DEFINE VARIABLE hdynappObj AS HANDLE.
DEFINE VARIABLE tth AS LONGCHAR NO-UNDO VIEW-AS editor NO-WORD-WRAP SCROLLBAR-HORIZONTAL SCROLLBAR-VERTICAL LARGE SIZE 60 BY 12.86.
CREATE SERVER hWebService.
hWebService:CONNECT("-WSDL 'http://localhost:8080/wsa/wsa1/wsdl?targetURI=urn:dyn'").
RUN dynappObj SET hdynappObj ON hWebService.
RUN dynamictt IN hdynappObj(OUTPUT tth). /* Table-handle is being passed and will be stored in the tth LONGCHAR variable */
DEFINE VARIABLE hXDoc as HANDLE.
DEFINE VARIABLE hXRoot as HANDLE.
DEFINE VARIABLE hXdataset as HANDLE.
DEFINE VARIABLE hXdata as HANDLE.
DEFINE VARIABLE hXitem AS HANDLE.
DEFINE VARIABLE hXcod AS HANDLE.
DEFINE VARIABLE hXname AS HANDLE.
CREATE X-DOCUMENT hXDoc. /* Creates a XML Document Object, so we can load the Longchar variable to the Document Object */
CREATE X-NODEREF hXRoot.
CREATE X-NODEREF hXdataset.
CREATE X-NODEREF hXdata.
CREATE X-NODEREF hXitem.
CREATE X-NODEREF hXcod.
CREATE X-NODEREF hXname.
hXDoc:LOAD("LONGCHAR",tth,FALSE). /* Data is loaded */
hXDoc:GET-CHILD(hXRoot, 1). /* That is just an example, nodes can be modified depending on your application */
hXRoot:get-child(hXdataset, 2).
hXdataset:GET-CHILD(hXdata,4).
hXdata:GET-CHILD(hXitem,2).
hXitem:GET-CHILD(hXcod,4).
hXcod:GET-CHILD(hXname,1).
MESSAGE hXname:NODE-VALUE
VIEW-AS ALERT-BOX INFO BUTTONS OK.