Archived

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

IcePack Question

xdm
xdm La Coruña, Spain
Helow

I have icepack runing on a linux server whith and ice service

it is posible access to this service from windows clients?

Comments

  • mes
    mes California
    Yes, you can use IcePack from Windows clients, but you currently cannot run IcePack servers on Windows platforms.

    Take care,
    - Mark
  • xdm
    xdm La Coruña, Spain
    My linux clients use this code to adquire a proxy to TiendaService
    Ice::PropertiesPtr properties = communicator()->getProperties();
    	IcePack::QueryPrx query=IcePack::QueryPrx::checkedCast(communicator()->stringToProxy("IcePack/Query"));
    	ClienteAdmin::tienda= TiendaRezAdminPrx::checkedCast(query->findObjectByType("::TiendaRez"));
    

    but this don't compile in windows because the header file IcePack/Query.h is missing


    Then I try in windows creating a proxy from comunicator
       Ice::PropertiesPtr properties = communicator()->getProperties();
       const char* proxyProperty = "Tienda.Proxy";
       std::string proxy = properties->getProperty(proxyProperty);
       Ice::ObjectPrx object= communicator()->stringToProxy(proxy);
       tienda=TiendaRezAdminPrx::uncheckedCast(object);
    

    but the client throw a exception Ice::ObjectNotExist

    I set Tienda.Proxy in config file
    Tienda.Proxy=tienda/tienda:tcp -h Mydomain.com -p 12000
    

    And I create The Object tienda/tienda in server with the next code:
    Ice::Identity idTienda=Ice::stringToIdentity("tienda");
    idTienda.category="tienda";
    if (!TiendaRezI::_evictor->hasObject(idTienda))
    {
                    TiendaRezIPtr tienda=new TiendaRezI();
    	TiendaRezI::_evictor->createObject(idTienda,tienda);
    }
    

    can you said me what is wrong

    Thanks for all
  • mes
    mes California
    Originally posted by xdm
    but this don't compile in windows because the header file IcePack/Query.h is missing
    Yes, this will be corrected in the next release. Meanwhile, you can download the project file I provided in this thread if you want to build the IcePack client library on Windows.
    I set Tienda.Proxy in config file
    Tienda.Proxy=tienda/tienda:tcp -h Mydomain.com -p 12000
    
    Is that the endpoint of your server, or is that an IcePack endpoint?

    - Mark
  • xdm
    xdm La Coruña, Spain
    the end point is of IcePack
  • mes
    mes California
    Originally posted by xdm
    the end point is of IcePack
    If you want to use indirect binding with IcePack, then your proxy needs to have one of the indirect forms (such as tienda/tienda for a well-known object, or tienda/tienda@TiendaAdapter, etc.).

    The example proxy you used above is a direct proxy that points to the IcePack endpoint, but there is no object with identity tienda/tienda at that endpoint, and therefore Ice::ObjectNotExistException is raised.

    See the IcePack chapter in the manual for more information on indirect proxies.

    Take care,
    - Mark