Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Reading the SOAP Request (SOAP::Server::Parameters)

by Anonymous Monk
on Jul 30, 2013 at 22:35 UTC ( [id://1047136]=note: print w/replies, xml ) Need Help??


in reply to Reading the SOAP Request

Replies are listed 'Best First'.
Re^2: Reading the SOAP Request (SOAP::Server::Parameters)
by hpham01 (Initiate) on Jul 31, 2013 at 07:01 UTC

    I think you can turn on debugging by:

    use SOAP::Lite 'trace', 'debug';

    When you execute it you, should be able to see the SOAP message for your debugging

      Well, that doesn't have much of anything to do with retrieving the request object
Re^2: Reading the SOAP Request (SOAP::Server::Parameters)
by markdibley (Sexton) on Jul 31, 2013 at 11:01 UTC

    Thanks for the pointer to

    https://metacpan.org/module/SOAP::Server#SOAP::Server::Parameters

    So, essentially all I have to do is add the following to the top of my module and it adds a SOAP::SOM object to the variables passed to any method called as a SOAP service.

    use vars qw(@ISA); @ISA = qw(Exporter SOAP::Server::Parameters);

    The additional variable allows access to the envelope which has a whole load of useful stuff in there including access to the request. And access to the request can be done like in the following example

    sub mymethod{ my $envelope = pop(@_); my $sample_id = $envelope->dataof("//sample_id")->value if(defined + $envelope->dataof("//sample_id")); my $match_id = $envelope->dataof("//match_id")->value if(defined $ +envelope->dataof("//match_id")); }

    This is great as that means I can do my own verifying of the request data.

    Thanks again for the pointer.

Log In?
Username:
Password:

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

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

    No recent polls found