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

Re: [soaplite] SOAP::Lite code not working

Expand Messages
  • Eric Bridger
    The S::L- call() method takes a SOAP::Data object as it s first argument. From the man page: call(arguments) $client- call($method = @arguments); As has been
    Message 1 of 2 , Oct 14, 2005
    • 0 Attachment
      The S::L->call() method takes a SOAP::Data object as it's first
      argument.

      From the man page:
      call(arguments)

      $client->call($method => @arguments);

      As has been illustrated in previous chapters, the SOAP::Lite client
      objects can manage remote calls with auto-dispatching using some of
      Perl's more elaborate features. call is used when the application wants
      a greater degree of control over the details of the call itself. The
      method may be built up from a SOAP::Data object, so as to allow full
      control over the namespace associated with the tag, as well as other
      attributes like encoding. This is also important for calling methods
      that contain characters not allowable in Perl function names, such as
      A.B.C.

      Eric



      On Thu, 2005-10-13 at 11:26, satanssidekick5 wrote: Hello everyone,
      I am new to this group and SOAP::Lite and would
      appreciate any kind wrt my problem. I am trying to access a web
      service with the following code..

      #!/usr/bin/perl -w

      use strict;
      use SOAP::Lite;
      use SOAP::Lite +trace => [qw(debug)];


      my $ENDPOINT = 'http://.../...';
      my $l = new SOAP::Lite(endpoint => $ENDPOINT, proxy => $ENDPOINT);
      my @params = ( SOAP::Data->name('domain')->value('G'),
      SOAP::Data->name('URL')->value('http://news.yahoo.com'),
      SOAP::Data->name('numberTerms')->value('20'),
      SOAP::Data->name('showWeights')->value('true'),
      SOAP::Data->name('format')->value('1'));
      my $response = $l->call('XSD_STRING' => @params)->result;

      I get the following error...

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><XSD_STRING><domain
      xsi:type="xsd:string">G</domain><URL
      xsi:type="xsd:string">http://news.yahoo.com</URL><numberTerms
      xsi:type="xsd:int">20</numberTerms><showWeights
      xsi:type="xsd:string">true</showWeights><format
      xsi:type="xsd:int">1</format></XSD_STRING></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
      Server Error
      Connection: close
      Date: Thu, 13 Oct 2005 15:28:08 GMT
      Server: Apache Coyote/1.0
      Content-Type: text/xml; charset=utf-8
      Client-Date: Thu, 13 Oct 2005 15:21:05 GMT
      Client-Peer: 129.79.36.240:8080
      Client-Response-Num: 1
      Client-Transfer-Encoding: chunked

      <?xml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <soapenv:Fault>
      <faultcode>soapenv:Server.generalException</faultcode>
      <faultstring>No such operation 'XSD_STRING'</faultstring>
      <detail/>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>
      I have no idea why I get this error, please let me know if you have
      any suggestions/help. Thanks a lot.

      Gayathri





      ________________________________________________________________________
      YAHOO! GROUPS LINKS

      1. Visit your group "soaplite" on the web.

      2. To unsubscribe from this group, send an email to:
      soaplite-unsubscribe@yahoogroups.com

      3. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service.

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