Dont think RMi is HTTP tunneling through proxy firewall

Hi Guys,
Does anyone know how to monitor if RMI is using the option toHTTP tunnel through a proxy ???
Many of clients sit behind firewalls/proxies that enable HTTP only. I thought RMI would, as a default, use HTTP tunneling POST, RESPONSe methods to get through, but it does not.
Would that case be insted of using Naming.lokup("RMIServer"); that i should use
Registry reg = LocateRegistry.getResgistry(serverAddress, serverPort);
reg.lookup("RMIServer");
Any help would be greatly appreciated.

RMI doesn't have an option like that. Sockets do, and you get it for any socket including RMI by setting socksProxyHost and socksProxyPort.
The RMI HTTP tunnelling thing happens when there is an HTTP server at the server side. which redirects the request to an RMI server via rmi-cgi.cgi or the RMI servlet. It's automatic, as a fallback, and you can enforce its use via a system property which you can find in the Javadoc Guide to Features/Remote Method Invocation/Useful java.rmi system properties.

Similar Messages

  • Here is example code for HTTPS Tunneling through proxy(400 Lines of code

    Here is the source for Https Tunneling that I have gotten working. It is based on Pua Yeow Cheong's JavaWorld Tip 111. Thanks to David Lord for providing the final breakthrough that I needed.
    I have posted it here for anyone who wishes to use it. If you find any bugs, or write any improvements, please tack them onto the end of this thread.
    I have been trying to tackle this problem for quite some time, so I hope this helps a few of you out there.
    Lots of Luck,
    nightmask.
    <----- Begin Copy and Paste -------->
    import java.net.*;
    import java.io.*;
    import java.security.*;
    import sun.misc.BASE64Encoder;
    import javax.net.*;
    import javax.net.ssl.*;
    *  This example is based on JavaWorld Tip 111. Thanks to Pua Yeow Cheong for writing it.
    *  It tunnels through a proxy using the Https protocol.
    *  Thanks go to David Lord in the java forums for figuring out the main problem with Tip 111
    *  PLEASE NOTE: You need to have the JSSE 1.0.2 jars installed for this to work
    *  Downloads contents of a URL, using Proxy Tunneling and Basic Authentication
    public class URLReader {
         *  The main program for the URLReader class
        public static void main(String[] args) throws Exception {
            //set up strings for use in app. Change these to your own settings
            String proxyPassword = "password";
            String proxyUsername = "username";
            String proxyHost = "myproxy.com";
            String proxyPort = "3128";
            String connectionURL = "https://www.verisign.com";
            //set up system properties to indicate we are using a proxy
            System.setProperty("https.proxyHost", proxyHost);
            System.setProperty("https.proxyPort", proxyPort);
            System.setProperty("proxyHost", proxyHost);
            System.setProperty("proxyPort", proxyPort);
            System.setProperty("proxySet", "true");
            System.setProperty("http.proxyHost", proxyHost);
            System.setProperty("http.proxyPort", proxyPort);
            System.setProperty("http.proxySet", "true");
            //set up handler for jsse
            System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
            java.security.Provider prov = new com.sun.net.ssl.internal.ssl.Provider();
            Security.addProvider(prov);
            //create the connection
            URL myURL = new URL(connectionURL);
            URLConnection myConnection = myURL.openConnection();
            if (myConnection instanceof com.sun.net.ssl.HttpsURLConnection) {
                ((com.sun.net.ssl.HttpsURLConnection) myConnection).setSSLSocketFactory(new SSLTunnelSocketFactory(System.getProperty("proxyHost"), System.getProperty("proxyPort")));
            myConnection.setDoInput(true);
            myConnection.setDoOutput(true);
            BufferedReader in;
            try {
                System.err.println("opening Input stream1");
                in = new BufferedReader(
                        new InputStreamReader(
                        myConnection.getInputStream()));
                String inputLine;
                System.err.println("Input stream is Open1");
                while ((inputLine = in.readLine()) != null) {
                    System.err.println(inputLine);
                in.close();
                System.err.println("Input stream is Closed1");
            } catch (Exception e) {
                e.printStackTrace(System.err);
                String tmp = e.getMessage().toLowerCase().trim();
                System.err.println("tmp *" + tmp + "*");
                if (tmp.indexOf("http") > -1) {
                    //http error message to be parsed
                    tmp = tmp.substring(tmp.indexOf("http")).trim();
                    System.err.println("tmp *" + tmp + "*");
                    tmp = tmp.substring(8).trim();
                    System.err.println("tmp *" + tmp + "*");
                    if (tmp.startsWith("407")) {
                        //proxy authentication required
                        myURL = new URL(connectionURL);
                        myConnection = myURL.openConnection();
                        if (myConnection instanceof com.sun.net.ssl.HttpsURLConnection) {
                            ((com.sun.net.ssl.HttpsURLConnection) myConnection).setSSLSocketFactory(new SSLTunnelSocketFactory(System.getProperty("proxyHost"), System.getProperty("proxyPort"), proxyUsername, proxyPassword));
                        myConnection.setDoInput(true);
                        myConnection.setDoOutput(true);
                        try {
                            System.err.println("opening Input stream 2");
                            in = new BufferedReader(
                                    new InputStreamReader(
                                    myConnection.getInputStream()));
                            String inputLine;
                            System.err.println("Input stream is Open 2");
                            while ((inputLine = in.readLine()) != null) {
                                System.out.println(inputLine);
                            in.close();
                            System.err.println("Input stream is closed 2");
                        } catch (Exception ex) {
                            System.err.println(ex.getMessage());
                            ex.printStackTrace(System.err);
    *  SSLSocket used to tunnel through a proxy
    class SSLTunnelSocketFactory extends SSLSocketFactory {
        private String tunnelHost;
        private int tunnelPort;
        private SSLSocketFactory dfactory;
        private String tunnelPassword;
        private String tunnelUserName;
        private boolean socketConnected = false;
        private int falsecount = 0;
         *  Constructor for the SSLTunnelSocketFactory object
         *@param  proxyHost  The url of the proxy host
         *@param  proxyPort  the port of the proxy
        public SSLTunnelSocketFactory(String proxyHost, String proxyPort) {
            System.err.println("creating Socket Factory");
            tunnelHost = proxyHost;
            tunnelPort = Integer.parseInt(proxyPort);
            dfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
         *  Constructor for the SSLTunnelSocketFactory object
         *@param  proxyHost      The url of the proxy host
         *@param  proxyPort      the port of the proxy
         *@param  proxyUserName  username for authenticating with the proxy
         *@param  proxyPassword  password for authenticating with the proxy
        public SSLTunnelSocketFactory(String proxyHost, String proxyPort, String proxyUserName, String proxyPassword) {
            System.err.println("creating Socket Factory with password/username");
            tunnelHost = proxyHost;
            tunnelPort = Integer.parseInt(proxyPort);
            tunnelUserName = proxyUserName;
            tunnelPassword = proxyPassword;
            dfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
         *  Sets the proxyUserName attribute of the SSLTunnelSocketFactory object
         *@param  proxyUserName  The new proxyUserName value
        public void setProxyUserName(String proxyUserName) {
            tunnelUserName = proxyUserName;
         *  Sets the proxyPassword attribute of the SSLTunnelSocketFactory object
         *@param  proxyPassword  The new proxyPassword value
        public void setProxyPassword(String proxyPassword) {
            tunnelPassword = proxyPassword;
         *  Gets the supportedCipherSuites attribute of the SSLTunnelSocketFactory
         *  object
         *@return    The supportedCipherSuites value
        public String[] getSupportedCipherSuites() {
            return dfactory.getSupportedCipherSuites();
         *  Gets the defaultCipherSuites attribute of the SSLTunnelSocketFactory
         *  object
         *@return    The defaultCipherSuites value
        public String[] getDefaultCipherSuites() {
            return dfactory.getDefaultCipherSuites();
         *  Gets the socketConnected attribute of the SSLTunnelSocketFactory object
         *@return    The socketConnected value
        public synchronized boolean getSocketConnected() {
            return socketConnected;
         *  Creates a new SSL Tunneled Socket
         *@param  s                         Ignored
         *@param  host                      destination host
         *@param  port                      destination port
         *@param  autoClose                 wether to close the socket automaticly
         *@return                           proxy tunneled socket
         *@exception  IOException           raised by an IO error
         *@exception  UnknownHostException  raised when the host is unknown
        public Socket createSocket(Socket s, String host, int port, boolean autoClose)
                 throws IOException, UnknownHostException {
            Socket tunnel = new Socket(tunnelHost, tunnelPort);
            doTunnelHandshake(tunnel, host, port);
            SSLSocket result = (SSLSocket) dfactory.createSocket(tunnel, host, port, autoClose);
            result.addHandshakeCompletedListener(
                new HandshakeCompletedListener() {
                    public void handshakeCompleted(HandshakeCompletedEvent event) {
                        System.out.println("Handshake Finished!");
                        System.out.println("\t CipherSuite :" + event.getCipherSuite());
                        System.out.println("\t SessionId: " + event.getSession());
                        System.out.println("\t PeerHost: " + event.getSession().getPeerHost());
                        setSocketConnected(true);
            // thanks to David Lord in the java forums for figuring out this line is the problem
            // result.startHandshake(); //this line is the bug which stops Tip111 from working correctly
            return result;
         *  Creates a new SSL Tunneled Socket
         *@param  host                      destination host
         *@param  port                      destination port
         *@return                           tunneled SSL Socket
         *@exception  IOException           raised by IO error
         *@exception  UnknownHostException  raised when the host is unknown
        public Socket createSocket(String host, int port)
                 throws IOException, UnknownHostException {
            return createSocket(null, host, port, true);
         *  Creates a new SSL Tunneled Socket
         *@param  host                      Destination Host
         *@param  port                      Destination Port
         *@param  clientHost                Ignored
         *@param  clientPort                Ignored
         *@return                           SSL Tunneled Socket
         *@exception  IOException           Raised when IO error occurs
         *@exception  UnknownHostException  Raised when the destination host is
         *      unknown
        public Socket createSocket(String host, int port, InetAddress clientHost,
                int clientPort)
                 throws IOException, UnknownHostException {
            return createSocket(null, host, port, true);
         *  Creates a new SSL Tunneled Socket
         *@param  host             destination host
         *@param  port             destination port
         *@return                  tunneled SSL Socket
         *@exception  IOException  raised when IO error occurs
        public Socket createSocket(InetAddress host, int port)
                 throws IOException {
            return createSocket(null, host.getHostName(), port, true);
         *  Creates a new SSL Tunneled Socket
         *@param  address          destination host
         *@param  port             destination port
         *@param  clientAddress    ignored
         *@param  clientPort       ignored
         *@return                  tunneled SSL Socket
         *@exception  IOException  raised when IO exception occurs
        public Socket createSocket(InetAddress address, int port,
                InetAddress clientAddress, int clientPort)
                 throws IOException {
            return createSocket(null, address.getHostName(), port, true);
         *  Sets the socketConnected attribute of the SSLTunnelSocketFactory object
         *@param  b  The new socketConnected value
        private synchronized void setSocketConnected(boolean b) {
            socketConnected = b;
         *  Description of the Method
         *@param  tunnel           tunnel socket
         *@param  host             destination host
         *@param  port             destination port
         *@exception  IOException  raised when an IO error occurs
        private void doTunnelHandshake(Socket tunnel, String host, int port) throws IOException {
            OutputStream out = tunnel.getOutputStream();
            //generate connection string
            String msg = "CONNECT " + host + ":" + port + " HTTP/1.0\n"
                     + "User-Agent: "
                     + sun.net.www.protocol.http.HttpURLConnection.userAgent;
            if (tunnelUserName != null && tunnelPassword != null) {
                //add basic authentication header for the proxy
                sun.misc.BASE64Encoder enc = new sun.misc.BASE64Encoder();
                String encodedPassword = enc.encode((tunnelUserName + ":" + tunnelPassword).getBytes());
                msg = msg + "\nProxy-Authorization: Basic " + encodedPassword;
            msg = msg + "\nContent-Length: 0";
            msg = msg + "\nPragma: no-cache";
            msg = msg + "\r\n\r\n";
            System.err.println(msg);
            byte b[];
            try {
                //we really do want ASCII7 as the http protocol doesnt change with locale
                b = msg.getBytes("ASCII7");
            } catch (UnsupportedEncodingException ignored) {
                //If ASCII7 isn't there, something is seriously wrong!
                b = msg.getBytes();
            out.write(b);
            out.flush();
            byte reply[] = new byte[200];
            int replyLen = 0;
            int newlinesSeen = 0;
            boolean headerDone = false;
            InputStream in = tunnel.getInputStream();
            boolean error = false;
            while (newlinesSeen < 2) {
                int i = in.read();
                if (i < 0) {
                    throw new IOException("Unexpected EOF from Proxy");
                if (i == '\n') {
                    headerDone = true;
                    ++newlinesSeen;
                } else
                        if (i != '\r') {
                    newlinesSeen = 0;
                    if (!headerDone && replyLen < reply.length) {
                        reply[replyLen++] = (byte) i;
            //convert byte array to string
            String replyStr;
            try {
                replyStr = new String(reply, 0, replyLen, "ASCII7");
            } catch (UnsupportedEncodingException ignored) {
                replyStr = new String(reply, 0, replyLen);
            //we check for connection established because our proxy returns http/1.1 instead of 1.0
            if (replyStr.toLowerCase().indexOf("200 connection established") == -1) {
                System.err.println(replyStr);
                throw new IOException("Unable to tunnel through " + tunnelHost + ":" + tunnelPort + ". Proxy returns\"" + replyStr + "\"");
            //tunneling hanshake was successful
    }<----- End Copy and Paste -------->

    BTW, if you are using an implementation in which
    the http/https implementation recognises
    the java.net.Authenticator properly, you can use
    that framework to do basic/digest authentication.
    I think Sun's JDK 1.4 supports both basic
    and digest for both proxies and the actual end
    site you connect via http/https, but I haven't
    tested it to be sure. I know it works
    with http/basic at the end host.
    Today's Ob hack:
    import java.net.*;
    import java.io.*;
    class MyAuth extends Authenticator {
        protected PasswordAuthentication getPasswordAuthentication() {
            System.out.println("The realm '" + getRequestingPrompt() +
                "' at '" + getRequestingHost() + ":" + getRequestingPort() +
                "'\n" + "using " + getRequestingProtocol() + " is requesting " +
                getRequestingScheme().toUpperCase() + " authentication.");
            System.out.println("");
            System.out.println("What should we send them?  Let's send them ...");
            System.out.println("");
            return new PasswordAuthentication("username", "password".toCharArray());    }  
    public class MyURL {
        public static void main(String[] args) throws Exception {
            // set to the authenticator you want to use.
            Authenticator.setDefault(new myAuth());
            URL url =
                new URL("http://www.some.com/something_protected/index.htm");
            BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    url.openStream()));
            String inputLine;
            while ((inputLine = in.readLine()) != null) {
                System.out.println(inputLine);
            in.close();

  • HTTP-Tunneling through Apache Plug-in

    Hello,
    has anybody experience with HTTP-Tunneling of requests to a WLS
    4.5.1SP13 through an Apache-Webserver?
    I'm not able to configure the apache plug-in from weblogic to act as a
    reverse proxy for requests coming from a
    Java Client Application.
    Any Hints available?
    Remo

    "Jong Lee" <[email protected]> wrote in message
    news:3a4a9efa$[email protected]..
    >
    Remo Schnidrig <[email protected]> wrote:
    Hello Jong,
    HTTP tunneling will append ".tun" to your request.
    For apache, you can use "MatchExpression" to proxy the mime type.
    i.e: add the following line to your httpd.conf
    MatchExpression *.tunThat is functioning. Thank you very much.
    Another question:
    What about HTTPS-Tunneling through an Apache-Server?
    How can I get everything through?
    Thank you
    Remo
    We don't support https from the bridge to the server yet.
    JongWhat about using HTTPS-Tunneling between our Java client and the WLS
    Stronghold plug-in and HTTP-Tunneling between the plug-in and the WLS?
    If this is possible, how do I have to setup the stronghold?
    Remo

  • Re: (forte-users) HTTP request through proxy server

    Daniel -
    No, it does not. ;)
    How do you say to HTTPRequest to go through proxy?
    Thanks,
    Taras
    Daniel Nguyen wrote:
    >
    Hi,
    It works very well. I have experienced this model for a distant Forte client
    calling a Forte Server service Object for instance without any environment
    and without TCP access (passing through firewall for instance).
    It has also worked very well to make an injectot to improve Web Enterprise
    and IIS using the SendRequest from HTTPAccess.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    http://perso.club-internet.fr/dnguyen/
    Taras Katkov a &eacute;crit:
    HTTP request through proxy server using forte HTTP library?
    Any experience?
    Thanks,
    Taras
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com--
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    You can also use the HTTP-DC project.... You don't
    need Web Enterprise for this. From what I can tell,
    this is available in L.x on....
    There is api documentation in M.2 (with scant
    examples.)
    There's a special process to put the project in your
    repository (it isn't installed in the repository in
    the standard install,) the documentation in M.2
    (probably in M.0 too, AFAIK) that tells you how to do
    this (look for HTTP-DC in the online help.)
    I haven't done much with it yet, I've just installed
    it. If anybody out there has examples, that'd be
    great. I'll try to contribute more the moment I get a
    chance to explore it....
    Christopher Fury
    BellSouth Communications Systems
    --- Daniel Nguyen <dnguyenclub-internet.fr> wrote:
    Hi,
    If you have Web Enterprise, you can user
    HttpAccess.SendRequest().
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Amin, Kamran a &eacute;crit:
    Is there any way to make a HTTP request from TOOLto another HTTP Service?
    thanks in advance.
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. Tounsubscribe, send in a new
    email the word: 'Unsubscribe' to:forte-users-requestlists.xpedior.com
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To
    unsubscribe, send in a new
    email the word: 'Unsubscribe' to:
    forte-users-requestlists.xpedior.com
    Kick off your party with Yahoo! Invites.
    http://invites.yahoo.com/

  • HTTPS Recording through proxy

    Hi all
    I'm trying to record through a proxy using OpenScript 9.0.1. When the site is an HTTP site, all is fine and I'm asked for my proxy password and then passed on to the site. OpenScript records as expected. But when the site is HTTPS, I don't get the proxy authorisation box and eventually the following is returned. Content-length: 0 Connection: Keep-Alive
    Has anyone got experience of recording HTTPS through a proxy. I'm trying to work out if it's OpenScript, the proxy or some network security issue.
    I've tried both to use the IE settings or manually specify proxy settings in OpenScript.
    Another interesting issue is that the 'ignore' list in IE does not seem to be used by OpenScript and there is no way in the OpenScript prefs to set a proxy ignore list?
    many thanks
    Wilbo.

    nobody knows?How about you... do you know the answer? Then tell us. :p

  • RMI over HTTP Tunneling [Help needed Urgent]

    Hi Friends,
    This is a old topic in the forum, but I am learning RMI now, So for me it is a still new topic.
    Can anyone in the forum please send me the working code apart from sun implementation code. I stuck with the java-rmi.cgi file while executing, even though all other *.pl and *.cgi files are executing.
    Please help me.
    Thanks in advance,
    Harish

    See http://www.geocities.com/dmh2000/ApacheTomcatRMI.htm.

  • Smart Update through Proxy / Firewall

    I've tried to run smart update on a server which cannot access Internet because
    it is located on an Intranet environment. However, since it cannot resolve DNS
    outside the LAN is it possible to run smart update through PROXYES ?

    Contact Adobe Support for help with this one.

  • RMI/Http Tunnelling

    Hi
    I m developing an intranet application. Using the following flow
    applet->servlet->bean->database->servlet->applet.
    For this flow to take place, should i be using rmi or http tunnelling. There is a lot of interaction between the client and the server database, so i m confused what option will be effiecient? and y

    Hi
    I m developing an intranet
    ping an intranet application. Using the following
    flow
    applet->servlet->bean->database->servlet->applet.
    For this flow to take place, should i
    place, should i be using rmi or http tunnelling.
    There is a lot of interaction between the client and
    the server database, so i m confused what option will
    be effiecient? and yJust curious! Shouldn't a servlet+DAO serve the purpose?

  • HTTPS and a Proxy server?

    Does the plugin-in still not work with HTTPS and a proxy server?
    From plug-in docs -
    "Java Plug-in supports http, ftp, gopher and SOCKS v4 protocols through the proxy server. Currently, Java Plug-in does not support https (SSL). "

    Hello
    I am making HTTPS calls from within my applet code and this works fine using the basic Java Plug-in support for HTTPS.
    This means my code basically does:
    URL url = new URL("https://myhost.com/servlet/Test");
    URLConnection conn = url.openConnection();
    etc..
    We are using Java 1.4.2. I've read in the "How HTTPS Works in Java Plug-in" for 1.3, that the plugin uses the browsers API for making HTTPS connections. Is this still the case for 1.4?
    My basic problem is that it all works fine if the browser is NOT configured to use a proxy server. If a proxy server is configured we get the following Exception in the client:
    java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request ( The data is invalid. )"
    I have read that "Sun's Java Secure Socket Extension (JSSE) library allows you to access a secure Web server from behind a firewall via proxy tunnelling. However, JSSE expects the proxy's reply to the tunnelling request to begin with "HTTP 1.0"; otherwise, it throws an IOException" (http://www.javaworld.com/javatips/jw-javatip111_p.html)
    The article talks about using the JSSE library but it seems to be assuming the client is an application not an applet.
    How do I use JSSE from within an applet if all the proxy information I seem to need to set in the JSSE code is held by the browser?
    Will JSSE support proxies returning responses beginning HTTP 1.1 in the future?
    Any help on this would be greatly appreciated.
    Many thanks
    mark

  • Http tunneling

    I'm facing some problems while doing http tunneling thru proxy and below I'm giving some trace messages.
    Without proxy the system seems to work ok.
    Client -------- proxy ------- Tunnel Server --------- Server
    The tunnel server tries to send back the data to client on the http connection.
    The client is trying to receive data on the http connection.
    The tunnel forwarder throws the following exception. Basically the tunnel forwarder thinks that the socket is closed immediately.
    java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(Unknown Source)
    at java.io.ObjectOutputStream.drain(Unknown Source)
    at java.io.ObjectOutputStream.setBlockData(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at TunnelForwarder.run(TunnelForwarder.java:108)
    java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(Unknown Source)
    at java.io.ObjectOutputStream.drain(Unknown Source)
    at java.io.ObjectOutputStream.setBlockData(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at TunnelForwarder.run
    The client throws the following exception. It thinks that the httpConnection is down immediately.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
    at TunnelReader.establishConnectionPath(TunnelReader.java:98)
    at TunnelReader.run(TunnelReader.java:124)
    java.lang.NullPointerException
    at TunnelReader.run(TunnelReader.java:130)
    However, the tunnel server shows that the tunnel is maintained
    And even the netstat -n shows that the connection exists
    C:\WINNT>netstat -n
    Active Connections
    Proto Local Address Foreign Address State
    |
    |
    TCP tunnelServer:3299 server:12000 ESTABLISHED
    |
    |
    TCP tunnelServer:9000 proxy:48040 ESTABLISHED
    |
    |
    The http connection is actually brought down by the proxy after a considerably long time (more than a minute).
    Regards,
    Rahuole pawer

    Do not try base your tunnel on urlConnections. After you send the message, you cannot read. The only way is to use 2 connections, because all the proxy servers support only HTTP/1.0, which was depricated by W3C in 1996 after HTTP/1.1 was accomplished. If your proxy does you are lucky. To make your tunnel working over HTTP/1.0 is terrible task of TCP stack rewriting in Java. May be someone has it implemented already. I am interested to look after.

  • Help needed for CORBA over Http through proxy server[Very Urgent]

    Hi Friendz,
    I am new to J2EE. Right now I am learning RMI, Corba now.
    In RMI, to pass through Http to bypass firewall or through proxy sever, we can use either Http to port or Http to CGI/Servlet i.e., Http tunneling.
    In the same, I am running a simple corba application, i want my corba application to pass through my proxy server using http which is configured to address 127.0.0.1 and port 8118.
    How to pass my corba application through proxy server. please help me and it is very urgent.
    Is it possible or not, please let me know some comments about this topic
    Thanks in advance Friends for your help

    This is so extremely urgent that it needs to be asked multiple times.
    http://forum.java.sun.com/thread.jspa?threadID=762950

  • Jms & proxy http tunnel

    "I am trying to run TradeRecive sample program that come with 7.0 on a machine behind the firewall at remote site and I am having the following exception. (java command line has proxy specified, server has http tunneling enabled)
              Can someone help ?
              C:\ArthurTest\JMS>java -Dhttp.proxyHost=134.142.50.10 -Dhttp.proxyPort=8080 -cp
              .;.\weblogic.jar TraderReceive http://205.172.179.92:80
              <May 6, 2003 4:33:25 PM CDT> <Error> <RJVM> <000515> <execute failed
              java.net.ProtocolException: Tunneling result unspecified - is the HTTP server a
              t host: '205.172.179.92' and port: '80' a WebLogic Server?
              java.net.ProtocolException: Tunneling result unspecified - is the HTTP server at
              host: '205.172.179.92' and port: '80' a WebLogic Server?
              at weblogic.rjvm.http.HTTPClientJVMConnection.handleNullResponse(HTTPCli
              entJVMConnection.java:173)
              at weblogic.rjvm.http.HTTPClientJVMConnection.receiveAndDispatch(HTTPCli
              entJVMConnection.java:409)
              at weblogic.rjvm.http.HTTPClientJVMConnection.execute(HTTPClientJVMConne
              ction.java:305)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              Exception in thread "main" javax.naming.CommunicationException. Root exception
              is java.net.ConnectException: http://205.172.179.92:80: Bootstrap t
              

    Hi,
              The tunneling problem likely has nothing to do with JMS.
              JMS likely hasn't been called yet. I have little experience here,
              so all I can suggest is trying to connect
              to the WL server directly without the
              firewall/proxy-server/interposed-web-server in between --
              to see if you can narrow down the problem to the HTTP pass-through
              to the WL server. Then check the BEA docs, and google search and/or
              post to the more relevant rmi and/or jndi newsgroups...
              Tom, BEA
              tieeren wrote:
              > "I am trying to run TradeRecive sample program that come with 7.0 on a machine behind the firewall at remote site and I am having the following exception. (java command line has proxy specified, server has http tunneling enabled)
              >
              > Can someone help ?
              >
              >
              >
              > C:\ArthurTest\JMS>java -Dhttp.proxyHost=134.142.50.10 -Dhttp.proxyPort=8080 -cp
              > .;.\weblogic.jar TraderReceive http://205.172.179.92:80
              > <May 6, 2003 4:33:25 PM CDT> <Error> <RJVM> <000515> <execute failed
              > java.net.ProtocolException: Tunneling result unspecified - is the HTTP server a
              > t host: '205.172.179.92' and port: '80' a WebLogic Server?
              > java.net.ProtocolException: Tunneling result unspecified - is the HTTP server at
              > host: '205.172.179.92' and port: '80' a WebLogic Server?
              > at weblogic.rjvm.http.HTTPClientJVMConnection.handleNullResponse(HTTPCli
              > entJVMConnection.java:173)
              > at weblogic.rjvm.http.HTTPClientJVMConnection.receiveAndDispatch(HTTPCli
              > entJVMConnection.java:409)
              > at weblogic.rjvm.http.HTTPClientJVMConnection.execute(HTTPClientJVMConne
              > ction.java:305)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              > Exception in thread "main" javax.naming.CommunicationException. Root exception
              > is java.net.ConnectException: http://205.172.179.92:80: Bootstrap t
              

  • HTTP tunneling and reverse proxy server

    We're currently using Windows Media Services (WMS) to stream
    video on our website. There is an option WMS to use the HTTP
    protocol and to specify the port you'd like to use. This has
    allowed us to stream video through our external firewall, through
    our reverse proxy server, and through our internal firewall to our
    media server. I've been trying for two days now to get Flash Media
    Server (FMS) to do the same thing. For some reason the HTTP
    tunneling (RTMPT) protocol doesn't appear to be acting like the
    HTTP protocol that WMS is using. Anyone have some tips on this
    configuration. I've scoured web resources and documentation as best
    I could. Any help would be greatly appreciated.
    Thanks.

    To give a better picture, here's a more complete description of set up and goals
    Static IP hits external interface of ASA. ASA has a static nat rule to forward it to my DMZ server.
    DMZ server is running IIS 8. Here are what some of the sites look like.
    jira.xxxxx.com -> 10.1.10.21 (ubuntu server) | port 80
    email.xxxxx.com - > 10.1.10.16 (domain joined server 2012) port 80, 443
    media.xxxxx.com -> 10.1.10.14 (domain joined server 2012) port 80, 443
    other stuff like this -> 10.1.10.x port 80 or others
    All of the A records for those domain names point to the static which routes to the ASA and then is NAT'd to the DMZ server. 
    What do I need to do in IIS to have those sites get directed to the proper internal locations?
    Thanks!!

  • Using a HTTP destination through a HTTP proxy

    Hi there!
    I have written a Web Dynpro application that connects to a web service using a web service model. The request is configured to use a HTTP destination by means of the _setHTTPDestinationName() method. I configured the HTTP destination in the visual administrator and it uses Logon ticket to authenticate.
    All this works perfectly in my test environment. Unfortunately in my production environment the web service must be accessed through a HTTP proxy and I could not find where to configure the proxy settings for HTTP destinations.
    I found some information about "open a transaction in SICF" an so on which doesn't help me because I have no ABAP client.
    I found some information about configuring proxies in the NWA but this does not seem to apply to my NW version, wich is 2004 SP16.
    Any clues?
    Thanks in advance.

    Hi Olivier,
    thank you for your reply.
    Is there really a possiblity to configure a proxy for any given HTTP Destination in ABAP? Because if there is, I cannot believe that there is no equivalent in Java. As there is no such a thing as a HTTP Destination "for ABAP" and a HTTP Destination "for Java", what would happen if I used the HTTP Destination with proxy settings created in ABAP for my Java program?
    There is another way to use a proxy which I found by analysing the generated Java classes of my web service model. You can do the following:
    SomeServiceImpl service = SomeDMSModel.getServiceImpl();
    service.setHTTPProxyResolver(new HTTPProxyResolver() {
      HTTPProxy proxy;
      public HTTPProxy getHTTPProxyForHost(String host) throws RemoteException {
        if (this.proxy == null) {
          this.proxy = new HTTPProxy();
          this.proxy.setProxyHost("proxy.company.com");
          this.proxy.setProxyPort(1234);
        return this.proxy;
    This is NOT a good way to do it, as it transfers a portal administration task to the programmer, but it shows that the functionality is present in Java.
    So I haven't given up on finding where it has to be configured...
    Edited by: Robert Rodewald on Jan 18, 2008 11:01 AM

  • What are the limitations of using RMI over http with EJB?

    We have a requirement for an intranet application where the majority of the clients
    (Swing clients) will be able to connect directly using either T3 or IIOP. However,
    there are a number of clients that will need to traverse a firewall.
    We could use SOAP, but I dont want to lose the value that RMI gives us (clustering,
    security, statefullness support etc). I am thinking of using RMI over http - which
    Weblogic supports.
    I have been trying to find some documentation on the topic - but havent succeded
    so far. What I would like to understand is: What limitations I would have using
    RMI over http. Do I lose anything (apart from performance) using http?
    Regards,
    Nick

    You will have to enable tunneling on the server side and I have not heard of any
    complaints of using it.
    Shiva.
    Nick Minutello wrote:
    In fact, we are not using applets - and its not an internet application. We are
    using Java Webstart and Swing on our intranet (the problem of the size of the
    weblogic.jar is a pain - but well known)
    The question for me is; Apart from performance, are there any limitations to using
    RMI over http?
    Can we also use JMS over http?
    -Nick
    Shiva Paranandi <[email protected]> wrote:
    "Old wine new bottle".
    The biggest problem with the approach of Applets like
    stuff connecting to weblogic is the size of the classes that need to
    be supplied to the
    users. The applets/swing would need a lot of weblogic classes which you
    need to
    supply as jar file. This file can be in the order of MBs depending on
    the
    weblogic version. we had a similar kind of problem and migrated the applets
    to use
    servlets instead of directly invoking ejbs or jms topics etc. Having
    the applets
    connect
    to servlets you would still benefit from the features of clustering etc.
    and added to
    that
    you would reduce the number of remote calls.
    Shiva.
    Nick Minutello wrote:
    We have a requirement for an intranet application where the majorityof the clients
    (Swing clients) will be able to connect directly using either T3 orIIOP. However,
    there are a number of clients that will need to traverse a firewall.
    We could use SOAP, but I dont want to lose the value that RMI givesus (clustering,
    security, statefullness support etc). I am thinking of using RMI overhttp - which
    Weblogic supports.
    I have been trying to find some documentation on the topic - but haventsucceded
    so far. What I would like to understand is: What limitations I wouldhave using
    RMI over http. Do I lose anything (apart from performance) using http?
    Regards,
    Nick

Maybe you are looking for

  • Payment entry

    Dear friends, I want to know tcode for payment entries in order to control check lot series. One i know is f58 which is used for vendor open item payment.Similarly i want to know same for down payment to vendor and GL account payment.In both the case

  • Printer not working after installing new cartridge

    have  HP D5460 printer. Installed new black cartridge only #564 since I only use black ink. Error message appeared "Oxc19a0020 turn printer OFF & then ON".  Did that and also checked to be sure cartridge was installed properly. It Was. I can't get th

  • Idvd templates made in motion?

    I know this is not an idvd forum. But I am trying to see if it is possible to create templates (using Motion) with dropzones and use them in idvd. I use idvd for making quick copies of various material with the same DVD menu but would like to create

  • Aperture 3.5 incorrectly the gray pipette works

    We choose a photo, we apply a mipetka, we receive nonsense. Before updating everything was as it should be. It is urgently necessary to do something. Выбираем фото, применяем мипетку, получаем ерунду. До обновления всё было в порядке. Срочно нужно чт

  • Suggested procedure for safe updating of Safari to v. 3.2

    If your Safari keeps crashing, or if you are updating Safari (or just have): N.B. Never delete Safari, never run it under Rosetta, don't use proxy settings. (If you prefer to download updates via Software Update in the Apple menu (which would ensure