Reputation: 153
I am trying to generate xml files using an oracle application express process. It currently works except a line is added at the end of the generated file ('Location: f?p=2...').
I use
owa_util.mime_header('text/xml',FALSE); htp.p('Content-Disposition: attachment; filename=[...]'); owa_util.http_header_close;
plus htp.p calls in order to generate the file.
Does someone know a way to not display the location line at the end of the file since a xml file cannot be parsed when the location line is incorporated?
Thank you in advance.
Upvotes: 3
Views: 1229
Reputation: 60262
The extra line is probably being generated by either something else on the page (e.g. a display item), on a global page (e.g. page zero), or in the page template.
What you probably need to do is, after generating all the output, tell the Apex engine to stop any further processing.
There are two ways to do this, depending on which version of Apex you're using:
Pre-APEX 4.1
apex_application.g_unrecoverable_error:= true;
APEX 4.1 and above
apex_application.stop_apex_engine;
Source: http://www.talkapex.com/2011/12/apexapplicationstopapexengine.html
Upvotes: 2