2

I am debugging the server part of Corba code, I decoded the IOR generated, but the ip is not getting changed, when I change in orb_init(). Below is my piece of code:

String[] args = new String[4];
            args[0] = "-ORBInitialPort";
            args[1] = "69455";
            args[2] = "-ORBInitialHost";
            args[3] = "127.0.0.1"; 
orb = org.omg.CORBA.ORB.init(args,null);
org.omg.CORBA.Object objPoa = orb.resolve_initial_references("RootPOA");
rootPOA = org.omg.PortableServer.POAHelper.narrow(objPoa);
org.omg.CORBA.Object obj = ((org.omg.PortableServer.Servant)this)._this_object(orb);
String1  = orb.object_to_string(obj);
java.io.FileOutputStream File = new java.io.FileOutputStream(IORFile);
java.io.PrintStream pfile=new java.io.PrintStream(File);
pfile.println(String1);

Everytime I change the IP in :

args[2] = "-ORBInitialHost";
args[3] = "127.0.0.1";

its printing the same ip and port(3.222.123.22), below is the decoded ior contents:

_IIOP_ParseCDR:  byte order BigEndian, repository id <IDL:CfiSii:1.0>, 1 profile
_IIOP_ParseCDR:  profile 1 is 96 bytes, tag 0 (INTERNET), BigEndian byte order
(iiop.c:parse_IIOP_Profile):  bo=BigEndian, version=1.2, hostname=3.222.123.22, port=49630, object_key=<.OO.qU..W...POA.9...>
(iiop.c:parse_IIOP_Profile):  encoded object key is <%00OO%01qU%83%1CW%01%00%00POA%FE9%A4%AF%98>
(iiop.c:parse_IIOP_Profile):  non-native cinfo is <iiop_1_2_1_%2500OO%2501qU%2583%251CW%2501%2500%2500POA%25FE9%25A4%25AF%2598@tcp_3.222.123.22_49630>
object key is <#00OO#01qU#83#1CW#01#00#00POA#FE9#A4#AF#98>;
 no trustworthy most-specific-type info; unrecognized ORB type;
 reachable with IIOP 1.2 at host "3.222.123.22", port 49630

Can someone please help me what I am missing or what I need to do so as to incorporate the updated IP in IOR.

Thanks.

tuergeist
  • 9,171
  • 3
  • 37
  • 58
coder
  • 109
  • 5
  • try java `ORBServerHost` as property, as in http://stackoverflow.com/questions/12938439/corba-orb-runtime-define-local-ip-interface-usage – tuergeist Sep 22 '16 at 04:14

0 Answers0