Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It's simple enough to call web service directly from Oracle:</p> <ol> <li><p>There are a good support of XML/XSLT/XQuery to construct requests and parse responses (<a href="http://docs.oracle.com/cd/E11882_01/appdev.112/e16659/xdb01int.htm#i1047230" rel="nofollow noreferrer">XML DB</a>)</p></li> <li><p>Oracle have an API to work with HTTP/HTTPS requests (<a href="http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/u_http.htm" rel="nofollow noreferrer"><code>UTL_HTTP</code> package</a>).</p></li> </ol> <p>So if you decide to call web service from Oracle - it's possible and relatively simple for SOAP and REST web-services.<br> You can find example code in <a href="https://stackoverflow.com/a/430042/232279">this answer</a> on StackOverflow.</p> <p><strong>Update - answer on a comment</strong></p> <p>To make it clear, example above isn't work at a "database query level" because it's implemented on PL/SQL. Oracle Database engine natively incorporates support for two different languages: </p> <ul> <li>traditional <a href="http://docs.oracle.com/cd/E11882_01/server.112/e41084/preface.htm#BABICHGE" rel="nofollow noreferrer">SQL</a>, which is ANSI SQL standards implementation (<a href="http://docs.oracle.com/cd/E11882_01/server.112/e41084/ap_standard_sql.htm#SQLRF019" rel="nofollow noreferrer">traditionally with some incompatibilities and extensions</a>);</li> <li><a href="http://docs.oracle.com/cd/E11882_01/server.112/e40540/srvrside.htm#i8536" rel="nofollow noreferrer">PL/SQL</a>, which is procedural programming language tightly integrated with a traditional SQL. </li> </ul> <p>This two things are really different. Even there are <a href="https://stackoverflow.com/search?q=%5Boracle%5D%20context%20switching">a common questions about performance</a> affected by switching context between SQL and PL/SQL engines and mostly caused by improper procedures design.</p> <p>PL/SQL as a procedural language can access a rich set of APIs, provided by Oracle as a set of <a href="http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/intro.htm#BABBEAGJ" rel="nofollow noreferrer">built-in packages</a>. Among others there are a number of packages directly related to network communication protocols and standards: <code>UTL_TCP</code>, <code>UTL_URL</code>, <code>UTL_SMTP</code>, <code>UTL_MAIL</code>, <code>UTL_INADDR</code>, <code>UTL_HTTP</code>, <code>HTP</code>, <code>HTF</code>, <code>DBMS_LDAP</code>. </p> <p>Needs to be said, that there are a set of APIs, provided to support publishing of PL/SQL code on the web. Set of <code>OWA_</code>xxxx packages <a href="http://docs.oracle.com/cd/E23943_01/portal.1111/e12041/concept.htm#YPMOD001" rel="nofollow noreferrer">supports access through <code>mod_plsql</code></a>. Another thing is <a href="http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm" rel="nofollow noreferrer">a support for publishing SOAP web services in Oracle XML DB</a>.</p> <p>If you need to unload data from Oracle to web service on a schedule then look at <code>DBMS_SCHEDULE</code> and <code>DBMS_JOB</code> packages to start unload procedures periodically. </p> <p>Most of this system packages implemented on Java and it's possible to <a href="http://docs.oracle.com/cd/B28359_01/java.111/b31225/chone.htm#BABCJIED" rel="nofollow noreferrer">write your own Java extensions callable from PL/SQL</a>. </p> <p>P.S. There are a <a href="http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/u_dbws.htm" rel="nofollow noreferrer"><code>UTL_DBWS</code></a> package dedicated for implementation of calls to SOAP services from Oracle Database, but seems that it produces more problems than solves and I can't find reference to it in 11g documentation (10g only). </p> <p>P.P.S. Some statements may be slightly inaccurate or contain exaggerations, but that should be enough to understand the overall picture. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload