Jason Stelzer
2007-09-12 23:22:09 UTC
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seq1_WStringValue.idl
Type: application/octet-stream
Size: 508 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070912/167f9dfc/seq1_WStringValue.obj
-------------- next part --------------
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seq1_WStringValue.idl
Type: application/octet-stream
Size: 508 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070912/167f9dfc/seq1_WStringValue.obj
-------------- next part --------------