Re: Using HttpClient in Oracle 8.1.2 or 9i

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 25 Jan 2005 07:19:23 -0800
Message-ID: <1106666363.326230.93800_at_z14g2000cwz.googlegroups.com>


Marc wrote:
> Hi Community,
>
> i want to use the HttpClient package to open a socket to my J2EE
> Applikation (its a Cache Framework which needs to be actualised if
any
> data in the db changes).
> Already during the "loadjava" process errors are popping up, cant
> resolve class xyz, cant find class "soandso".
>
> The command i use is:
> loadjava -user <user>/<password>_at_<dbname> -resolve -verbose
> HttpClient.jar
>
> Ignoring those errors i tried to upload a class using the package,
> without success.
> I wonder if im missing any rights opening a socket connection
> db-sided.
> I tried to use the Mail API as well, without success (and sadly
> without errors as well) to check if im lacking on rights...
>
> Does anyone got an idea what im missing or forgot to do?
> Any help/tip is much appreciated!
>
>
> Code of the Socket Class following:
>
> public class HttpTestConnect {
>
> public static void getURL(String hostname, String portnum,String url)
> throws InterruptedException{
> try {
> // process arguments
> String protocol = "http";
> String host = hostname;
> int port = Integer.parseInt(portnum);
> String page = url;
> // Grab HTTPConnection
> HTTPConnection con = new HTTPConnection(protocol, host, port);
> con.setTimeout(20000);
> con.setAllowUserInteraction(false);
> // Issue Get call
> HTTPResponse rsp = con.Get(page);
> // Grab Response
> byte[] data = rsp.getData();
> if ( data == null ) {
> System.out.println("no data");
> }
> else {
> System.out.println("data length " + data.length);
> System.out.println(new String(data));
> }
> }
> catch ( Throwable ex ) {ex.printStackTrace();}
> }
> }

Try using -f[orce] switch with loadjava. You can type loadjava with -help to get help on different parameters.

Regards
/Rauf Received on Tue Jan 25 2005 - 16:19:23 CET

Original text of this message