<span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">I have issue while consuming cobra services using the IOR as generated by the code below:</font></span><div>
<font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></span></font></div><div><span class="Apple-style-span" style="font-size: 12px; "><pre class="jive-pre" style="font-size: 12px; margin-top: 1em; margin-right: 2em; margin-bottom: 0.5em; margin-left: 2em; color: rgb(102, 102, 102); overflow-x: auto; overflow-y: auto; width: 650px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 1em; background-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 2px; border-top-color: rgb(238, 238, 238); border-right-color: rgb(238, 238, 238); border-bottom-color: rgb(238, 238, 238); border-left-color: rgb(204, 204, 204); border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; background-image: url(http://forums.sun.com/images/quote-background-1.gif); background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; ">
<code class="jive-code jive-java" style="font-size: 12px; color: rgb(102, 102, 102); "><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">public</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">static</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> String generateIOR(String ipAddress, String portNo)
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">throws</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> Exception </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
String ior = </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">""</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">;
DataInputStream data = </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">null</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">;
Process p = </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">null</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">;
String methodName = </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"generateIOR"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">;
String IOR_CMD = </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"genior IDL:DCM\\DeviceControl:1.0 "</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> + ipAddress +</font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">" "</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">+
portNo; </font><font color="darkgreen" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">// - Linux</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
System.out.println(</font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"Generating IOR Using:"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> + IOR_CMD);
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">try</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
Runtime r = Runtime.getRuntime();
p = r.exec(IOR_CMD);
data = </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">new</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> DataInputStream(p.getInputStream());
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">int</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> c;
StringBuffer buf = </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">new</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> StringBuffer();
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">while</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> ((c = data.read()) != -1) </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
buf.append((</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">char</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">) c);
</font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
ior = buf.toString();
</font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">catch</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> (Exception e) </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
System.out.println(e);
</font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">finally</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">if</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> (data != </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">null</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">)
data.close();
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">if</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> (p != </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">null</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">)
p.destroy();
</font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">return</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> ior;</font><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-size: 13px; white-space: normal; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font></span></code></pre>
</span><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font><span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Code which uses the above IOR to access the CORBA API</font></span></div>
<div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><pre class="jive-pre" style="font-size: 12px; margin-top: 1em; margin-right: 2em; margin-bottom: 0.5em; margin-left: 2em; color: rgb(102, 102, 102); overflow-x: auto; overflow-y: auto; width: 650px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 1em; background-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 2px; border-top-color: rgb(238, 238, 238); border-right-color: rgb(238, 238, 238); border-bottom-color: rgb(238, 238, 238); border-left-color: rgb(204, 204, 204); border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; background-image: url(http://forums.sun.com/images/quote-background-1.gif); background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; ">
<code class="jive-code jive-java" style="font-size: 12px; color: rgb(102, 102, 102); "><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">try</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
this.serverVO = serverVO;
String arg[] = </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"-ORBInitialHost"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">, serverVO.getServerIP(),
</font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"-ORBInitialPort"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">, </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"5003"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">,
</font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"-ORBGIOPVersion"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">, </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"1.1"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">;
orb = ORB.init(arg,</font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">null</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">);
obj = orb.string_to_object(serverVO.getDcmIOR().trim());
deviceControlImpl = DeviceControlHelper.narrow(obj);
</font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> </font><font color="navy" style="font-size: 12px !important; "><b><font class="Apple-style-span" face="'trebuchet ms', sans-serif">catch</font></b></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif"> (Exception e) </font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">{</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
System.out.println(e);
</font><font color="navy" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">}</font></font></code></pre></span></font></div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br>
</font></div><div><span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Exception message is given below:</font></span></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br>
</font></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><pre class="jive-pre" style="font-size: 12px; margin-top: 1em; margin-right: 2em; margin-bottom: 0.5em; margin-left: 2em; color: rgb(102, 102, 102); overflow-x: auto; overflow-y: auto; width: 650px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 1em; background-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 2px; border-top-color: rgb(238, 238, 238); border-right-color: rgb(238, 238, 238); border-bottom-color: rgb(238, 238, 238); border-left-color: rgb(204, 204, 204); border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; background-image: url(http://forums.sun.com/images/quote-background-1.gif); background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; ">
<code class="jive-code jive-java" style="font-size: 12px; color: rgb(102, 102, 102); "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">WARNING: </font><font color="red" style="font-size: 12px !important; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">"IOP00410210: (COMM_FAILURE) Received a GIOP MessageError, indicating header corruption or version mismatch"</font></font><font class="Apple-style-span" face="'trebuchet ms', sans-serif">
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 210 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.recvMsgError(ORBUtilSystemException.java:2456)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.recvMsgError(ORBUtilSystemException.java:2478)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:832)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1213)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:471)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:500)
Unable to connect to DCM Server null</b> with ip 172.26.64.62
Exception:org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 210 completed: Maybe
c</font></code></pre></span></font></div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></div><div><span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Quick help will be really appreciated. Thanks in advance</font></span></div>
<div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif">-- <br>Thanks & Regards<br>G. Shriram</font><br>
</div>