I have just downloaded mico and it looks very promising. I want to be able to connect a C++ client to an EJB service in a J2EE engine, and I am porting a client from using orbacus to mico. It goes well, until the client attempts to invoke the EJB object.

Here is a synopsis of the code and how the C++ client is put together:

CODE:
  CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
const char* ejb_url = "corbaname:iiop:myJ2EEhost:53007#me.com/CFV3/MyBean";
  CORBA::Object_var object = orb -> string_to_object (ejb_url);
  EJBAppHome_var callbackHome = EJBAppHome::_narrow(object);
  EJBApp_var callback = callbackHome -> create();
  try{
                callback->someEJBAppMethod();
  }catch(const CORBA::Exception& ex){
     cout << "EXCEPTION CAUGHT!" << endl;
        ex._print( cout );
        cout << endl;
     return 0;
  }

RUNTIME:
EXCEPTION CAUGHT!
IDL:omg.org/CORBA/UNKNOWN:1.0 (0, not-completed)

COMPILE + LINK:

// To produce C++ stubs:

idl *.idl

// To produce C++ object code:

g++ -c -g -I. -I../installation/include *.cpp

// To produce executable:

g++ -I. -I../mico/installation/include -g -fPIC -Wall -Wno-format-y2k -L. -L../mico/installation/lib -o client *.o ./java/lang/*.o ./javax/ejb/*.o ./cfejbV3/iiop/*.o -lmico2.3.12 -lpthread -ldl

I am not running any mico services, in fact I want to be able to run the client without having any mico runtime services running.

I am using the bare minimum compile and link flags. I have tried passing the -ORBNoIIOPServer flag but with the same result.

Is this a known problem or am I missing something? Any help would be greatly appreciated.

Thanks,
Colm.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel

Reply via email to