Hi,
All: I'm sorry for long thread of SOAP today in the
WEBrick ML. I don't have suitable ML to talk about
SOAP4R. ruby-talk?
> From: Holden Glova [mailto:dsafari@xtra.co.nz]
> Sent: Friday, March 22, 2002 7:20 PM
> def ProxyFactory.create(object, *attributes)
> proxy = Proxy.new(attributes) # Makes my Proxy object
>
> attributes.each do |attribute|
> value = object.send(attribute)
> setter = attribute.id2name + '='
> proxy.send(setter, value)
> end
>
> proxy
> end
If I understand correctly, proxy(s) here are packed
into an Array and the Array is passed to a client.
Right?
Then, let's get back to the problem. You call
RAA::Proxy#initialize at the head of ProxyFactory.create.
But at the client side, SOAP4R unmarshaller does not
call RAA::Proxy#initialize as I stated before so that
any accessor is not set.
Like all SOAP implementations in other languages I know,
also DRb in Ruby, SOAP4R sends object graph to another
endpoint but does not send class definition. So the
proxy object at client side contaions data (@name) but
knows nothing about method definition of this object.
Hash solution I think is like this;
def ProxyFactory.create(object, *attributes)
proxy = Hash.new
attributes.each do |attribute|
value = object.send(attribute)
proxy[ attribute ] = value
end
proxy
end
Client must access to proxy object like;
puts entry_indexes[0][ :name ]
I stand in awe that the server tries to pass object
reference to client side... Unlike dRuby, passing
object reference is not in the scope of SOAP.
Ignore this if you already know.
Regards,
// NaHi