Corba入门程序调试C(2)通过IOR---omniORB

本文介绍了如何使用omniORB库进行Corba的入门程序调试,包括创建echo.idl接口定义,实现Server端的Echo_i类,以及Client端的调用过程。在Server端,激活对象并获取IOR,而在Client端,解析IOR并调用服务。
摘要由CSDN通过智能技术生成

echo.idl

//Source file: E:/CorbaProj/UML/T1/idl/Echo.idl

#ifndef __ECHO_DEFINED
#define __ECHO_DEFINED

/* CmIdentification
  %X% %Q% %Z% %W% */

module CorbaTest {
 
 interface Echo {
  /*
  @roseuid 4459B6B1038A */
  string echoString (
   in string mesg
   );
   
 };
 
};

#endif

#########################################################################

Server端

#include <iostream.h>
#include "echo.h"


// This is the object implementation.

class Echo_i : public POA_Echo,
        public PortableServer::RefCountServantBase
{
public:
  inline Echo_i() {}
  virtual ~Echo_i() {}
  virtual char* echoString(const char* mesg);
};


char* Echo_i::echoString(const char* mesg)
{
 
  return CORBA::string_dup("fffffffffffffffff

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值