Hi,
I don't know if this is a bug or maybe a I have missed something but:
I declared a method-less class:
I use this class as a input parameter to method changeEmail:Code:class EmailAddressIce { string emailAddress; string displayName; };
I invocated the method changeEmailAddress from php with an object as an argument and on my java server I got this exception:Code:interface IdentityIce { // ............ EmailAddressChangeRequestIce* changeEmailAddress(EmailAddressIce emailAddress); // ............ }
In chapter 10.14.4 one can read:Code:26.09.08 10:08:23:218 warning: Ice.ThreadPool.Server-0: dispatch exception: identity: pl.posterus.posso.core.Identity/faf68534-df80-40d6-9fb5-9954735dbff3:9 facet: operation: changeEmailAddress Ice.NoObjectFactoryException reason = "" type = "::interfacesice::EmailAddressIce" at IceInternal.BasicStream.readObject(BasicStream.java:1418) at IceInternal.BasicStream.readPendingObjects(BasicStream.java:1632) at pl.posterus.posso.interfacesice._IdentityIceDisp.___changeEmailAddress(_IdentityIceDisp.java:328) at pl.posterus.posso.interfacesice._IdentityIceDisp.__dispatch(_IdentityIceDisp.java:487) at IceInternal.Incoming.invoke(Incoming.java:166) at Ice.ConnectionI.invokeAll(ConnectionI.java:2045) at Ice.ConnectionI.message(ConnectionI.java:977) at IceInternal.ThreadPool.run(ThreadPool.java:575) at IceInternal.ThreadPool.access$100(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:951)
I made a test and in my communicator initialisation I did the following:Finally, keep in mind that if a class has only data members, but no operations, you need not create and register an object factory to transmit instances of such a class. Only if a class has operations do you have to define and register an object factory.
And voila! This solved the issue.Code:InitializationData ini = new InitializationData(); Properties properties = Util.createProperties(); properties.setProperty("Ice.Trace.Protocol", "1"); ini.properties = properties; communicator = Ice.Util.initialize(ini); // line below makes the exception disappear communicator.addObjectFactory(EmailAddressIce.ice_factory(), EmailAddressIce.ice_staticId());
So now my doubt is: is this a bug, a documentation mislead, or maybe I missed something important here?
My Ice version is 3.3.0.
Greetings

Reply With Quote
. This helped.