Accessing Web Services via Pl/sql

Source: Internet
Author: User
Tags web services zip oracle database

Web services are being talked about and used everywhere today in Web services red-hot; Of course, there is a small part of the industry hype. Oracle has also always been at the forefront of technology, releasing expansion packs to support pl/sql access to Web Services as early as the 9i, and making the feature more powerful in Oracle 10g versions, which stems from the introduction of the UTL_DBWS package, In fact, it encapsulates the jpublisher, making it possible for Pl/sql developers to invoke Web services with just a few simple APIs. Below I will show you how to invoke Web services through Pl/sql, and the focus of this article is on Pl/sql invoke Web services implementation, and for how to publish Web services, you can refer to one of my other basic articles Build Web Services with oc4j and axis, or other reference materials.

First, let's build a running environment where you have to download and install Oracle Database from Oracle OTN (Enterprise, Standard, personal), but never install the shortcut, because it does not provide SQLJ components and related commands. If you have installed the database, you can skip this step.

Then, you need to download the corresponding version of UTL_DBWS:

Pre 10g:dbws-callout-utility.zip

10g:dbws-callout-utility-10r2.zip

After the download is complete, you need to extract the file into the <oracle_install_dir>/sqlj/lib directory, and we also need to use Loadjava to load the jar files into the SYS schema for all users to use the expansion pack, which commands the following:

<oracle_install_dir>/bin/loadjava-u sys/password-r-v-f-s-grant public-noverify-genmissing <oracle_instal L_dir>/sqlj/lib/dbwsclient.jar

In Oracle's documentation, it is claimed that the 10g is a UTL_DBWS package, but I downloaded the latest Oracle and completely installed, did not find the slightest trace of UTL_DBWS, but also had to copy and execute the Loadjava.

OK, now everything is ready, just write the program test, before the coding test, we assume that you have the "build Web Services with oc4j and axis" article hellows already deployed, and can call the SayHello method normal; Of course, you publish other web Services are equally feasible. Here we will create a function to test the code as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.