Home Help Center

IceGrid and J2Me

albertodsalbertods Member Alberto Della SantinaOrganization: University of Pisa - department of IT EngineeringProject: Mobile remote controller ✭✭
Hi all,
I have a simple and quick question:
can I use the IceGrid service with a j2me client?


I need to add a location service to my "simple" application, and I thought that IceGrid would have been the perfect choice.... but I have some doubts as far as the j2me implementation is concerned.



Regards


Alberto

Comments

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    Ice-E should not have any problems using IceGrid as it's location service. The Ice.Default.Locator property just needs to be set appropriately to point at the IceGrid service.
  • albertodsalbertods Member Alberto Della SantinaOrganization: University of Pisa - department of IT EngineeringProject: Mobile remote controller ✭✭
    Good morning Dwayne,
    thanks for your reply!

    My question arises from the error I get when I instantiate this object:
    IceGrid.QueryPrx query
    
    because IceGrid it's not defined in the IceE.jar package (j2me).


    I started from the client version of the IceGrid "Simple" example.



    Thanks in advance


    Cheers


    Alberto
    
    
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Yes, Ice-E for Java doesn't include the proxy code for Ice services. However, you should be able to generate it by translating the IceGrid Slice files you need with the slice2javae translator.

    Cheers,
    Benoit.
  • albertodsalbertods Member Alberto Della SantinaOrganization: University of Pisa - department of IT EngineeringProject: Mobile remote controller ✭✭
    Hi Benoit,
    do you mean the files contained in this directory as IceGrid Slice files? (look at the image attached)



    Thanks


    Alberto
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Yes, that's I mean. If you only need to access the IceGrid::Query interface, you can just translate the Query.ice file.

    Cheers,
    Benoit.
  • albertodsalbertods Member Alberto Della SantinaOrganization: University of Pisa - department of IT EngineeringProject: Mobile remote controller ✭✭
    I beg your pardon, Benoit, but I get this error (image attached).


    ...and I cannot figure what the cause could be.

    I follow the instructions shown in this thread
    in which Dwayne suggested how to compile the silce sources.



    Alberto
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    This error is caused by the definition of Ice::ObjectSeq in Ice/BuiltinSequences.ice. The slice2javae doesn't support sequence of Slice classes (I'm not sure exactly why -- I'll raise this question internally).

    For now, just comment out line 41 in BuiltinSequences.ice and it should compile.

    Cheers,
    Benoit.
  • albertodsalbertods Member Alberto Della SantinaOrganization: University of Pisa - department of IT EngineeringProject: Mobile remote controller ✭✭
    Thank you very much! :)

    The compilation succeeds, and in my j2me projects the type IceGrid.QueryPrx is properly recognized.

    :D:)
Sign In or Register to comment.