[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Last piece of data is being lost
I am using version 1.17 of HTTPAPI to get data from a web service.
I'm using http_url_post to send a SOAP request and store the results
in an IFS file. Everything appears to work correctly, except the
entire set of results are not placed into the file.
The code I am using is:
P GetWorkers B
D GetWorkers PI
D OutFile 100A CONST
D TimeOut C 120
/free
url = 'http://connectorprod.etrace.com/services/services/' +
'CompanyAdminService-0.0.1';
PostData =
'<?xml version="1.0" encoding="US-ASCII"?>'
+ '<soap:Envelope '
+ 'xmlns:soap="[1]http://schemas.xmlsoap.org/soap/envelope/"
'
+ 'xmlns:xsi="[2]http://www.w3.org/2001/XMLSchema-instance" '
+ 'xmlns:xsd="[3]http://www.w3.org/2001/XMLSchema" '
+
'xmlns:soapenc="[4]http://schemas.xmlsoap.org/soap/encoding/" '
+ 'xmlns:impl="[5]http://connectorprod.etrace.com/services/'
+ 'services/CompanyAdminService-0.0.1" '
+ 'xmlns:tns0="[6]http://service.webservice.gearworks.com"> '
+ ' <soap:Body '
+
'soap:encodingStyle="[7]http://schemas.xmlsoap.org/soap/encoding/">'
+ ' <tns0:getWorkers>'
+ ' <securityGroupFilter xsi:type="impl:ArrayOf_xsd_string"
'
+ ' soapenc:arrayType="xsd:string[1]"> '
+ ' <Item>WebService</Item> '
+ ' </securityGroupFilter> '
+ ' </tns0:getWorkers>'
+ ' </soap:Body>'
+ '</soap:Envelope>';
rc = http_url_post(%Trim(url)
: %addr(postData) + 2
: %len(postData)
: OutFile
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml'
:'');
IF rc <> 1;
Msg = http_error();
DSPLY Msg;
ENDIF;
return;
/end-free
P GetWorkers E
The resulting XML file is not complete --- data at the end is
missing. This file is only about 4k long, but another function
returns over 1900k, and again, the end of the file is missing, so it
doesn't appear to have anything to do with the amount of data being
returned.
The server that hosts the web service shows in its logs that all data
was sent in response to my request.
Anyone have any thoughts?
References
1. http://schemas.xmlsoap.org/soap/envelope/
2. http://www.w3.org/2001/XMLSchema-instance
3. http://www.w3.org/2001/XMLSchema
4. http://schemas.xmlsoap.org/soap/encoding/
5. http://connectorprod.etrace.com/services/'
6. http://service.webservice.gearworks.com/
7. http://schemas.xmlsoap.org/soap/encoding/">'
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------