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

Re: [soaplite] does it make sense to give no return value?

Expand Messages
  • Jens Puruckherr
    ... If your applikation returns true then the status of your SOAP-Call will be 200 OK if you use http-transport. If you return a value, you can use it via
    Message 1 of 4 , Dec 9, 2003
    • 0 Attachment
      Tilman Baumann <Tilman.Baumann@...> writes:
      >Nice. Now i can give really sensefull faultmessages.
      >
      >But im allready not sure what i have to return on success. Well i
      >can
      >return a string 'true' or 'success' but is this the common way?

      If your applikation returns 'true' then the status of your SOAP-Call
      will be "200 OK" if you use http-transport.
      If you return a value, you can use it via the result() method.

      my $server = SOAP::Lite
      ->uri ..
      ->proxy .. ;
      my $result = $server->method(param);

      print $server->transport->status; # gives you the status i.e. "200 OK"
      print $result->result; # prints you the returnvalue from your
      application

      # prints the fault-info
      if($res->fault){
      print $result->faultcode;
      print $result->faultstring;
      print $result ->faultdetail;
      }


      >
      >

      Mit freundlichen Grüßen

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