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

Read out SOAP-Response

Expand Messages
  • langnau_8135
    Hi SOAPlite Group, i am new to SOAP Lite (and PERL in generell ;-)) and stuck in a problem. I am able to give a wsdl, call a Function with a parameter. But
    Message 1 of 2 , Jul 30, 2008
    View Source
    • 0 Attachment
      Hi SOAPlite Group,

      i am new to SOAP Lite (and PERL in generell ;-)) and stuck in a
      problem.

      I'am able to give a wsdl, call a Function with a parameter. But i'am
      not able to work with the result. I tried with SOAP::Data and
      SOAP::SOM but i completly failed.
      When i use +trace => 'debug'; the SOAPresponse is correct.

      Could someone give me a hint how to get the Data in SOAPresponse.

      My code right now (i have obfuscated the url an Method):
      [code]
      #!perl
      use strict;
      use Data::Dumper;
      use SOAP::Lite;
      # +trace => 'debug';
      my $soap = SOAP::Lite->new();
      my $serializer = $soap->serializer();
      my $service =

      $soap->service('http://myurltowsdl.wsdl');

      #====getMthodname 9999
      my $result = $service -> getMethodname(999999);

      print $result->dataof('//getMethodnameResponse/firstname'), "\n";

      if (my $fault = $service->call->fault) {
      print "NOK";
      } else {
      print "OK";
      }[/code]

      kind regards
      peter
    • patrick mariani
      See if this does it for you! Pat print $result- valueof( //firstname ) . n ; ... From: langnau_8135 To: soaplite@yahoogroups.com Sent: Wednesday, July 30,
      Message 2 of 2 , Jul 30, 2008
      View Source
      • 0 Attachment
        See if this does it for you!
        Pat
         
         
        print $result->valueof('/ / firstname' ) . "\n";
         
         
         
         
        ----- Original Message -----
        Sent: Wednesday, July 30, 2008 3:02 AM
        Subject: [soaplite] Read out SOAP-Response

        Hi SOAPlite Group,

        i am new to SOAP Lite (and PERL in generell ;-)) and stuck in a
        problem.

        I'am able to give a wsdl, call a Function with a parameter. But i'am
        not able to work with the result. I tried with SOAP::Data and
        SOAP::SOM but i completly failed.
        When i use +trace => 'debug'; the SOAPresponse is correct.

        Could someone give me a hint how to get the Data in SOAPresponse.

        My code right now (i have obfuscated the url an Method):
        [code]
        #!perl
        use strict;
        use Data::Dumper;
        use SOAP::Lite;
        # +trace => 'debug';
        my $soap = SOAP::Lite-> new();
        my $serializer = $soap->serializer( );
        my $service =

        $soap->service( 'http://myurltowsdl. wsdl');

        #====getMthodname 9999
        my $result = $service -> getMethodname( 999999);

        print $result->dataof( '//getMethodname Response/ firstname' ), "\n";

        if (my $fault = $service->call- >fault) {
        print "NOK";
        } else {
        print "OK";
        }[/code]

        kind regards
        peter

      Your message has been successfully submitted and would be delivered to recipients shortly.