[omniORB] Question about omniORB and JDK-ORB
Wei Chen
chenwei624 at yahoo.com
Fri Aug 22 07:53:43 BST 2003
Hi,
I've asked the similar question last time. But I've
tryed again and no successe. Fowllowing is the client
program written C/C++. As I try to connect htis to the
server written Java and running on a Sun-Java-ORB, I
got the follwoing error message:
++++++++++++++
F:\Admin\GZS\White Label\IVRTest>ivrdummyc
IOR=
IOR:000000000000001549444c3a4956522f49565244756d6d793a312e30000000000000000
10000000000000054000101000000000a3132372e302e302e3100040700000019afabcaff0000000
2b68463c800000008000000000000000001000000000000010000000100000014000000000001002
0000000000001010000000000
Create and Initialize the ORB
Register the Object to ORB
Get the context
omniORB: From endpoint: giop:tcp:127.0.0.1:1031.
Detected GIOP 1.1 protocol erro
r in input message. Connection is closed.
Caught system exception COMM_FAILURE -- unable to
contact the object.
+++++++++++++++
Wo can tell me what's wrong here? Can someone tell me
how to use the trace?
Regards
Wei
P.S. source code for the client:
**********************
#include <iostream.h>
#include <stdio.h>
#include "IVRDummy.hh"
// This is the object implementation.
int main(int argc, char** argv)
{
FILE* ifp;
char filebuffer[1024];
char* cp;
try
{
ifp = fopen("C:\\TEMP\\ivr.ref", "r");
if (ifp == NULL)
{
fprintf(stderr, "%s: cannot read IOR from ivr.ref\n",
argv[0]);
return 1;
}
fgets(filebuffer, 1024, ifp);
cp = strpbrk(filebuffer, "\r\n");
if (cp != NULL)
{
*cp = '\0';
}
cout<<"IOR= "<<filebuffer<<endl;
cout<<"Create and Initialize the ORB"<<endl;
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv,
"omniORB4");
cout<<"Register the Object to ORB"<<endl;
CORBA::Object_var obj =
orb->string_to_object(filebuffer);
IVR::IVRDummy_ptr echoref =
IVR::IVRDummy::_narrow(obj);
if (CORBA::is_nil(echoref))
{
cerr << "Nil World reference" << endl;
return 1;
}
const char* message;
if(argc == 3)
message = argv[2];
else
message = "user.home";
cout<<"Get the context"<<endl;
CORBA::String_var dest =
echoref->vpAutorisierung(message);
cout << (char*)message <<"="<<(char*)dest<<endl;
orb->destroy();
}
catch(CORBA::COMM_FAILURE& ex) {
cerr << "Caught system exception COMM_FAILURE --
unable to contact the "
<< "object." << endl;
}
catch(CORBA::SystemException& se) {
cerr << "Caught CORBA::SystemException." << endl;
}
catch(CORBA::Exception&) {
cerr << "Caught CORBA::Exception." << endl;
}
catch(omniORB::fatalException& fe) {
cerr << "Caught omniORB::fatalException:" << endl;
cerr << " file: " << fe.file() << endl;
cerr << " line: " << fe.line() << endl;
cerr << " mesg: " << fe.errmsg() << endl;
}
catch(...)
{
cerr << "Caught unknown exception." << endl;
}
return 0;
}
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the omniORB-list
mailing list