Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use of owa_util with oracle apex and location line at the end of generated files

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.

like image 468
LSdev Avatar asked Jan 21 '26 11:01

LSdev


1 Answers

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

like image 141
Jeffrey Kemp Avatar answered Jan 26 '26 03:01

Jeffrey Kemp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!