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
Messages: 1
Registered: October 2009
Junior Member

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?

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: 2102
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.

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...
    '/*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: Thu Jul 27 16:13:36 CDT 2017

Total time taken to generate the page: 0.10434 seconds