In my previous post, I mentioned the UTL_DBWS package, that provides a ready to use method to consume web services from the database itself, using pure PL/SQL.
Although you only need PL/SQL to consume, the package itself is based on a couple of java classes.
If you’re using a 10.1 or 10.2 database, the PL/SQL code is already installed, but the Java package isn’t! This will cause an error when using the package to establish a connection to the web services, complaying that a particular Java class does not exist
To correct this, get the dbws callout utility. You can download it here.
Then, apply it to the database using the following commands:
loadjava -u user/userpass -r -v -f -s -grant public -noverify -genmissing dbwsa.jar
loadjava -u user/userpass -r -v -f -s -grant public -noverify -genmissing dbwsclient.jar
After this, the PL/SQL package should now function correctly.
- Here are a couple of web services to test your code, if do not have any one available: