New B question

G

Guest

I have to connect and call an api on apache sever
I have the api code but have not got a clue where to start
my experience is in vb and oracle database
I would like to call the api from PL/SQL but i don't know where to start any
ideas
G
 
C

Chris Smith

I have to connect and call an api on apache sever
I have the api code but have not got a clue where to start
my experience is in vb and oracle database
I would like to call the api from PL/SQL but i don't know where to start any
ideas

If you want to do this from PL/SQL, then you're in the wrong place. If
you want to do it from Java, then you'll need to provide more
information. For example, what kind of API is it? SOAP?
 
J

Jan Schaefer

g said:
I would like to call the api from PL/SQL but i don't know where to start any
ideas

Since Oracle 9i you can implement Java classes directly in the database
with:

create or replace and compile java source named foobar as
package foo.bar;

public class FooBar {

String getFooBar(String foo) {

return foo + "bar";
}
}

To call the methods of your class from PL/SQL you have to write wrapper
procedures and functions like this:

function get_foobar(foo in varchar2)
return varchar2
as language java name
'foo.bar.FooBar(java.lang.String) return oracle.sql.VARCHAR2';

Warning: All code is untested.

Have also a look at the Java Developer Guide from Oracle:

http://download-west.oracle.com/docs/cd/B14117_01/java.101/b12021/toc.htm

Hope that helps.

Cheers,

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top