[stackoverflow] [progress Openedge Abl] Progress - Get Full Response From Web Service

Status
Not open for further replies.
M

Maciej Świerczek

Guest
I have problem with geting full response from SOAP WS in Progress OpenEdge. "bprowsdldoc" app generated full call and output structure to DATASET, but in DATASET I have only last element of "document" type. Response looks like this:

<GetDocumentsResponse>
<documentsCount>3</documentsCount>
<document>
<content filename="file1.xml" mime="application/xml"> [base64] </content>
</document>
<document>
<content filename="file2.xml" mime="application/xml"> [base64] </content>
</document>
<document>
<content filename="file3.xml" mime="application/xml"> [base64] </content>
</document>
<documentsInfo>All done.</documentsInfo>
</GetDocumentsResponse>


My goal is to get all "document" elements in output DATASET (count of 3 is only a sample) or get full response XML as LONGCHAR. Any help will be appreciated.

EDIT:

Web service is internal in my company and calling it requiers VPN connection, so I can't give You link. But bprowsdldoc generated a code like this for method "GetDocuments":

DEFINE VARIABLE dateStart AS DATE NO-UNDO.
DEFINE VARIABLE dateEnd AS DATE NO-UNDO.
DEFINE VARIABLE documentsCount AS INT64 NO-UNDO.

DEFINE TEMP-TABLE document NO-UNDO
FIELD docId AS CHARACTER.

DEFINE TEMP-TABLE content NO-UNDO
FIELD filename AS CHARACTER
XML-NODE-TYPE "ATTRIBUTE"
FIELD mime AS CHARACTER
XML-NODE-TYPE "ATTRIBUTE"
FIELD content_Text AS RAW
XML-NODE-TYPE "TEXT"
FIELD document_id AS RECID
XML-NODE-TYPE "HIDDEN" .

DEFINE DATASET documentDset
XML-NODE-TYPE "HIDDEN"
FOR document, content
PARENT-ID-RELATION RELATION1 FOR document, content
PARENT-ID-FIELD document_id.

DEFINE VARIABLE documentsInfo AS CHARACTER NO-UNDO.

RUN GetDocuments IN hDocumentHandlingPort(INPUT dateStart, INPUT dateEnd, OUTPUT documentsCount, OUTPUT DATASET documentDset, OUTPUT documentsInfo).


After calling this method I get proper response for variables documentsCount and documentsInfo but in TEMP-TABLE content I got only one row with document element from response (there should be 3 for dates from 2017-03-16 to 2017-03-16 as ine example response on the top of my post).

Response in WSDL looks like this:

<xs:element name="GetDocumentsResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="documentsCount" type="xs:long"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="document" type="ns1:documentType"/>
<xs:element minOccurs="0" name="documentsInfo" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>


I think that problem may be related to maxOccurs attribute of element document - it's unbounded and maybe there should be some numeric value...

Can You help mi handle this problem?

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