Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] named function arguments

Expand Messages
  • Jay A. Kreibich
    ... See the thread on Accessing the SOAP::Header. Basically you need to have your server classes derived from SOAP::Server::Parameters. This will provide the
    Message 1 of 2 , Apr 11 8:09 AM
    View Source
    • 0 Attachment
      On Mon, Apr 11, 2005 at 01:24:08PM -0000, Andrew Hicox scratched on the wall:
      >
      >
      > Hello everyone:
      >
      > I'm writing some services using Soap::Lite, and I need to be able to
      > have named arguments to my subroutines.

      > Is there any way for me to snag the names of the arguments inside my
      > perl module without having to write my own custom deserializer?

      See the thread on Accessing the SOAP::Header.

      Basically you need to have your server classes derived from
      SOAP::Server::Parameters. This will provide the SOAP::SOM object to
      each function call as the last argument. You can then extract the
      full SOAP::Data members for headers and parameters from this object,
      including name and type information.

      If you need to do this for every function call, I would suggest
      writing a helper function that takes a SOM object and just extracts
      all the headers, so you can do something like this:

      sub mySoapCall
      {
      my( %args ) = myHelperPkg::ExtractParaters( pop( @_ ) );
      [...]
      }


      -j

      --
      Jay A. Kreibich | CommTech, Emrg Net Tech Svcs
      jak@... | Campus IT & Edu Svcs
      <http://www.uiuc.edu/~jak> | University of Illinois at U/C
    Your message has been successfully submitted and would be delivered to recipients shortly.