IIOP.NET与CORBA相关问题

lt_xs 2014-04-21 04:42:18




string host = "localhost";

int port = 1177;

// 建立并注册IIOP通道,与服务器corba进行通信
IiopClientChannel channel = new IiopClientChannel();
ChannelServices.RegisterChannel(channel,false);
//本地corba初始化
CorbaInit init = CorbaInit.GetInit();
NamingContext nameService = init.GetNameService(host, port);

//根据对象绑定的服务名获取远程对象
NameComponent[] nameMz = new NameComponent[] { new NameComponent("test", "") };

intTest mz = (intTest)nameService.resolve(nameMz);--到这里就提示异常了

Console.WriteLine();


}
catch (Exception ex)
{
Console.WriteLine("exception: " + ex);
}

C#调用异常:
CORBA system exception : omg.org.CORBA.TRANSIENT [Unable to connect to target.] , completed: Completed_No minor: 4000
...全文
104 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

110,569

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧