Object-Array

susanneschsusannesch Member Susanne SchillingOrganization: HydrometerProject: accessing an OSGI Framework from C++ ✭✭
I'm trying to define an Object-Array in Slice like this:

sequence<Object> TourObject;

But that doesn't seem to work. Is there a possibility to define something like this? Untill now, I was just able to define sequences with basic types.

Thanks, Susanne

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Susanne,

    Can you be more specific about what isn't working? The Slice snippet you quoted is legal, so without more information it will be difficult for us to help you.

    Regards,
    Mark
  • susanneschsusannesch Member Susanne SchillingOrganization: HydrometerProject: accessing an OSGI Framework from C++ ✭✭
    Inside my Ice-File, I have defined the following:

    module ApplicationLayer {
    ["java:type:java.util.LinkedList<Object>"]
    sequence<Object> TourObject;
    interface ApplicationLayerFunctions {
    string getMeteringPoint(string x);
    TourObject TourReading();
    };
    };

    I get an Error when I try to use slice2javae (IceEJ 1.2.0) saying: Tourobject cannot contain object-Values. I just want to generate a List that can contain Objects.
    I also tried:

    ["java:type:java.util.LinkedList"]
    sequence<Object> TourObject;

    But I get the same error.
  • susanneschsusannesch Member Susanne SchillingOrganization: HydrometerProject: accessing an OSGI Framework from C++ ✭✭
    when I use the slice2cppe-translator, everything works fine.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Ice-E 1.2 did not support objects-by-value. Ice-E 1.3 does. Unfortunately, Ice-E 1.3 no longer supports Java. However, why are you using Ice-E for java? Do you need the J2ME support? If not, you can use Ice 3.3.1 for the java side, as Ice-E and Ice and fully wire compatible.
Sign In or Register to comment.