Consultor Eletrônico



Kbase P129670: SAX-PARSE method generates two GET calls to WebServer
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/2010
Status: Unverified

SYMPTOM(s):

SAX-PARSE method generates two GET calls to WebServer

When using SAX-PARSE to read an XML document from a webserver two separate GET requests are issued.

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.1x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)
HTTP request to XML file on remote WebServer file is fired twice

CAUSE:

The double read is caused by our implementation for reading the prolog of an xml document with the SAX reader. We do a read of the prolog, then restart the parser to read the document. So the first get is done to read the prolog, and the second get is to read the document for real.

FIX:

This functions as Designed.

If this behavior is not desirable there are several workarounds, i.e.:
- Put the result of the HTTP request in a LONGCHAR and open the LONGCHAR using the SAX-READER.
- Save the file locally first (using i.e. xmlint UNIX command) and parse the file using the SAX-READER.