[omniORB] [Bulk] Removing special characters in corbaloc references

Rob Ratcliff rrr6399 at futuretek.com
Sun May 3 22:47:07 BST 2015


Looks like OmniORB uses 0xff as the delimiter between POA names:
http://sourceforge.net/p/omniorb/svn/HEAD/tree/trunk/omniORB/src/lib/omniORB/orbcore/poa.cc#l77
which escapes to %FF by JacORB's IOR decoder. (likely based on the URI
escaping rules in
https://www.ietf.org/rfc/rfc2396.txt)

I haven't verified it yet, but its likely that the %00 comes from a null
terminated POA path.

According to this article:
http://www.ciaranmchale.com/corba-explained-simply/the-corbaloc-and-corbaname-urls.html
there doesn't seem to be a standard way of naming the objects and
recommends using the Naming Service, which I may end up doing even
though its kind of overkill for what I need. Its unfortunate that one
can't just specify a simple path comparable to REST services.

So, it doesn't look like its straight forward to create a simple "/"
delimitted path name to an object without requiring the %ff and %00
delimiters right now.


On 5/1/2015 3:50 PM, Rob Ratcliff wrote:
> If I use "RootPOA", and delimit the POA and servant name with "/"s, I
> get corbaloc by running the stringified IOR through JacORB's PrintIOR
> method,
> org.jacorb.orb.util.PrintIOR.printCorbalocIOR(orb, ior):
>
> corbaloc:iiop:1.2 at 192.168.1.117:1101/%FF/bidir/%00/MyServer
>
> OmniORB's catior get this string:
>  "\xff/bidir/\x00/MyServer"
>
> Where are the xff and x00 characters coming from? Is there a setting or
> configuration parameter that would eliminate these?
>
> Thanks,
>
> Rob
>
>
> On 5/1/2015 9:24 AM, Rob Ratcliff wrote:
>> Hi,
>>
>> I have a simple OmniORBpy service that I'd like to access by simple
>> corbaloc string such as: corbaloc:iiop:1.2 at hostname:1234/MyServer";
>>  
>> I was able to do this using the special omniINSPOA poa accessed like this:
>>
>>     persistentPoa = orb.resolve_initial_references("omniINSPOA")
>>
>>     persistentPoa._get_the_POAManager().activate()
>>
>>     servant = MyServer(serverId)
>>
>>     persistentPoa.activate_object_with_id("MyServer", servant)
>>     server = persistantPoa.servant_to_reference(servant)
>>  
>> Things got more complicated once I wanted the service to accept a
>> callback object using bidirectional GIOP:
>>
>>     persistentPoa = orb.resolve_initial_references("omniINSPOA")
>>
>>     persistentPoa._get_the_POAManager().activate()
>>
>>     poa = persistentPoa
>>     policies = [poa.create_id_assignment_policy(PortableServer.USER_ID),
>>         poa.create_servant_retention_policy(PortableServer.RETAIN),
>>        
>> poa.create_request_processing_policy(PortableServer.USE_SERVANT_MANAGER),
>>         poa.create_lifespan_policy(PortableServer.PERSISTENT),
>>         BiDirPolicy.BidirectionalPolicy(BiDirPolicy.BOTH)]
>>     poa =
>> persistentPoa.create_POA("bidir",persistentPoa._get_the_POAManager(),policies)
>>
>>     servant = MyServer(serverId)
>>
>>     poa.activate_object_with_id("MyServer",servant)
>>     server = poa.servant_to_reference(servant)
>>     ior = orb.object_to_string(server)
>>     print ior
>>
>>     os.system("catior " + ior)
>>
>> I get this complicated string:
>>
>> "\xffomniINSPOA\xffbidir\x00MyServer"
>>
>> I access this from JacORB using:
>>     ior = "corbaloc:iiop:1.2@" + hostname + ":" + this.port +
>> "/%FFomniINSPOA%FFbidir%00MyServer";
>>
>> Is there a way to get rid of the %FF and %00 characters to simplify the
>> URL? (I'm OK with the POA  name showing up in the URL.)
>>
>> I imagine I could work around this by adding a "createSession()" method
>> in the original service that used the bidirectional GIOP enabled POA,
>> but wanted to see if there was a way to do it with my original interface.
>>
>> BTW, can bidirectional GIOP be enabled for the RootPOA or the omniINSPOA?
>>
>> Thanks,
>>
>> Rob
>>
>>
>> _______________________________________________
>> omniORB-list mailing list
>> omniORB-list at omniorb-support.com
>> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>>


-- 
Rob Ratcliff
FutureTek Software Consulting
We get it done.
cell: 512-633-5751
fax: 512-233-2873
web: http://www.futuretek.com
LinkedIn: https://www.linkedin.com/in/ratcliff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20150503/a15744e0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftek-software-consulting-512.png
Type: image/png
Size: 24361 bytes
Desc: not available
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20150503/a15744e0/attachment-0001.png>


More information about the omniORB-list mailing list