Home » SQL & PL/SQL » SQL & PL/SQL » Asynchronous call using UTL_HTTP in Oracle 9i (Oracle 9i)
Asynchronous call using UTL_HTTP in Oracle 9i [message #425948] Tue, 13 October 2009 06:20 Go to next message
SharonB
Messages: 1
Registered: October 2009
Junior Member
Hi,

I need to call a webservice using UTL_HTTP aysnchronously i.e., I will not get a response from the webservice and hence should just call the webservice and then proceed with other functions, without awaiting response. Can anybody please advice as to how to call a webservice which does not give a response, using UTL_HTTP in Oracle 9i?

Thanks,
Sharon
Re: Asynchronous call using UTL_HTTP in Oracle 9i [message #426022 is a reply to message #425948] Tue, 13 October 2009 16:06 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
utl_http.request sends the request. You must call utl_http.get_response to get the response code. If you are not expecting one then don't call it.

Have you tried this? Did you read the manual?

What have you tried and why do you think you have a problem?

I am no expert at utl_http, only having used it a few times, but seems to me you have no issue.

Once again however, I have never tried to use utl_http without going through the normal process of request/get_response/close. You will just have to try various combinations of get_request[/end_request/end_response] to see what works.

Kevin
Re: Asynchronous call using UTL_HTTP in Oracle 9i [message #426025 is a reply to message #426022] Tue, 13 October 2009 16:45 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
One way is to submit your request to a dbms_job (from pl/sql) and commit the job (using autonomous transaction) to make it run while you continue. Because it's async, you need to log the response/status somewhere like a table that you can poll later. It's a good idea to comment your dbms_jobs to give some visbility. In cases where I've done this type of thing, it's been useful to add cols like sumbit_dt, last_try_dt, retry_cnt etc. so you can reprocess failed requests n times or whatever before giving up.

It's also useful to comment your jobs to the DBA knows where they came from...
DBMS_JOB.submit
   (v_job,
    '/*created by WEBSVC pkg custid='||v_custid||'*/ WEBSVC.main('||v_custid||');'
    );
Previous Topic: What do they mean by 8 integrity constraints?
Next Topic: Query is extremly slow
Goto Forum:
  


Current Time: Sun Dec 11 06:29:09 CST 2016

Total time taken to generate the page: 0.09821 seconds