I've got a Client who needs to send a UDP packet to a server and the only reference he has to the Server is through the CORBA naming service (IOR). I know the IOR has the Server Information embedded but is there an easy way for me to extract it?
This is the code I have so far:
Object objRef = orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
Object o = ncRef.resolve_str(Name);
After this Object o contains the IOR (if I do o.toString() it sure looks like a valid IOR), so from this what can I do to get the corresponding Servers IP/PORT so I can send it a UDP packet?
I know this sounds odd - why not just invoke the remote method, well this is for a school project and the professor recommended simply storing another table with all the sever information - but I am trying to be creative and since I was reading about the IOR I thought maybe I could do something with it ...
Any help would be much appreciated. Thanks,