[omniORB] [Bulk] Removing special characters in corbaloc references
Rob Ratcliff
rrr6399 at futuretek.com
Fri May 1 21:50:32 BST 2015
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
>
More information about the omniORB-list
mailing list