Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: SOAP::Lite server - returning non-SOAP values in sub

by DreamT (Pilgrim)
on Aug 25, 2011 at 15:33 UTC ( [id://922387]=note: print w/replies, xml ) Need Help??


in reply to Re: SOAP::Lite server - returning non-SOAP values in sub
in thread SOAP::Lite server - returning non-SOAP values in sub

Hi, What I want is that the caller to wrap the return values in soap tags, so that i don't have to add logic in the subs themselves. In this way I can call existing subs without altering them. Of course I need some way to "name" the return values, but I thought that this maybe is possible?

I guess I could wrap the subs up manually, using a "mysub_soap", whose only mission is to call mysub, wrap the return from mysub in tags, and return it.
  • Comment on Re^2: SOAP::Lite server - returning non-SOAP values in sub

Replies are listed 'Best First'.
Re^3: SOAP::Lite server - returning non-SOAP values in sub
by Anonymous Monk on Aug 26, 2011 at 10:05 UTC
    Its called a subclass, also, a serializer

    one way with Autoloading

    ->dispatch_to('MyModule::SOAPIFY'); ... package MyModule::SOAPIFY; @ISA = qw[ MyModule ]; sub thisMethodNeedsSpecificWrapping { ... } sub AUTOLOAD { ... GenericWrapper... }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://922387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2024-04-18 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found