Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Perl SOAP client

by pysome (Scribe)
on Mar 24, 2009 at 09:56 UTC ( [id://752826] : perlquestion . print w/replies, xml ) Need Help??

pysome has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, Now, i have to use a .Net's web service to get some data.
That server provides three method ,say: getID() getNum(xxx) getName(xxx)
The "getNum" method needs a parameter xxx which is a XML format. I use the module: SOAP::Lite;
my $soap = SOAP::Lite ->uri('') ->on_action(sub{sprintf "%s/%s",@_}) ->proxy('http://xxx/a.asmx'); my $result = $soap->getID(); #It works
# my $str = <<"XML"; <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <node> <nid>10</nid> </node> XML my $result = $soap->getNum($str); #It doesn't work --update
Why the "getNum" method can't work. because of the XML's parameter format only? Pls give me a hand.Thanks.

Replies are listed 'Best First'.
Re: Perl SOAP client
by olus (Curate) on Mar 24, 2009 at 11:16 UTC

    You seem to be calling getID instead of getNum. getID doesn't take arguments hence it not working when you call it with the XML stream.

      thank your apply.I update it.
Re: Perl SOAP client
by ikegami (Patriarch) on Mar 25, 2009 at 04:06 UTC

    It doesn't work

    Then make it work.

    Oh, you want details? We could use some too.

      do you konw about it ?pls help me .thanks.

        I can't help fix what's wrong since you didn't tell us what's wrong.

        Might as well include a trace too. See the docs on how to turn on tracing.