RMI client behind a firewall, server behind a firewall too

Discussion in 'Java' started by Robert Dodier, Sep 13, 2004.

  1. Hello,

    Browsing the web & newsgroups, it looks like this problem doesn't
    have any kind of easy solution, but let's see if someone knows different.

    I want to have a RMI client behind a firewall and a RMI server
    behind another firewall. I don't have any control over the firewalls.
    I know port 80 will be open for http traffic, but that's it.
    The web server on either side isn't the same as the machine running
    the RMI client or server.

    I want the client to be able to call methods on server objects
    and also to enable callbacks from the server to the client.

    What can be done in this case? I've read the RMI docs at Sun,
    browsed through a few dozen webpages & news messages, and the
    situation looks pretty dark, actually. Maybe someone has cause
    for optimism here. Thanks for any information.

    Robert Dodier
     
    Robert Dodier, Sep 13, 2004
    #1
    1. Advertising

  2. On 13 Sep 2004 12:50:21 -0700, (Robert Dodier)
    wrote:

    >Hello,
    >
    >Browsing the web & newsgroups, it looks like this problem doesn't
    >have any kind of easy solution, but let's see if someone knows different.
    >
    >I want to have a RMI client behind a firewall and a RMI server
    >behind another firewall. I don't have any control over the firewalls.
    >I know port 80 will be open for http traffic, but that's it.
    >The web server on either side isn't the same as the machine running
    >the RMI client or server.
    >
    >I want the client to be able to call methods on server objects
    >and also to enable callbacks from the server to the client.
    >
    >What can be done in this case? I've read the RMI docs at Sun,
    >browsed through a few dozen webpages & news messages, and the
    >situation looks pretty dark, actually. Maybe someone has cause
    >for optimism here. Thanks for any information.
    >
    >Robert Dodier


    I believe it can be done through HTTP tunnelling. Do a web search on
    that. You need a servlet to forward the requests. (Can you run
    servlets in your web server?) I think Sun provides one but you might
    need to change it if the RMI server is on a different machine from the
    web server.
     
    Alexander Ames, Sep 13, 2004
    #2
    1. Advertising

  3. You can define sockets for the stub and the skeleton (Class
    RMISocketFactory).
    ---schnipp---
    public class HelloImpl implements Hello{
    public HelloImpl() throws RemoteException{
    UnicastRemoteObject.export(this, 80, new MyClientFactory(), new
    MyServerFactory());
    }
    ---schnapp---
    If you need a complete example, write me.
    RMI is written for use in an Intranet. A better way is to use Webservices
    to solve your problem (e.g. AXIS).

    Andres

    On 13 Sep 2004 12:50:21 -0700, Robert Dodier <>
    wrote:

    > Hello,
    >
    > Browsing the web & newsgroups, it looks like this problem doesn't
    > have any kind of easy solution, but let's see if someone knows different.
    >
    > I want to have a RMI client behind a firewall and a RMI server
    > behind another firewall. I don't have any control over the firewalls.
    > I know port 80 will be open for http traffic, but that's it.
    > The web server on either side isn't the same as the machine running
    > the RMI client or server.
    >
    > I want the client to be able to call methods on server objects
    > and also to enable callbacks from the server to the client.
    >
    > What can be done in this case? I've read the RMI docs at Sun,
    > browsed through a few dozen webpages & news messages, and the
    > situation looks pretty dark, actually. Maybe someone has cause
    > for optimism here. Thanks for any information.
    >
    > Robert Dodier




    --
    Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
     
    Matthias Kraft, Sep 14, 2004
    #3
  4. Robert Dodier

    Sudsy Guest

    Matthias Kraft wrote:
    > You can define sockets for the stub and the skeleton (Class
    > RMISocketFactory).
    > ---schnipp---
    > public class HelloImpl implements Hello{
    > public HelloImpl() throws RemoteException{
    > UnicastRemoteObject.export(this, 80, new MyClientFactory(), new
    > MyServerFactory());
    > }
    > ---schnapp---
    > If you need a complete example, write me.
    > RMI is written for use in an Intranet. A better way is to use
    > Webservices to solve your problem (e.g. AXIS).


    To the OP: You've had two good replies here. I must admit that I was
    thinking Web Services simply because of portability issues. But the
    proxy approach is mature and enjoys wide support.
    IOW, you'd be well served by either solution.
    Good luck!
     
    Sudsy, Sep 14, 2004
    #4
  5. If you have no control over the firewalls at all, then there is no solution.
    However, if you can negotiate opening of a few ports with the admin, then
    the solution does exist. If the latter is the case, let me know and I will
    walk you through the setup.

    Alex Molochnikov
    Gestalt Corporation
    www.gestalt.com

    "Robert Dodier" <> wrote in message
    news:...
    > Hello,
    >
    > Browsing the web & newsgroups, it looks like this problem doesn't
    > have any kind of easy solution, but let's see if someone knows different.
    >
    > I want to have a RMI client behind a firewall and a RMI server
    > behind another firewall. I don't have any control over the firewalls.
    > I know port 80 will be open for http traffic, but that's it.
    > The web server on either side isn't the same as the machine running
    > the RMI client or server.
    >
    > I want the client to be able to call methods on server objects
    > and also to enable callbacks from the server to the client.
    >
    > What can be done in this case? I've read the RMI docs at Sun,
    > browsed through a few dozen webpages & news messages, and the
    > situation looks pretty dark, actually. Maybe someone has cause
    > for optimism here. Thanks for any information.
    >
    > Robert Dodier
     
    Alex Molochnikov, Sep 14, 2004
    #5
  6. Robert Dodier

    heidi Guest

    "Alexander Ames" <> wrote in message
    news:...
    > I believe it can be done through HTTP tunnelling.


    The OP wanted to do callbacks to the client. The HTTP tunnelling will not
    allow that.
     
    heidi, Sep 14, 2004
    #6
  7. On Tue, 14 Sep 2004 00:10:04 -0400, Sudsy <> wrote:

    > Matthias Kraft wrote:
    >> You can define sockets for the stub and the skeleton (Class
    >> RMISocketFactory).
    >> ---schnipp---
    >> public class HelloImpl implements Hello{
    >> public HelloImpl() throws RemoteException{
    >> UnicastRemoteObject.export(this, 80, new MyClientFactory(),
    >> new MyServerFactory());
    >> }
    >> ---schnapp---
    >> If you need a complete example, write me.
    >> RMI is written for use in an Intranet. A better way is to use
    >> Webservices to solve your problem (e.g. AXIS).

    >
    > To the OP: You've had two good replies here. I must admit that I was
    > thinking Web Services simply because of portability issues. But the
    > proxy approach is mature and enjoys wide support.
    > IOW, you'd be well served by either solution.
    > Good luck!
    >


    Thanks. I will try to keep this quality and improve my english.



    --
    Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
     
    Matthias Kraft, Sep 14, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jo Voordeckers
    Replies:
    2
    Views:
    914
  2. tobias.weih

    RMI app behind NAT firewall

    tobias.weih, Jan 25, 2006, in forum: Java
    Replies:
    1
    Views:
    4,941
    tobias.weih
    Jan 30, 2006
  3. Kumarforg

    Web Service invocation from behind proxy behind firewall

    Kumarforg, Aug 3, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    217
    Kumarforg
    Aug 3, 2004
  4. tjfdownsouth

    Web service client behind a firewall

    tjfdownsouth, Mar 19, 2007, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    142
    Manish Bafna
    Mar 20, 2007
  5. Mats
    Replies:
    4
    Views:
    195
    Fred Oz
    Sep 26, 2004
Loading...

Share This Page