[omniORB] Unable to get application to communicate to an IOR generated by OrbixWeb 3.1 update1

Keith Olivares keith@javtech.com
Thu, 15 Apr 1999 16:39:22 -0400


Greetings:

I am having troubles with my application(which uses omniORB 2.71 under Winnt
4 SP4 and VC++ 6) trying to communicate to another program through an
IOR.str file generated by OrbixWeb 3.1 Update 1.  My program reads the
IOR.str file generated by the other application, tries to connect and send
data to it.

The application seems to connect.  But unfortunately, I get an exception
when trying to retrieve/send data:

Exception! - 0x0012F7D4

Below is part of my code that reads the IOR.str file, tries to connect and
sends data:

	CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv, "omniORB2");
	CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA");

	CoppeliaServer_var remote_obj;

	timestamp("Looking up server:");

 	FILE * ior_file = fopen("CoppeliaIOR.str", "rb");

	if (ior_file==NULL) {
		timestamp("Couldn't find CoppeliaIOR.str file"); //the IOR.str file
generated via OrbixWeb 3.1
		return;
	}

	char ior_string[300];
	if (fgets(ior_string, 299, ior_file)==NULL) {
		timestamp("Couldn't read CoppeliaIOR.str file");
		return;
	}
	try {
//		remote_obj =
CoppeliaServer::_narrow(CORBA::Orbix.string_to_object(ior_string));
		CORBA::Object_var obj = orb->string_to_object(ior_string);
		remote_obj = CoppeliaServer::_narrow(obj);


	}
	catch (CORBA::COMM_FAILURE& ex) {
		cerr<<"Caught system exception COMM_FAILURE, unable to contact the "
			<<"object."<< endl;
	}
	catch (omniORB::fatalException& ex) {
		cerr << "Caught omniORB2 fatalException."<<endl;
	}
	catch(...) {
		cerr<<"Caught a system exception."<<endl;
		exit(1);
	}
	if (CORBA::is_nil(remote_obj)) {
		timestamp("Exception during bind");
		return;
	}
    timestamp("Starting loop");

    int rc;
    CPeekType * prc;

	for (int k=0; k<50; k++) {
		printf("Going to peekAll\n");

        try {
            prc = remote_obj->peekAll();
        }
		catch (CORBA::SystemException& se) {
			cerr << "Exception! - " << &se << endl;
			exit(0);

If anyone can help me out with this or give me more insight regarding
interoperabiluty between omniORB 2.7.1 and Iona OrbixWeb 3.1, I would be
most grateful.  Thank you very much.

Regards,

Keith Olivares
------------------------------------
Keith Joseph B. Olivares
Javelin Technologies, Inc.
11 Broadway Suite 1031
New York, NY 10004
Tel: 212-422-6000 x.19
Fax: 212-422-9795
http://javtech.com