[omniORB] problems with sequence based value types

William Bauder bill at simplified.biz
Wed Sep 12 15:33:46 BST 2007


I can't check it - I'm using 4.0 - but maybe it's not finding the the
CORBA:: types?  Do you have an older omniorb (or different orb) in the
INCLUDE?

Personally, I would get away from java/rmi to IDL tools.  It's a lot
less grief to write the IDL and generate the C++ and Java code from
that.

-Bill

-----Original Message-----
From: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Jason
Stelzer
Sent: Wednesday, September 12, 2007 1:22 PM
To: omniorb-list at omniorb-support.com
Subject: [omniORB] problems with sequence based value types


I'm working on a library that bridges calls from perl to a java app  
via corba. In the interest of reducing the spaghetti code effect, I'm  
creating interfaces in java that use basic types for return values.  
For example, when I was returning a result of type List<String>, the  
idl generated by rmic pulled in too much of the core java interfaces.  
I've since changed to returning String[] which then results in a  
single valuetype to use. This seems reasonable to me as all I'm  
really after is a list of strings.

However, this relatively simple idl doesn't generate stub code which  
compiles. Attached is the idl. When generating the stub code, I'm  
using omniORB 4.1.0. The compiler is gcc 3.4.6 on RHES 4. I've also  
tried using the same version of omniORB on a mac using gcc 4.0.1 with  
similar results. Am I making this more complex than I need to? Is  
there a more succinct way of expressing the interface? This seems  
like it should be a trivial valuetype. Am I just making some basic  
error in the idl? Thanks for any insights.


./seq1_WStringValue.hh:211: error: expected class-name before '{' token
./seq1_WStringValue.hh:225: error: expected `)' before "_max"
./seq1_WStringValue.hh:228: error: expected `)' before "_max"
./seq1_WStringValue.hh:259: error: ISO C++ forbids declaration of  
`ULong' with no type
./seq1_WStringValue.hh:259: error: invalid use of `::'
./seq1_WStringValue.hh:259: error: `ULong' declared as an `inline' field
./seq1_WStringValue.hh:259: error: expected `;' before "maximum"
./seq1_WStringValue.hh:262: error: expected `;' before "inline"
./seq1_WStringValue.hh:262: error: ISO C++ forbids declaration of  
`ULong' with no type
./seq1_WStringValue.hh:262: error: invalid use of `::'
./seq1_WStringValue.hh:262: error: `ULong' declared as an `inline' field
./seq1_WStringValue.hh:262: error: expected `;' before "length"
./seq1_WStringValue.hh:265: error: expected `;' before "inline"
./seq1_WStringValue.hh:265: error: `org::omg::boxedRMI::CORBA::ULong'  
has not been declared
./seq1_WStringValue.hh:265: error: ISO C++ forbids declaration of  
`_len' with no type
./seq1_WStringValue.hh:269: error: `org::omg::boxedRMI::CORBA::ULong'  
has not been declared
./seq1_WStringValue.hh:269: error: ISO C++ forbids declaration of  
`_i' with no type
./seq1_WStringValue.hh:275: error: expected `;' before '(' token
./seq1_WStringValue.hh:285: error: `_NP_repositoryId' declared as a  
`virtual' field
./seq1_WStringValue.hh:285: error: expected `;' before '(' token
./seq1_WStringValue.hh:289: error: ISO C++ forbids declaration of  
`Boolean' with no type
./seq1_WStringValue.hh:289: error: invalid use of `::'
./seq1_WStringValue.hh:289: error: `Boolean' declared as a `virtual'  
field
./seq1_WStringValue.hh:289: error: expected `;' before "_NP_custom"
./seq1_WStringValue.hh:290: error: ISO C++ forbids declaration of  
`Boolean' with no type
./seq1_WStringValue.hh:290: error: invalid use of `::'
./seq1_WStringValue.hh:290: error: `Boolean' declared as a `virtual'  
field
./seq1_WStringValue.hh:290: error: expected `;' before "_NP_box"
./seq1_WStringValue.hh: In copy constructor  
`org::omg::boxedRMI::CORBA::seq1_WStringValue::seq1_WStringValue 
(const org::omg::boxedRMI::CORBA::seq1_WStringValue&)':
./seq1_WStringValue.hh:222: error: class  
`org::omg::boxedRMI::CORBA::seq1_WStringValue' does not have any  
field named `ValueBase'
./seq1_WStringValue.hh:222: error: class  
`org::omg::boxedRMI::CORBA::seq1_WStringValue' does not have any  
field named `DefaultValueRefCountBase'


--
J.




More information about the omniORB-list mailing list