[Stackoverflow] [Progress OpenEdge ABL] How to debug a dataset response

Status
Not open for further replies.
J

Joseph Betts

Guest
Hello Progress4GL Developers,

I am trying to consume a Magento SOAP API and am dealing with a dataset as my output.

Here is the example procedure from the WSDL Analayser: enter image description here

I am expecting my XML response to look something like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento">
<SOAP-ENV:Body>
<ns1:salesOrderListResponseParam>
<result>
<complexObjectArray>
<increment_id>600000018</increment_id>
<store_id>6</store_id>
</complexObjectArray>
<complextObjectArray>
<increment_id>600000019</increment_id>
<store_id>7</store_id>
</complexObjectArray>
</result>
</ns1:salesOrderListResponseParam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


The current code I have is the following where I am expecting an output in the resultTable temp-table (but nothing is currently being returned).

define variable hs as handle no-undo.
define variable hp as handle no-undo.

DEFINE VARIABLE cUsername AS CHARACTER INIT "USERNAME".
DEFINE VARIABLE cPassword AS CHARACTER INIT "PASSWORDAPIKEY".
DEFINE VARIABLE oSession AS CHARACTER NO-UNDO.
DEFINE VARIABLE iRequest AS LONGCHAR NO-UNDO.


DEFINE TEMP-TABLE complexObjectArray NO-UNDO
NAMESPACE-URI ""
FIELD key AS CHARACTER
FIELD value1 AS CHARACTER
XML-NODE-NAME "value"
FIELD filter_id AS RECID
XML-NODE-TYPE "HIDDEN".

CREATE complexObjectArray.
assign
complexObjectArray.key = "status"
complexObjectArray.value1 = "pending".

DEFINE DATASET filter NAMESPACE-URI ""
FOR complexObjectArray.

DEFINE TEMP-TABLE resultTable NO-UNDO
NAMESPACE-URI "complexObjectArray"
FIELD increment_id AS CHARACTER.

DEFINE DATASET resultData NAMESPACE-URI "salesOrderListResponseParam"
FOR resultTable.

create server hs.
hs:connect( "-WSDL WSDLADDRESSHERE" ).

run PortType set hp on server hs.

run login in hp ( input cUsername, input cPassword, output oSession ).

message oSession . PAUSE 100.

run salesOrderList in hp ( input oSession, input dataset filter, output dataset resultData ).

for each resultTable:
disp resultTable with 2 col.
end.



delete procedure hp.
hs:disconnect().
delete object hs.


There are no errors, but it fails to show a response in the temp-table. Many Thanks in Advance!

Continue reading...
 
Status
Not open for further replies.
Top