Discussion:
[omniORB] clarify url resolution
Jason Stelzer
2007-08-17 01:49:05 UTC
Permalink
I'm working wth looking up/using remote objects. One of the first
things I need to do is lookup the remote name service. After that I
lookup remote objects to use.
I can lookup remote objects via IOR urls, but not corbaloc urls
(which I would prefer as they're more readable).

CosNaming::NamingContext_var _nc;
CORBA::Object_var nsobj = _orb->string_to_object(namingUrl);
_nc = CosNaming::NamingContext::_narrow(nsobj);

This works if namingUrl = "IOR:000......"
However if namingUrl = "corbaloc:iiop:***@hostname:3528/JBoss/Naming/
remote" I get an OBJECT_NOT_EXIST exception from corba.

Is my url incorrect? Is this only supported by certain corba
versions? Should I be calling something different for a url formatted
like the latter example? Using the IOR url will work, but its less
than ideal from a human readable perspective.


--
J.
Jason Stelzer
2007-08-17 02:03:05 UTC
Permalink
Post by Jason Stelzer
I'm working wth looking up/using remote objects. One of the first
things I need to do is lookup the remote name service. After that I
lookup remote objects to use.
I can lookup remote objects via IOR urls, but not corbaloc urls
(which I would prefer as they're more readable).
CosNaming::NamingContext_var _nc;
CORBA::Object_var nsobj = _orb->string_to_object(namingUrl);
_nc = CosNaming::NamingContext::_narrow(nsobj);
This works if namingUrl = "IOR:000......"
Naming/remote" I get an OBJECT_NOT_EXIST exception from corba.
Is my url incorrect? Is this only supported by certain corba
versions? Should I be calling something different for a url
formatted like the latter example? Using the IOR url will work, but
its less than ideal from a human readable perspective.
Sorry for the noise. I turned up the trace level and figured out what
was going on.

In the beginning I was setting InitRef in my orb.conf to be the above
corbaloc:.. url.

However, now I've made it a parameter and I'm looking up the remote
name service so the url needs to be corbaloc:iiop:***@hostname:3528/
NameService

The exception I was seeing was due to me using the wrong name.

--
J.
Ridgway, Richard (London)
2007-08-17 02:04:11 UTC
Permalink
Trailing / on the corbaloc looks wrong.
Check there's no newline on the end of the string - that seems to upset
omniorb



-----Original Message-----
From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com] On Behalf Of Jason
Stelzer
Sent: 16 August 2007 20:49
To: omniorb-***@omniorb-support.com
Subject: [omniORB] clarify url resolution


I'm working wth looking up/using remote objects. One of the first
things I need to do is lookup the remote name service. After that I
lookup remote objects to use.
I can lookup remote objects via IOR urls, but not corbaloc urls
(which I would prefer as they're more readable).

CosNaming::NamingContext_var _nc;
CORBA::Object_var nsobj = _orb->string_to_object(namingUrl);
_nc = CosNaming::NamingContext::_narrow(nsobj);

This works if namingUrl = "IOR:000......"
However if namingUrl = "corbaloc:iiop:***@hostname:3528/JBoss/Naming/
remote" I get an OBJECT_NOT_EXIST exception from corba.

Is my url incorrect? Is this only supported by certain corba
versions? Should I be calling something different for a url formatted
like the latter example? Using the IOR url will work, but its less
than ideal from a human readable perspective.


--
J.



_______________________________________________
omniORB-list mailing list
omniORB-***@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
--------------------------------------------------------

This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------
William Bauder
2007-08-17 02:11:17 UTC
Permalink
Try corbaloc::

-Bill

-----Original Message-----
From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com] On Behalf Of Jason
Stelzer
Sent: Thursday, August 16, 2007 3:49 PM
To: omniorb-***@omniorb-support.com
Subject: [omniORB] clarify url resolution


I'm working wth looking up/using remote objects. One of the first
things I need to do is lookup the remote name service. After that I
lookup remote objects to use.
I can lookup remote objects via IOR urls, but not corbaloc urls
(which I would prefer as they're more readable).

CosNaming::NamingContext_var _nc;
CORBA::Object_var nsobj = _orb->string_to_object(namingUrl);
_nc = CosNaming::NamingContext::_narrow(nsobj);

This works if namingUrl = "IOR:000......"
However if namingUrl = "corbaloc:iiop:***@hostname:3528/JBoss/Naming/
remote" I get an OBJECT_NOT_EXIST exception from corba.

Is my url incorrect? Is this only supported by certain corba
versions? Should I be calling something different for a url formatted
like the latter example? Using the IOR url will work, but its less
than ideal from a human readable perspective.


--
J.

Continue reading on narkive:
Loading...