I have recently came up to SOAP::Lite and made som experiment with it, but for a real use i will nett some kind of custom dispatch routine for SOAP::Lite.
What I'm trying to do:
I have a bunch of persistent objects stored in LDAP or RDBMs or
wherever. I have a good perl home-brewn module for object persistence.
Now I want to 'publish' this interface to other applications using SOAP.
My semantics works like this:
I have tried it this way (mod_perl style):my $object = $factory->instantiate('My::User', id => 'uid=semancik,ou= +people,o=bgs,c=sk'); print $object->realName; # read attribute $object->realName('Radovan Semancik'); # Set attribute
But alas, $object is just a simple blessed hash. This won't work, because server side objects has open database handles and several non-travsferable attributes. The only way to do this is to make a proxy object and instantiate server side object on every request.# server my $server = SOAP::Transport::HTTP::Apache->new; $server->dispatch_with({ 'http://jewels.bgs.sk/Factory' => $factory, }); sub handler { $server->handler(@_) }; # client my $soap = SOAP::Lite ->uri('http://jewels.bgs.sk/Factory') ->proxy('http://jewels.bgs.sk/soap'); my $object = $soap->instantiate('My::User','whateverId')->result;
But SOAP is supposed to be Object Access protocol, not procedural RPC ..... so I want to use it the right way.
Well, I have decided to try it another way around. I want to access
objects with URI like this: 'http://jewels.bgs.sk/MyUser/whateverId' and
have it dispatched the way I like it.
How can I do this in SOAP::Lite? How can I substitute my very own
dispatch routine to SOAP server?
Or am I going wrong way from the very beginning?
Any help/suggestion appreciated.
In reply to SOAP::Lite dispatch routine by gildir
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |