Menu

#16 Support for "http" url location scheme

open
5
2005-11-27
2005-11-24
No

I might be convenient to be able to obtain remote IOR
by passing it's [http://] reference directly to
RemotingServices.Connect() method.

This will make sense when interoperating with Borland
VisiBroker 4.5 in a gatekeeper configuration. In this
case IOR is automatically published to a build-in http
server. So the the native code to inititalise ORB on a
client side might look like this:

..
properties.put(
"vbroker.orb.gatekeeper.ior",
"http://server:15000/gatekeeper.ior");

orb = ORB.init(args, properties);
..

In the case of iiop.net it would be hardly more
reasonable to try to impl. it in the similar way, i.e.:
as a property passed to IiopChannel(..) constructor,
then just as a simple url passed directly to
.Connect(), wouldn't it?

Here is how i'd done this:

10 Insert the following lines into switch inside
IiopUrlUtil.CreateIorForUrl() method in IIOPURLUtil.cs:96 :

..
else if (url.StartsWith("http")) {
HttpLoc httpLoc = new HttpLoc(url);
ior = new Ior(httpLoc.url);
}
..

20 Add the following line at the end of return stmt
inside IiopUrlUtil.IsUrl(), IIOPURLUtil.cs:72

.. || data.StartsWith("http"))

30 Add a HttpLoc implementation in a new file
HttpLoc.cs (attached to this msg.)

Hope it aLL does make sense?

Discussion

  • Taras Strypko

    Taras Strypko - 2005-11-24

    HttpLoc implementation

     
  • Dominic Ullmann

    Dominic Ullmann - 2005-11-27
    • assigned_to: nobody --> dullmann
     
  • Dominic Ullmann

    Dominic Ullmann - 2005-11-27

    Logged In: YES
    user_id=660259

    Thank you for providing this suggestion.
    I'll have a look at this.

    There are ORB supporting CORBA requests/responses over
    http, i.e. they use HIOP instead of IIOP protocol. This
    could possibly be confused with what you suggest.
    Therefore, I need some time to think a little bit more
    about this.

    Do you know other ORBs supporting this?

    Thank you
    Best regards!

     
  • Taras Strypko

    Taras Strypko - 2005-11-29

    Logged In: YES
    user_id=1388163

    Hello Dominic,

    I've done a little investigation regarding "http:" in
    VisiBroker 4.5 (VBJ)

    What i wanted to discover was whether VBJ supports "http:"
    location url itself OR is it done by certain pluggable
    layer, such as gatekeeper functionality or other bind
    interceptor.

    Given that a simple java appl. was launched with the
    following args:

    -Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB
    -Dorg.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORBSingleton
    -Djavax.rmi.CORBA.StubClass=com.inprise.vbroker.rmi.CORBA.StubImpl
    -Djavax.rmi.CORBA.UtilClass=com.inprise.vbroker.rmi.CORBA.UtilImpl
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.inprise.vbroker.rmi.CORBA.PortableRemoteObjectImpl

    (which, i suspect, is nothing more then plugging in VBJ support)

    Then with the following lines we'll be able to obtain
    reference to VBJ's gatekeeper object, that is currently
    launched on the server:

    /// make empty property collection
    Properties properties = new Properties();

    ORB _orb = ORB.init(args, properties);

    /// explicitly obtain the refence to AliasManager
    AliasManager _am = AliasManagerHelper.narrow(
    orb.string_to_object("http://server:15099/lib/gatekeeper.ior")
    );

    /// now can quere any other object with _am.find()
    ..

    Here i've obtained AliasManager reference directly not using
    gatekeeper machanics, so, i suppose, here was just "plain"
    VBJ functionality involved. (There is another factor that
    makes me think it was pure VBJ: GIOP request was submited
    with AddressingMode = 0, while with gatekeeper support
    turned on it would normally use AddressingMode = 1)

    So we see, at least for ORB.string_to_object() VBJ supports
    "http:" urls. For iiop.net it would automatically mean that
    .Connect() might support it too.

     

Log in to post a comment.