Archived

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

Adding ProxyToString to ObjectPrx

hi,

in some cases it would make live a little bit easier if the operation
proxyToString would be part of the proxy object.

currently we need to pass the proxy and the communicator instances to
the class were we want to call the operation.

or we access the communicator via:
p.ice_connection().getAdapter().getCommunicator().proxyToString( p )

but this is bit messy and only works on server side.

let me know if there is any other way to achive this.

thx tom

Comments

  • If this is happening as part of an operation implementation, you can get at the communicator via the Ice::Current parameter:
    current->adapter->getCommunicator
    

    Would that fix your problem?

    Cheers,

    Michi.
  • hi michi,

    thanks for your reply!

    as always my writings contain too little information - sorry.

    i was talking about the client side.

    thx tom
  • I'll discuss this with me collegues to see whether there is something we can improve.

    Cheers,

    Michi.
  • Hi, just a little note about this:

    In Python, I found very useful for debugging purposes write something like:

    proxy = self.communicator().stringToProxy("mec:...")
    print proxy

    For sure, it would be very well have something like that in C++ :)

    Regards
    Mario
  • The next major release of Ice will provide an ice_toString() method on proxies. That way, you can stringify a proxy without having to have a communicator.

    Cheers,

    Michi.
  • hi michi,

    thats really cool!

    thanks alot!

    cu tom