Link to home
Start Free TrialLog in
Avatar of MartynThompson
MartynThompson

asked on

Third Party Java API, XML and Oracle PL/SQL

I need some help.

I have a third party java API to search a Stock Database

An example of how I would do this is:

String query = "Light Bulb";
QueryBuilder builder = new QueryEngine("stockSearch");
org.jdom.Document searchResult = Builder.search(query);

The search results come back as an XML org.jdom.document
<products>
      <listitem row="0">
            <description>40w Light Bulb</Description>
            <price>1.99</price>
      </listitem>

      <listitem row="1">
            <description>60w Light Bulb</Description>
            <price>2.99</price>
      </list>
</products>
            

What i need to know is how to execute the api from PL/SQL
and get the result into a temporary table in oracle.

Table structure.

temp_row                  NUMBER(12)
temp_description      VARCHAR2(200)
temp_price                  NUMBER(12,2)

So? Do i need to get the third party API into that database with loadjava?
What is the PLSQL to be able to pass a search string?
And how do i get the resultant document in to the db.

Alternatively the resulting document can be generated with http

eg http://stockserver/stockServlet?query=Light%20Bulb
and returns the same xml document

Would that be simpler to execute in the database?

I know there is a lot, but all all help is appreciated
ASKER CERTIFIED SOLUTION
Avatar of concon
concon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial