Hi,
I Use 1.9.3 to Connect corbaloc::61.144.253.81:10000/NameService.
It run ok in Java Client,but when i use .Net client ,i meet problem as below:
CORBA system exception : omg.org.CORBA.TRANSIENT [Unable to connect to target.] , completed: Completed_No minor: 4000.
My Codes :
IiopClientChannel channel = new IiopClientChannel();
ChannelServices.RegisterChannel(channel, false);
string ior = "IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E300000000000020000000000000074000102000000000E36312E3134342E3235332E38310027100000001F5374616E646172644E532F4E616D655365727665722D504F412F5F726F6F740000000002000000000";
ior+="0000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001";
NamingContext nameService = (NamingContext)RemotingServices.Connect(typeof(NamingContext), ior);
NameComponent[] name = new NameComponent[] { new NameComponent("MZYL", "Service") };
string yljgbm = textBox1.Text; // "H0920";
string ylzh = textBox2.Text; // "%*******";
string pass = textBox3.Text;
string czybm = textBox4.Text;
string czy = textBox5.Text;
short[] czyxm = transfromSA(czy);
hi.GRXX hr;
intMZ mz = (intMZ)nameService.resolve(name);
short[] res = mz.GetGRJBXX(yljgbm, ylzh, pass, czybm, czyxm, out hr);
Resolve is ok. GetGRJBXX function throw errors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A random guess: the intMZ service has multiple ip endpoints (e.g. the
external ip and localhost). The Java client can choose the accessible one,
but iiopnet can't (it always chooses the first one). A possible solution:
make your custom service only listen on one endpoint.
Thanks a lots.But Corba Server is given by Goverment Department ,so i can't change it.
But Java can run correctly with "corbaloc::61.144.253.81:10000/NameService".
I try to capture Network Data Package,find Java And IIOP is same before NameContextExt.Resolve_Str.After this code run,difference comes.
I upload two files: hi.idl,jacorb.ior. Can you try it?Thanks a lot.
attachments is NetData from Java and IIOP.
Java can run correctly.But when IIOP finishes resolve_str,it close connection,and getState meets Error:
CORBA system exception : omg.org.CORBA.TRANSIENT [Unable to connect to
target.] , completed: Completed_No minor: 4000.
You can see GIOPReply,192.168.1.61 maybe the internal ip of Corba Server.
If you don't have control over the server, then you could try to add a
limited support for multiple endpoints in IORs. IIUC, this is represented
as multiple profiles in IOR (see IIOPNet/IIOPChannel/IOR.cs, Ior.Profiles,
Ior.FindInternetIiopProfile()). But that's rather involved and you would
probably need to reference to the CORBA specification ( http://www.omg.org/spec/CORBA/3.3/) to get things right.
attachments is NetData from Java and IIOP.
Java can run correctly.But when IIOP finishes resolve_str,it close
connection,and getState meets Error:
CORBA system exception : omg.org.CORBA.TRANSIENT [Unable to connect to
target.] , completed: Completed_No minor: 4000.
You can see GIOPReply,192.168.1.61 maybe the internal ip of Corba Server.
Hi,
I Use 1.9.3 to Connect corbaloc::61.144.253.81:10000/NameService.
It run ok in Java Client,but when i use .Net client ,i meet problem as below:
CORBA system exception : omg.org.CORBA.TRANSIENT [Unable to connect to target.] , completed: Completed_No minor: 4000.
My Codes :
IiopClientChannel channel = new IiopClientChannel();
ChannelServices.RegisterChannel(channel, false);
string ior = "IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E300000000000020000000000000074000102000000000E36312E3134342E3235332E38310027100000001F5374616E646172644E532F4E616D655365727665722D504F412F5F726F6F740000000002000000000";
ior+="0000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001";
NamingContext nameService = (NamingContext)RemotingServices.Connect(typeof(NamingContext), ior);
NameComponent[] name = new NameComponent[] { new NameComponent("MZYL", "Service") };
string yljgbm = textBox1.Text; // "H0920";
string ylzh = textBox2.Text; // "%*******";
string pass = textBox3.Text;
string czybm = textBox4.Text;
string czy = textBox5.Text;
short[] czyxm = transfromSA(czy);
hi.GRXX hr;
intMZ mz = (intMZ)nameService.resolve(name);
Resolve is ok. GetGRJBXX function throw errors.
A random guess: the intMZ service has multiple ip endpoints (e.g. the
external ip and localhost). The Java client can choose the accessible one,
but iiopnet can't (it always chooses the first one). A possible solution:
make your custom service only listen on one endpoint.
On Oct 31, 2016 8:35 AM, "zhangdunming" zhangdunming@users.sf.net wrote:
Thanks a lots.But Corba Server is given by Goverment Department ,so i can't change it.
But Java can run correctly with "corbaloc::61.144.253.81:10000/NameService".
I try to capture Network Data Package,find Java And IIOP is same before NameContextExt.Resolve_Str.After this code run,difference comes.
I upload two files: hi.idl,jacorb.ior. Can you try it?Thanks a lot.
attachments is NetData from Java and IIOP.
Java can run correctly.But when IIOP finishes resolve_str,it close connection,and getState meets Error:
CORBA system exception : omg.org.CORBA.TRANSIENT [Unable to connect to
target.] , completed: Completed_No minor: 4000.
You can see GIOPReply,192.168.1.61 maybe the internal ip of Corba Server.
If you don't have control over the server, then you could try to add a
limited support for multiple endpoints in IORs. IIUC, this is represented
as multiple profiles in IOR (see IIOPNet/IIOPChannel/IOR.cs, Ior.Profiles,
Ior.FindInternetIiopProfile()). But that's rather involved and you would
probably need to reference to the CORBA specification (
http://www.omg.org/spec/CORBA/3.3/) to get things right.
On Tue, Nov 1, 2016 at 8:31 AM, zhangdunming zhangdunming@users.sf.net
wrote: