UTL_HTTP on XE
I know I'm probably pushing the friendship here, but I was looking to set up a very simple online shop using the pre-packaged app plus the Paypal integration. Unfortunately the later requires the UTL_HTTP package which by the looks of things doesn't come with XE. (I have Apex 3 on XE)
Are my aspirations too high or am I missing something really simple here ;-)
thanks in advance
I agree, need to add privileges to you user to do that. I post a quick HowTo on the past to use that function as region portlet like.
How to Display PHP Output as Portlet in HTML Region using utl_http.request
Good Luck D.
Similar Messages
-
Issues with using utl_http with Oracle Wallet
Hello Everyone,
We are experimenting with Oracle wallet and utl_http and are attempting to do an https transfer and we are facing some problems. I will appreciate your help greatly if you can advise on what could be wrong. We are on db version 10.2.0.1 and Unix HP-UX. The intention ping an https url and get a simple 200 response. Future development would include get/post XML documents from that url and other interesting stuff. I understand that utl_http with Oracle wallet can be used for this purpose.
The wallet has been created and the ewallet.p12 exists. We downloaded the SSL certificate from the url's website and uploaded into the wallet.
Everything works if I put in a url with plain http. However, it does not work with an HTTP*S* url.
With HTTPS when I run the below code I get the following error. Again, greatly appreciate your time and help because this is the first time we are using Oracle wallet manager and do not know where to go from here.
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1029
ORA-29268: HTTP client error
declare
url varchar2(225);
req utl_http.req;
resp utl_http.resp;
my_proxy BOOLEAN;
name varchar2(2000);
value varchar2(2000);
V_proxy VARCHAR2(2000);
v_n_proxy varchar2(2000);
v_msg varchar2(100);
v_len PLS_INTEGER := 1000;
BEGIN
-- Turn off checking of status code.
utl_http.set_response_error_check(FALSE);
--Set proxy server
utl_http.set_proxy('my-proxy');
utl_http.set_wallet('file:<full Unix path to the wallet on DB server>','wallet998');
req := utl_http.begin_request('https://service.ariba.com/service/transaction/cxml.asp');
--Set proxy authentication
utl_http.set_authentication(req, 'myproxyid', 'myproxypswd','Basic',TRUE); -- Use HTTP Basic
resp := utl_http.get_response(req);
FOR i IN 1..utl_http.get_header_count(resp) LOOP
utl_http.get_header(resp, i, name, value);
dbms_output.put_line(name || ': ' || value);
END LOOP;
utl_http.end_response(resp);
exception
when others then
dbms_output.put_line(sqlerrm);
END;I tried this using plsql ...
declare
SOAP_URL constant varchar2(1000) := 'http://125.21.166.27/cordys/com.eibus.web.soap.Gateway.wcp?organization=o=WIPRO,cn=cordys,o=itgi.co.in';
request UTL_HTTP.req;
begin
dbms_output.put_line('Begin Request');
request := UTL_HTTP.begin_request(SOAP_URL,'POST',UTL_HTTP.HTTP_VERSION_1_1);
dbms_output.put_line('After Request');
exception
when others then
dbms_output.put_line('Error : '||sqlerrm);
end;The output was ...
Begin Request
Error : ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1029
ORA-12535: TNS:operation timed outIt seems to be an issue with the webservice, plz check if its available & allowing requests. -
hi
I am getting the following error while calling the procedure in the batch process
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-29270: too many open HTTP requests
Could you please help me on this? As this is getting affected in the live databases.
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-29270: too many open HTTP requests
CREATE OR REPLACE PROCEDURE Send_To_Spg(
PTRANSACTION_ID IN VARCHAR2,
PCHANNEL_TYPE IN VARCHAR2 DEFAULT NULL,
PCSS_ORDER_NUMBER IN VARCHAR2 DEFAULT NULL,
PTELEPHONE_NUMBER IN VARCHAR2 DEFAULT NULL,
PSCENARIO_TYPE IN VARCHAR2 DEFAULT NULL,
PCUSTOMER_REQUIRED_DATE IN VARCHAR2 DEFAULT NULL,
PCUSTOMER_REQUIRED_TIME IN VARCHAR2 DEFAULT NULL,
PCANCELLATION_REASON IN VARCHAR2 DEFAULT NULL,
PCANCELLATION_NOTES IN VARCHAR2 DEFAULT NULL,
PSMPF_RETENTION IN VARCHAR2 DEFAULT NULL,
PEMERGENCY_WINBACK IN VARCHAR2 DEFAULT NULL,
PCSS_PROJECT_ID IN VARCHAR2 DEFAULT NULL,
PCSS_ORDER_NOTES IN VARCHAR2 DEFAULT NULL,
PREASON_FOR_CESSATION IN VARCHAR2 DEFAULT NULL,
P_RESPONSE OUT VARCHAR2,
PSMART_USER_ID IN VARCHAR2 DEFAULT NULL,
PORACLE_ERROR OUT VARCHAR2,
PORACLE_ERROR_MESSAGE OUT VARCHAR2,
PRESPONSE_TIME OUT NUMBER,
PDATA_TRANSFER_STATUS OUT VARCHAR2)
IS
v_scenario_type VARCHAR2(20); -- Varialble to Hold Time Out of every request to SPG
v_transaction_time NUMBER; -- Total time in which Request to SPG was processed
v_record_inserted_at DATE; -- Date/Time about the record insertion to the Error Handler
v_start_time NUMBER; -- Variable to hold Start Time for calculationg Transaction Time
v_url VARCHAR2(32767);-- URL to use when sending data to SPG
vtransaction_id VARCHAR2(18); -- Variable to hold Transaction ID for the request
v_buffer VARCHAR2(32760);-- Variable to read response from the SPG interface
v_timeout PLS_INTEGER; -- Time Out for each Transaction
v_oracle_err_msg VARCHAR2(600); -- Variable to hold Oracle Error Message
v_resp UTL_HTTP.RESP; -- Response Object
v_req UTL_HTTP.REQ; -- Request Object
v_userid_pwd SMT_ORACLE_PARAMETERS%ROWTYPE; --Variable declared to contain User ID & Password
vl_RetCode VARCHAR2(5000);
vl_std_returnCode VARCHAR2(3000);
--PDATA_TRANSFER_STATUS Holds the Data Transfer Status which can have possible values as
-- N => Data Has not been sent to SPG
-- Y => Received Successful response from SPG
-- F => On the First try to Send data to SPG Oracle Error Occured or response from SPG was a faulure
-- S => On the Second try to Send data to SPG Oracle Error Occured or response from SPG was a faulure
-- T => Data Has been transferred to the Error Log Table
-- X => Data need not be transfered to Error Log Table.
--Location of the timeout, URL & User Id & Password in Standing Data.
c_url_stopwlr SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_WLR';-- Stop WLR URL
c_url_cancelown SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_OWN';-- Cancel own URL
c_url_cancelother SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_OTH';-- Cancel other URL
c_url_amendcrd SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_CRD';--Amend CRD URL
c_spg_useridpwd SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPGIDPWD'; --Contains user id and pwd
ctimeout smt_parameters.parameter_code%TYPE:='SPGTO'; --This holds the timeout parameter
BEGIN
--In case the calling batch process can pass this value this SQL read will not be required & can be deleted
--Read data transfer status for the transaction Id
SELECT data_transfer_status INTO PDATA_TRANSFER_STATUS FROM SPG_INTERFACE_TABLE
WHERE transaction_id = PTRANSACTION_ID;
--Record the start time
v_start_time:=DBMS_UTILITY.GET_TIME;
--If Data transfer status is S then send the record to error handler
IF PDATA_TRANSFER_STATUS = 'S' THEN
Error_Handler(PTRANSACTION_ID,PSMART_USER_ID,PORACLE_ERROR,PORACLE_ERROR_MESSAGE,v_record_inserted_at,PDATA_TRANSFER_STATUS);
ELSE
--In case Data Tranfer Status is something other than S then send the request to SPG
--Initialise other variables which will be populated during the journey
P_RESPONSE := '';
PORACLE_ERROR := NULL;
PORACLE_ERROR_MESSAGE := NULL;
PRESPONSE_TIME := 0;
--Read timeout parameter from standing data.
BEGIN
SELECT VALUE INTO v_timeout FROM smt_parameters WHERE parameter_code=ctimeout;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_timeout:=30;
WHEN OTHERS THEN
v_timeout:=30;
END;
-- Construct the URL for Stop WLR Scenario
IF PSCENARIO_TYPE = 'STOP_WLR' THEN
BEGIN
-- Read the Initial URL from Standing Data
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_stopwlr
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url:='Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_winback_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url:='Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_winback_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL depending on the parameters to be passed to the url
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' || Smart_Urlencode('xmloverhttp') || '&';
v_url := v_url || 'p_channel_type=' || Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' || Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' || Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_crd=' || Smart_Urlencode(PCUSTOMER_REQUIRED_DATE)|| '&';
v_url := v_url || 'p_take_over_time=' || Smart_Urlencode(PCUSTOMER_REQUIRED_TIME)|| '&';
v_url := v_url || 'p_retainsmpf=' || Smart_Urlencode(PSMPF_RETENTION)|| '&';
--v_url := v_url || 'p_emergency_winback=' || Smart_Urlencode(PEMERGENCY_WINBACK)|| '&';
v_url := v_url || 'p_projectno=' || Smart_Urlencode(PCSS_PROJECT_ID)|| '&';
v_url := v_url || 'p_ordernotes=' || Smart_Urlencode(PCSS_ORDER_NOTES)|| '&';
v_url := v_url || 'p_reason_cessation=' || Smart_Urlencode(PREASON_FOR_CESSATION);
ELSIF PSCENARIO_TYPE='CANCEL_OWN' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_cancelown
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelown_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelown_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_cancel_reason=' ||Smart_Urlencode(PCANCELLATION_REASON)|| '&';
v_url:= v_url || 'p_cancel_notes=' ||Smart_Urlencode(PCANCELLATION_NOTES);
ELSIF PSCENARIO_TYPE='CANCEL_OTHER' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_cancelother
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelother_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelother_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_stop_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_cancel_reason=' ||Smart_Urlencode(PCANCELLATION_REASON);
ELSIF Pscenario_type='AMEND_CRD' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_amendcrd
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_amendcrd_details'; -- After testing the same , URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_amendcrd_details'; -- After testing the same , URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_crd=' ||Smart_Urlencode(PCUSTOMER_REQUIRED_DATE)|| '&';
v_url := v_url || 'p_css_change_order_numbers='||Smart_Urlencode(PCANCELLATION_REASON);
END IF;
--this is start of setting parameters for utl http object. the show begins...
utl_http.set_transfer_timeout(v_timeout);
--Set the wallet
--XXXXX e.g.UTL_HTTP.SET_WALLET(?file:DirectoryPath?,'put password here?);
--Set proxy
--YYYYY e.g. utl_http.set_proxy(p_proxy_in, p_no_proxy_domains_in);
v_url := REPLACE(v_url,'%27%27','%27'); -- Fix to ensure Double Quotes are converted to Single Quotes
--set the required URL to utl http.
v_req := utl_http.begin_request(v_url);
--Authentication setting
--Fetch the user id and password from stnding data.
BEGIN
SELECT *
INTO v_userid_pwd
FROM SMT_ORACLE_PARAMETERS
WHERE PARAMETER_CODE=c_spg_useridpwd
AND HOST_ID = ( SELECT HOST_ID
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS B
WHERE A.HOSTNAME = B.HOSTNAME
AND A.DATABASE_ID = B.DATABASE_ID));
EXCEPTION
WHEN NO_DATA_FOUND THEN
P_RESPONSE := 'ORACLE_ERROR: USER id AND Password NOT configured IN SMT_ORACLE_PARAMETERS:SPGIDPWD';
WHEN OTHERS THEN
P_RESPONSE := 'ORACLE_ERROR: USER id AND Password NOT configured IN SMT_ORACLE_PARAMETERS:SPGIDPWD';
END;
--utl_http.set_authentication(v_req, p_username_in, p_password_in);
utl_http.set_authentication(v_req, v_userid_pwd.description, v_userid_pwd.VALUE);
v_resp := utl_http.get_response(v_req);
--Fill in the the response time
PRESPONSE_TIME := (DBMS_UTILITY.GET_TIME - v_start_time)/100;
IF v_resp.reason_phrase = 'OK' THEN
-- Fetch the response
BEGIN
LOOP
utl_http.read_line(v_resp, v_buffer);
P_RESPONSE := P_RESPONSE || v_buffer;
END LOOP;
utl_http.end_response(v_resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(v_resp);
P_RESPONSE := P_RESPONSE || v_buffer;
END;
ELSIF v_resp.reason_phrase <> 'OK' OR P_RESPONSE = '' THEN
--error handling starts
--If the HTTP Status is not OK then store the error information
PORACLE_ERROR_MESSAGE := 'Status Code: '|| v_resp.STATUS_CODE||'. Reason Phrase ' ||v_resp.reason_phrase;
P_RESPONSE := 'ORACLE_ERROR: '|| ' Reason Phrase ' || v_resp.reason_phrase;
PORACLE_ERROR := v_resp.STATUS_CODE;
END IF;
--In case we got successful response from SPG
IF P_RESPONSE LIKE '%<RetCde>0</RetCde>%' THEN
PDATA_TRANSFER_STATUS := 'Y';
ELSE
BEGIN
SELECT message
INTO vl_std_returnCode
FROM SMT_MESSAGES
WHERE MESSAGE_CODE='SPGANTIDTS';
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '-12545,-29273,-1,401,';
WHEN OTHERS THEN
vl_std_returnCode := '-12545,-29273,-1,401,';
END;
--In case there was an error do not update Data Transfer Status
IF PORACLE_ERROR <> NULL AND INSTR(vl_std_returnCode, PORACLE_ERROR || ',', 1, 1) <> 0 THEN
PDATA_TRANSFER_STATUS:=PDATA_TRANSFER_STATUS;
ELSE
vl_RetCode := SUBSTR(P_RESPONSE, INSTR(P_RESPONSE,'<RetCde>', 1, 1),
INSTR(P_RESPONSE,'</RetCde>',1,1)+9 - INSTR(P_RESPONSE,'<RetCde>', 1, 1));
BEGIN
SELECT VALUE
INTO vl_std_returnCode
FROM SMT_ORACLE_PARAMETERS
WHERE PARAMETER_CODE='SPGRCS'
AND HOST_ID = ( SELECT HOST_ID
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS B
WHERE A.HOSTNAME = B.HOSTNAME
AND A.DATABASE_ID = B.DATABASE_ID));
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '<RetCde>4244</RetCde><RetCde>4245</RetCde><RetCde>4246</RetCde>';
WHEN OTHERS THEN
vl_std_returnCode := '<RetCde>4244</RetCde><RetCde>4245</RetCde><RetCde>4246</RetCde>';
END;
IF INSTR(vl_std_returnCode, vl_RetCode, 1, 1) <> 0 THEN
--needs not to re attempted.
PDATA_TRANSFER_STATUS:='X';
ELSE
--In case we did'nt got SUCCESSFUL response FROM SPG THEN UPDATE the Data Transfer Status so that the failed requests can be picked up BY the NEXT batch job RUN
IF PDATA_TRANSFER_STATUS='N' THEN
--initially if data transfer status was N then update it now to F
PDATA_TRANSFER_STATUS := 'F';
ELSIF PDATA_TRANSFER_STATUS='F' THEN
--initially if data transfer status was N then update it now to S
PDATA_TRANSFER_STATUS := 'S';
END IF;
END IF;
END IF;
END IF;
--Now Update all the modified Values
UPDATE SPG_INTERFACE_TABLE
SET response = P_RESPONSE,
data_transfer_status = PDATA_TRANSFER_STATUS,
oracle_error = PORACLE_ERROR,
oracle_error_message = PORACLE_ERROR_MESSAGE,
response_time = PRESPONSE_TIME
WHERE transaction_id = PTRANSACTION_ID;
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS THEN
--Handling the unhandled exception
PORACLE_ERROR := SQLCODE;
PORACLE_ERROR_MESSAGE := SQLERRM;
P_RESPONSE := 'ORACLE_ERROR: '|| PORACLE_ERROR_MESSAGE;
PRESPONSE_TIME := (DBMS_UTILITY.GET_TIME - v_start_time)/100;
SELECT data_transfer_status INTO PDATA_TRANSFER_STATUS
FROM SPG_INTERFACE_TABLE
WHERE transaction_id=PTRANSACTION_ID;
--New functionality to update the oracle error and oracle error message and not the Data Transfer Status
BEGIN
SELECT message
INTO vl_std_returnCode
FROM SMT_MESSAGES
WHERE MESSAGE_CODE='SPGANTIDTS';
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '-12545,-29273,-1,';
WHEN OTHERS THEN
vl_std_returnCode := '-12545,-29273,-1,';
END;
vl_RetCode := PORACLE_ERROR || ',';
IF INSTR(vl_std_returnCode, vl_RetCode, 1, 1) <> 0 THEN
--If the error is found in above maintained standing data do not change the Data Transfer Status
pdata_transfer_status:=pdata_transfer_status;
ELSE
IF pdata_transfer_status='N' THEN
PDATA_TRANSFER_STATUS := 'F';
DBMS_OUTPUT.PUT_LINE('DUE TO ERROR DATA COULDN''T GET TRANSFERED TO SPG FOR TRANSACTION'||' '||PTRANSACTION_ID);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ELSIF pdata_transfer_status='F' THEN
PDATA_TRANSFER_STATUS := 'S';
DBMS_OUTPUT.PUT_LINE('DUE TO ERROR DATA COULDN''T GET TRANSFERED TO SPG FOR TRANSACTION'||' '||PTRANSACTION_ID);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ELSE
DBMS_OUTPUT.PUT_LINE('Failure WHEN sending data TO Error LOG. Data Transfer Status IS ' || PDATA_TRANSFER_STATUS || '. TRANSACTION ID '|| PTRANSACTION_ID);
END IF;
END IF;
--Now update all the information gathered above to the table
UPDATE SPG_INTERFACE_TABLE
SET response = P_RESPONSE,
data_transfer_status = PDATA_TRANSFER_STATUS,
oracle_error = PORACLE_ERROR,
oracle_error_message = PORACLE_ERROR_MESSAGE,
response_time = PRESPONSE_TIME
WHERE transaction_id = PTRANSACTION_ID;
COMMIT;
END;
/I have fixed the problem by own.
Seems there are some while space in the endpoint url.
Fix
http_req:= utl_http.begin_request
trim(l_endpoint_url)
,'POST'
,'HTTP/1.1'
It works...
Regards
BS -
Sys.utl_http stopped working in batch; still works in APEX?
We have a package in Oracle 11gR1 that runs a nightly "job" to produce reports; it is designed to call the Oracle Reports server via URL and create a report as pdf, then save it to a directory in the Oracle LINUX filesystem. The call in the output procedure is simple:
MY_URL :=
'http://refugee1.dcf.state.fl.us:7777/reports/rwservlet?server=repRefugeeTest&report=DELIVERABLE_RPT.rdf&destype=FILE&desformat=pdf&userid=ruser/collins@RPD&desname=/app/oracle/external_files/official_reports/MAY_2014_DELIV.pdf&contract=XK030&report_beg_d=05/01/2014&report_end_d=05/31/2014&subc=&sticker=OFFICIAL REPORT';
UTL_HTTP.SET_TRANSFER_TIMEOUT (180);
MY_HTTP_RTN := UTL_HTTP.REQUEST (MY_URL);
UTL_HTTP.SET_TRANSFER_TIMEOUT (60);
This Oracle package has worked for years with user RPD, until we moved up some rdf and report package changes yesterday. These same four commands still work fine using APEX (with user APEX_PUBLIC_USER) in a windows-based browser (Firefox and IE), but this command UTL_HTTP.REQUEST does not produce output anymore from the Oracle package (with user RPD) and throws no exception. There is no job in the Oracle Reports queue (exception or not) to show that the request was passed. And, if I paste the string of MY_URL into a windows-browser, then it runs and Oracle Reports shows the job. I'm stumped! Please help shed light on the mystery; how can I trace or trap what's (not) happening?Does
aplay -Dplug:iec958 /usr/share/sounds/alsa/Front_Center.wav
work?
Did you try this while running a DE? Did you try disabling/enabling powersaving?
Last edited by Tes-- (2012-06-03 18:47:40) -
Utl_http error help required
Hi,
Thanks for help,
I create the following procedure for this purpose and i received the following errors:
declare
txt Varchar2(4000);
request utl_http.req;
response utl_http.resp;
BEGIN
utl_http.set_proxy('','');
request := utl_http.begin_request('http://localhost:7778/reports/rwservlet?report=f:\oracle\TIS13.rdf&desformat=pdf&destype=cache&userid=wh1/wh1@dwh');
--utl_http.set_header(request, 'User-Agent', 'Mozilla/4.0');
response := utl_http.get_response(request);
LOOP
utl_http.read_line(response, txt, TRUE);
dbms_output.put_line(txt);
END LOOP;
utl_http.end_response(response);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(response);
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
end;ERROT AT line1:
ORA-29273: HTTP request failed
ORA-06512" at "SYS.UTL_HTTP",line 1231
ORA-29276: transfer timout
ORA-06512: at line 20
Any solution would be hightly appriciated
Regardsit would be easier for you to use the OOTB Reports integration with Portal:
- http://download.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_portal.htm#i1008279
Cheers,
Mick -
How to send XML using UTL_HTTP
I am trying to workout how to send XML data to a webserver using UTL_HTTP but am not getting any reply
I need to submit the following XML document to a server "http://api.fastsms.co.uk/api/xmlapi.php" Their instructions are "The XML Document should be posted unencoded, with a UTF-8 character set as parameter 'xml'"
If I submit the following XML on their test form
<?xml version="1.0"?>
<apirequest version="1">
<user>
<username>**USER**</username>
<password>**PASSWORD**</password>
</user>
<application>
<name>Example Application</name>
<version>1.0</version>
</application>
<inboundcheck lastid="10711399"/>
</apirequest>
I get an XML response back with the messages in my inbox.
This is the code I am trying to use to accomplish the same from PL/SQL : I know a response is coming back as there is header information - just no content. What am I doing wrong ?
l_xml VARCHAR2(5000);
req utl_http.req;
resp utl_http.resp;
header_name VARCHAR2(256); -- Response header name
header_value VARCHAR2(1024); -- Response header value
response_text VARCHAR2(4000); -- Response body
l_url VARCHAR2(100);
BEGIN
l_xml := 'xml=<?xml version="1.0"?>';
l_xml := '<apirequest version="1">';
l_xml := '<user>';
l_xml := '<username>**USER**</username>';
l_xml := '<password>**PASSWORD**</password>';
l_xml := '</user>';
l_xml := '<application>';
l_xml := '<name>Example Application</name>';
l_xml := '<version>1.0</version>';
l_xml := '</application>';
l_xml := '<inboundcheck lastid="10711399"/>';
l_xml := '</apirequest>';
-- Open HTTP connection
l_url := 'http://api.fastsms.co.uk/api/xmlapi.php';
req := utl_http.begin_request(l_url,'POST',utl_http.HTTP_VERSION_1_1);
-- Set headers for type and length
utl_http.set_header(req,'Content-Type','application/x-www-form-urlencoded');
utl_http.set_header(req,'Content-Length',to_char(length(l_xml)));
-- Write parameter
utl_http.write_text(req,l_xml);
-- Read response file
resp := utl_http.get_response(req);
-- Print out the response headers
FOR i IN 1 .. utl_http.get_header_count(resp) LOOP
utl_http.get_header(resp,i,header_name,header_value);
logging_pkg.info(header_name || ': ' || header_value);
END LOOP;
-- Print out the response body
BEGIN
LOOP
utl_http.read_text(resp,response_text);
logging_pkg.info(response_text);
END LOOP;
EXCEPTION
WHEN utl_http.end_of_body THEN
logging_pkg.info('End of body');
END;
-- close http connection
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
Cheers,
BrentHi Billy
Yikes - how embarassing ! Thanks for pointing out my beginners mistake there. I've fixed my code - and also implemented the substitutions of parameters like you suggested - I like that approach.
Unfortunately the end result is no better - the line
utl_http.read_text(resp,response_text);
Still returns nothing back
The headers that are coming back are
Date: Thu, 04 Jul 2013 08:31:56 GMT
Server: Apache/2.2.16 (Ubuntu)
X-Powered-By: PHP/5.3.3-1ubuntu9.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Connection: close
I guess I will need to try chasing it with the fastsms vendor so see if they can check my incoming request and see if there are any glaring problems. I know the xml is correct as I am now logging the xml string just before I send it and when I take that string and put it in their test form it works perfectly - something else in the puzzle is missing. I've had no experience using utl_http before - perhaps it's no possible to read the xml repsonse using this ?
Anyway, thanks for your help Billy.
ps - How do you paste your code into your message to get that formatting ?
Cheers,
Brent -
Run a report in PL/SQL using utl_http.request
Hi
I need to run a report in PL/SQL using utl_http.request
How that can be done ??
Thank you!Okay, backtrack.
A web server can deliver all kinds of content. From static HTML pages, to XML files and videos and dynamic content. Including reports.
The communication language (protocol) used to talk to a web server is HTTP.
UTL_HTTP is an Oracle PL/SQL library that implements the client side of this communication. It allows the developer to write code that acts like a web browser and communicates with a web server.
Now what do you not understand and cannot use?
HTTP is not simple and easy. You need to understand the basics of this communication language in order to communicate successfully with the web server. Like knowing the difference between GET and PUT and POST commands, how the URL query string works and so on.
Once you know that, you can look at how the web server provides reports. How do you authenticate as a web browser with the web reporting system? What URLs do you use to access which reports? How do you pass name-values to the web server as report parameters? What HTTP response formats (MIME types) does the web report server provide? Which one do you plan to use and how do you parse that response into a meaning structured data format?
If you're thinking it is "easy", think again. Sure, someone here can provide sample code that for example grabs a CSV report file from a web server and (using a pipeline table function), turn that into rows and columns. But that will not teach you the fundamentals you need to know and not equip you with dealing with the problem with your own brains, hands and keyboard.
PS. In other words, learn to crawl and walk before trying to run. Get to grips with how HTTP works before diving into the deep end of web report integration. -
Error while invoking webservice using UTL_HTTP from PL/SQL Block
Hi All,
I am invoking a webservice (SOAP Request) from a PL/SQL block using UTL_HTTP package.
I am able to send the complete request and am getting the required instance on the BPEL Console, but the process is erroring out while getting response back.
and the PL/SQL Block is ending in error mentioned below:
ERROR at line 1:
ORA-29266: end-of-body reached
ORA-06512: at "SYS.UTL_HTTP", line 1321
ORA-06512: at "APPS.CSM_BPEL_TEST_PKG", line 34
ORA-06512: at line 1
Package is completing successfully if i test in local DB and local BPEL.
But giving above error in client's.
Can anyone let me know what is the cause of this.
Thanks in advanceI got it working by making process Synchronous.
But with asynchronous process it is still same error.
Thanks... -
Error while invoking webservice using UTL_HTTP package
Hi All,
I am invoking a webservice (SOAP Request) from a PL/SQL block using UTL_HTTP package.
I am able to send the complete request and am getting the required instance on the BPEL Console, but the process is errorring out while getting response back.
and the PL/SQL Block is ending in error mentioned below:
ERROR at line 1:
ORA-29266: end-of-body reached
ORA-06512: at "SYS.UTL_HTTP", line 1321
ORA-06512: at "APPS.CSM_BPEL_TEST_PKG", line 34
ORA-06512: at line 1
Can anyone let me know what is the cause of this.
Thanks in advanceMy guess would be that your request is not properly constructed,
29266, 00000, "end-of-body reached"
// *Cause: The end of the HTTP response body was reached.
// *Action: If the end of the HTTP response is reached prematurely, check if
// the HTTP response terminates prematurely. Otherwise, end the
// HTTP response.John -
ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http
I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
when browsed through some of the messages they point to setting Oracle Wallet Manager.
I am trying to connect
Any idea on how to resolve this issue ?
your input is appreciated.
Thanks
RaviDuplicate post ... please ignore.
-
ORA-24247: network access denied by access control list (ACL)error-UTL_HTTP
I am getting following ACL error while executing following procedure:
create or replace procedure sat_proc as
http_req utl_http.req;
http_resp utl_http.resp;
BEGIN
http_req := utl_http.begin_request('www.yahoo.com');
http_resp := utl_http.get_response(http_req);
utl_http.end_response(http_resp);
END;
exec sat_proc;
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "TRANSDBA.SAT_PROC", line 5
ORA-06512: at line 1
I am able to execute successfully while executing above code as PL/SQL block:
DECLARE
http_req utl_http.req;
http_resp utl_http.resp;
BEGIN
http_req := utl_http.begin_request('www.yahoo.com');
http_resp := utl_http.get_response(http_req);
utl_http.end_response(http_resp);
END;
PL/SQL procedure successfully completed.
Could help me find why I am getting error while executing same code in a procedure? Is there any privilege missing?GRANT EXECUTE ON SYS.UTL_HTTP TO <your_user>;
SQL> set time on
17:21:01 SQL> set role none;
Role set.
17:21:23 SQL> @utl_http.sql
17:21:34 SQL> DECLARE
17:21:34 2 http_req utl_http.req;
17:21:34 3 http_resp utl_http.resp;
17:21:34 4 BEGIN
17:21:34 5 http_req := utl_http.begin_request('www.yahoo.com');
17:21:34 6 http_resp := utl_http.get_response(http_req);
17:21:34 7 utl_http.end_response(http_resp);
17:21:34 8 END;
17:21:34 9 /
PL/SQL procedure successfully completed.
17:21:35 SQL> connect / as sysdba
Connected.
17:22:47 SQL> connect dbadmin/admindb
Connected.
17:23:06 SQL> @utl_http.sql
17:23:22 SQL> DECLARE
17:23:22 2 http_req utl_http.req;
17:23:22 3 http_resp utl_http.resp;
17:23:22 4 BEGIN
17:23:22 5 http_req := utl_http.begin_request('www.yahoo.com');
17:23:22 6 http_resp := utl_http.get_response(http_req);
17:23:22 7 utl_http.end_response(http_resp);
17:23:22 8 END;
17:23:22 9 /
PL/SQL procedure successfully completed.
17:23:23 SQL> set role none;
Role set.
17:23:29 SQL> @utl_http.sql
17:23:31 SQL> DECLARE
17:23:31 2 http_req utl_http.req;
17:23:31 3 http_resp utl_http.resp;
17:23:31 4 BEGIN
17:23:31 5 http_req := utl_http.begin_request('www.yahoo.com');
17:23:31 6 http_resp := utl_http.get_response(http_req);
17:23:31 7 utl_http.end_response(http_resp);
17:23:31 8 END;
17:23:31 9 /
DECLARE
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 5
17:23:31 SQL> above is from test user
Below is from SYSDBA account
SQL> set time on
17:20:53 SQL> revoke execute on sys.utl_http to dbadmin;
revoke execute on sys.utl_http to dbadmin
ERROR at line 1:
ORA-00905: missing keyword
17:22:03 SQL> revoke execute on sys.utl_http from dbadmin;
revoke execute on sys.utl_http from dbadmin
ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object
ACLiLZU+w09hR7gQAB/AQAjcw==
17:22:32 SQL> /
Revoke succeeded.
17:22:52 SQL> Edited by: sb92075 on Jun 10, 2010 5:24 PM -
What is the datatype to store the value of variable of UTL_HTTP.resp
Hello,
I am using Oracle 11g R2 SOE.
I have table Called SMS consists of two columns (TEXT , RESPONSE) to store the value of variable of type UTL_HTTP.resp
the datatype of TEXT column is varchar2.
What should be the datatype of the column RESPONSE that is supposed to store the value of a variable of type UTL_HTTP.resp ????
Please see the following example if it was not clear;
Declare
l_url2 SMS.RESPONSE%TYPE;
l_http_request2 UTL_HTTP.req;
l_http_response2 UTL_HTTP.resp;
begin
l_http_request2 := UTL_HTTP.begin_request(l_url2);
l_http_response2 := UTL_HTTP.get_response(l_http_request2);
insert into SMS (text,response) values (l_url2,l_http_response2);
UTL_HTTP.end_response(l_http_response2);
end;Regards,
FatehFateh wrote:
Hello,
I am using Oracle 11g R2 SOE.
I have table Called SMS consists of two columns (TEXT , RESPONSE) to store the value of variable of type UTL_HTTP.resp
the datatype of TEXT column is varchar2.
What should be the datatype of the column RESPONSE that is supposed to store the value of a variable of type UTL_HTTP.resp ????
Please see the following example if it was not clear;
Declare
l_url2 SMS.RESPONSE%TYPE;
l_http_request2 UTL_HTTP.req;
l_http_response2 UTL_HTTP.resp;
begin
l_http_request2 := UTL_HTTP.begin_request(l_url2);
l_http_response2 := UTL_HTTP.get_response(l_http_request2);
insert into SMS (text,response) values (l_url2,l_http_response2);
UTL_HTTP.end_response(l_http_response2);
end;Regards,
Fatehutl_http.resp is a record type Its defined like this
TYPE resp IS RECORD (
status_code PLS_INTEGER,
reason_phrase VARCHAR2(256),
http_version VARCHAR2(64));http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/u_http.htm#i1012713
I would suggest in your table you split the RESPONSE column into 3 different column and store the fields STATUS_CODE, REASON_PHARSE and HTTP_VERSION accordingly. -
Error while using utl_http package
Hi Guys,
I need some help with the utl_http package
The problem that Iam facing is as follows :
Iam trying to use the Oracle provided package utl_http
package to send an http request to a particular
website.However Iam getting the request_failed
exception.
I type in the foll.command in sqlplus:
select utl_http.request('http://www.oracle.com') from
dual
and I get the foll.error---
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_HTTP", line 174
ORA-06512: at line 1
If I try and trap the exception it shows
request_failed exception.
If any one has any clue on how to resolve this -- >please reply ASAP .
ThanksIs it possible that your database sits behind a firewall? If so, you need to specify the proxy in utl_http.request.
-
Cannot view PDF created by passing xml and XSL-FO using UTL_HTTP
Hi,
Using UTL_HTTP Iam trying to contact a servlet which uses the input XML and XSL/FO to produce a PDF.However, when I run the procedure , I get the following error 'File does not begin with -%PDF' ? I checked the output on the console and the blob values does not start with %PDF . Below is the sample from my code , please let me know if Iam commiting a mistake somewhere. I confirmed that the servlet itself is working fine by confirming with test webpage that takes xml and stylesheet input and generates a PDF when 'submitted' to servlet on the click of a button.
INSERT INTO TESTPDF ( PDF_REPORT ) VALUES ( Empty_Blob() ) RETURNING PDF_REPORT INTO vBlobRef;
vReportURL :='/rufop/fop?xml='||xmldoc||'&xsltRPath=../../test/PAXSL.xsl';
req := UTL_HTTP.BEGIN_REQUEST (url=>vReportURL, method=>'POST');
resp := utl_http.get_response(req);
loop
begin
Utl_Http.read_raw(resp, vData);
Dbms_Lob.writeAppend ( lob_loc => vBlobRef , amount => Utl_Raw.length(vData) , buffer => vData );
exception
when utl_http.end_of_body then
exit;
end;
end loop;
Utl_Http.end_response(resp);
owa_util.mime_header('application/pdf',false);
htp.p('Content-Disposition: inline; filename="test.pdf"');
htp.p('Content-Length: '|| dbms_lob.getlength(vBlobRef));
owa_util.http_header_close;
wpg_docload.download_file(vBlobRef);
Thanks in advance,
JenHello guys! I have been assigned the same task,i.e to generate pdf through xml using xsl stylesheet.
I have a procedure which is creating the xml and the stylesheet. But I have no idea how to write the procedure which passes this xml to fo engine. I am very new to this. Can anyone please share your thoughts with me so as how to accomplish this? By reading blogs on internet I figured I would have to use UTIL_HTTP but don't know how.
Sunny
Edited by: 887252 on May 29, 2012 1:24 AM -
I have the following PLSQL Function that returns a End_of_body Error. This started when we migrated from 10g to 11g. It is simple enough to capture so the error does not stop the Function Flow, but the error causes the OCI driver in OBIEE to error, which prevents the use of OBIEE IBOT to execute. Trying to understand why this error is occurring..not sure if we have a permissions issue on the UTL_HTTP Package or what?
Anyone seen this problem in 11g? Suggests on resolving would be great. Thanks.
FUNCTION AA_DEMO_PO_WSDL(IN_MESSAGE IN VARCHAR2)
RETURN VARCHAR IS
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
launch_url varchar2(240) ;
o_message varchar2(240) ;
po_amount number := 2000 ;
total_calls number := 0;
cursor c_PO_exists is Cursor Logic..
begin
total_calls := 0;
For po_wsdl in c_PO_exists
LOOP
total_calls := total_calls + 1;
soap_request:='<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body xmlns:ns1="http://xmlns.oracle.com/PurchaseOrder_Approval">
<ns1:ProcessRequest><ns1:input>PO' || po_wsdl.order_no || '</ns1:input></ns1:ProcessRequest>
</soap:Body>
</soap:Envelope>';
Begin
http_req:= utl_http.begin_request('myURL/PurchaseOrder_Approval/1.0','POST','HTTP/1.1');
utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
utl_http.set_header(http_req, 'SOAPAction', 'initiate');
utl_http.write_text(http_req, soap_request) ;
http_resp:= utl_http.get_response(http_req) ;
utl_http.read_text(http_resp, soap_respond) ;
utl_http.end_response(http_resp) ;
Exception
WHEN UTL_HTTP.end_of_body THEN
utl_http.end_response(http_resp);
When utl_http.too_many_requests then
utl_http.end_response(http_resp);
o_message := 'End_Reponse' || ' from proc.';
when OTHERS then
o_message := SQLERRM || ' from proc.';
return o_message;
end;
END LOOP;
Return 'Workflow Initiated-' ||to_char(total_calls);
end AA_DEMO_PO_WSDL;Hi, thanks,
it is oracle10g,
The Exception is : ORA-29266: end-of-body reached
ORA-06512: at "SYS.UTL_HTTP", line 1349
then the line in my function ,
damorgan wrote:
But I do note that when I do this I always do a get_header_count and get_header before get_read.what get_read , u mean?
thanks for the link ,
appreciated -
How to Display PHP Output as Portlet in HTML Region using utl_http.request
I wanted to be able to parse PHP functions to add more functionality to my Page. nothing fantasy, something simple like: http://phpsysinfo.sourceforge.net/phpsysinfo-dev/?template=classic
Where the realtime values are retrieved from the OS. this represent some kind of problem to me, I know how to do it from Shell Script, Perl or PHP, but not from PL/SQL.
Based on my experience using Oracle Portal, Portlets, I think we really can make use of the feature used in Portal called Web Clipping. [ This feature basically goes to some Site a retrieve part of the site to show in the current page]. Well the PL/SQL utility utl_http.request does something similar.
Make sure your request page does not retrieve some headers because that would cause a problem in your page and will not show up.
This is what I did:
<b> 1.- </b> Grant Privileges to execute [ <b> utl_http.request </b> ] to the owner of your schema.
login into the OracleXE / APEX as SYS then go to the Object Navigator, then click on packages, find the utl_http.request then click on it, later click on grant and select your schema owner for your applicaion.
<b> 2.- </b> Logout as SYS then login as your application schema user. just to test the functionality go to the sql command then enter the following command and then click run:
<b> select substr(utl_http.request('http://www.oracle.com/'),1, 255) from dual; </b>
If your output is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Oracle 10g, Siebel, PeopleSoft | Oracle, The World's Largest Enterprise Software Company</title> <meta name="title" content="Enterprise Applications | Database | Fusio
<font color='blue'> Wow It worked </font>, this really could be useful !!, If not go back to step 1 and check your permissions to execute, or perhaps your Internet connectivity.
3.- Once we know the package works and we can retrieve content from the Internet. lets go to some of our pages add some HTML Region.
4.- Create an item and put into the new region. the source will be SQL, For the purposes of my test the query to the Oracle Page failed, so I decided to give a shot with a simple PHP script with no headers.
The internal server is: http://mytest.com/hello_world.php
Where the content of the hello_world.php is:
<?
echo '"<b> Hello World </b> ";
?>
This PHP works fine and display the basic Hello World. can be the same server or not, also noticed this can be another port perhaps using something like Ruby,Mason or Java.
<b> 5.- </b> Finally in my Item the source type is SQL and looks like this:
<b> select substr(utl_http.request('http://mytest.com/hello_world.php'),1, 255) from dual; </b>
Apply the changes and run the page !!!
Excelent It worked as expected. now you know how use utl_http.request to create webclipping in your OracleXE / APEX from remote pages, or how to use it to parse the output from CGI, Perl, PHP, Ruby or Java pages.
Note: [ Just make sure to strip the headers or parse into a PL/SQL Procedure to clean then show ]
Best Regards <b> Dino </b>.
Brains R Like Books only work when they R Open.
http://www.htmldbhosting.com/Sorry, from your post in the LabVIEW board I did not understand that it was the Output message that you were looking for.
I thought you wanted the results from your test steps displayed on the user interface.
It is the “Output Panel” in the sequence editor that displays your output message, but I do not know if there is default Output panel activeX indicator for user interface that the TestStand engine would update automatically like it does the execution view.
Maybe someone else knows
As also pointed out, the UI messages is your other option.
The Output Message event number is 40
http://zone.ni.com/devzone/cda/epd/p/id/3879
UIMsg_OutputMessages–(Value: 40) TestStand sends this message at periodic intervals when it holds references to output messages that calls to the OutputMessage.Post method queue. TestStand transfers the queued messages to an OutputMessages collection attached to the UIMessage.ActiveXData property for this event. An application that processes output messages should copy the output message references from the collection in UIMessage.ActiveXData to its own private OutputMessages collection by passing its private collection to the OutputMessages.CopyMessagesToCollection method. An application calls the Engine.NewOutputMessages method to create a private OutputMessage collection. TestStand generates this event only if the Engine.OutputMessagesEnabled property is True. Because there can be more than one handler for this event, the application should not modify the OutputMessages collection the UIMessage.ActiveXData property holds.
Omar
Message Edited by OmarGator on 10-09-2008 10:12 AM
Maybe you are looking for
-
Mac Pro kernel Panic with Cisco VPN Client
After Having to rebuild my new Mac Pro 3 times I finally found that it was the Cisco VPN Client that was released for Intel in Feb. of this year that does not play nice with the new machines. Don't install or if it's too late boot into Safe Boot mode
-
how to set EXTERNAL URL link for text in applet
-
Problems when I resend an email with attachments
I am using Mail 7,0 with Mavericks. I am having problems resending emails. If I resend any email wihout any attached file, the receiver does not have any problem and and he gets the body text and all the chained mails in the proper order and format.
-
I have a Powerbook G4. I run Safari and Firefox plus I run Virtual Windows due to my CAD program being Windows only. Over the last 4 months, my Mac has consistently crashed on the average of 3 times per day. I thought it had something to do with the
-
I cannot locate the Homepage icon anywhere in Firefox 4.0 Beta
Unable to return to Homepage without existing Firefox 4.0 Beta. Any sugestions?