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