[omniORB] interoperability of DII requests

Jason Stelzer jstelzer at healthmarketscience.com
Fri Jul 6 13:58:18 BST 2007


Hello, this is probably a self inflicted problem as I'm very new to  
corba. But, there doesn't seem to be many good places to look for  
examples that apply to what I'm doing.

Currently I'm working on getting an older application of ours to talk  
to our newer ejb servers via corba. We're using java 1.5 on the  
server side with jboss 4.0.5GA. On the client side, I'm using omniorb  
4.1.0. At this point I've puzzled out how to get ejb3 beans  
registered with jacorb in jboss. So, at this point I can look up the  
remote interface to an ejb3 bean in the orb.

I can connect to the jboss server and lookup the remote name service  
on the C++ side.

I can lookup objects and create requests. However, I believe I'm  
either putting the request together wrong or need to declare things  
slightly differently.

The bean I'm talking to is a glorified hello world bean. It takes a  
string as an argument and returns a different string. The method  
never gets invoked. It looks like things are dying during the corba  
marshalling of input. All I see in the jboss log is:

12:12:40,052 ERROR  sys : [STDERR] org.omg.CORBA.MARSHAL: unknown  
value tag: 0x6 (offset=0x88)  vmcid: 0x0  minor code: 0  completed: No
12:12:40,052 ERROR  sys : [STDERR]      at  
org.jacorb.orb.CDRInputStream.read_value(CDRInputStream.java:2446)
12:12:40,053 ERROR  sys : [STDERR]      at  
org.jboss.iiop.rmi.marshal.CDRStream$StringReader.read(CDRStream.java: 
578)
12:12:40,053 ERROR  sys : [STDERR]      at  
org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy.readParams 
(SkeletonStrategy.java:128)
12:12:40,053 ERROR  sys : [STDERR]      at  
org.jboss.ejb3.iiop.BeanCorbaServant._invoke(BeanCorbaServant.java:193)
12:12:40,054 ERROR  sys : [STDERR]      at  
org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java: 
297)
12:12:40,054 ERROR  sys : [STDERR]      at  
org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:596)
12:12:40,054 ERROR  sys : [STDERR]      at  
org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:739)
12:12:40,054 INFO   sys : [controller] rid: 4 opname: echoString  
invocation: system exception was thrown (org.omg.CORBA.MARSHAL:  
unknown value tag: 0x6 (offset=0x88)  vmcid: 0x0  minor code: 0   
completed: No)

Assuming I've looked up the right object, does this seem like a  
reasonable way to call a remote method as I've described on the C++  
side? Appologies if this comes through mangled.


   CORBA::String_var arg = (const char*)"Echo!";
   CORBA::Request_var req = obj->_request("echoString");
   req->add_in_arg() <<= arg;
   req->set_return_type(CORBA::_tc_wstring);
   req->invoke();
   if( req->env()->exception() ) {
        CORBA::Exception *excP = req->env()->exception();
       cout << "echo_diiclt: An exception was thrown! " << excP->_name 
()  << endl;
       return;
   }
const char* ret;
req->return_value() >>= ret;
cout << "I said, \"" << (char*)arg << "\"." << endl
     << "The Echo object replied, \"" << ret <<"\"." << endl;


Also, as an asside, I've been using a cfg file on the commandline  
with a InitRef set for the name service. How do I do this on the  
commandline? For now, in addition to things like trace level, I'm  
setting "InitRef= NameService=corbaloc::1.2 at jstelzer- 
lin.ws.hmsonline.com:3528/JBoss/Naming/root " inside the config file  
I specify via  -ORBconfigFile  on the commandline.

--
J.





More information about the omniORB-list mailing list