Archived

This forum has been archived. Please start a new discussion on GitHub.

IceGrid and J2Me

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

  • dwayne
    dwayne St. John's, Newfoundland
    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.
  • 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
    
                            
  • benoit
    benoit Rennes, France
    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.
  • Hi Benoit,
    do you mean the files contained in this directory as IceGrid Slice files? (look at the image attached)



    Thanks


    Alberto
  • benoit
    benoit Rennes, France
    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.
  • 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
  • benoit
    benoit Rennes, France
    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.
  • Thank you very much! :)

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

    :D:)