Using HttpClient in Oracle 8.1.2 or 9i
Date: 25 Jan 2005 02:26:16 -0800
Message-ID: <60a5eea.0501250226.66856484_at_posting.google.com>
[Quoted] 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).
[Quoted] 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();} }
} Received on Tue Jan 25 2005 - 11:26:16 CET