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

Re: [soaplite] SOAP::Lite with WSDL: not auto-discovered?

Expand Messages
  • Paul Kulchenko
    Hi, Mark! ... yes. use data: protocol: my $file =
    Message 1 of 2 , May 30 4:55 PM
    • 0 Attachment
      Hi, Mark!

      --- Mark Wilkinson <mwilkinson@...> wrote:
      > (1) can I pass a WSDL file as a scalar (i.e. not a file location,
      > but the actual XML of the WSDL file as a string)
      yes. use 'data:' protocol:

      my $file = '<definitions....'; # your wsdl file
      $file =~ s/\r|\n//g; # drop all crlf's (SOAP::Lite's problem)
      my $service = SOAP::Lite->service("data:,$wsdl");
      ...

      Kudos to Gisle Aas ;)

      > (2) As far as I understand, WSDL files include the service "method
      > call" as part of the WSDL definition,
      skipped...

      > Am I misunderstanding something? Is there a way to tell
      > SOAP::Schema to
      > simply execute the service that was defined in the WSDL? I know it
      All available methods are stored in @EXPORT_OK array, so it shouldn't
      be difficult to get them from there:

      my $service = SOAP::Lite->service('file:./stock.wsdl');
      my($method) = @{join '::', ref $service, 'EXPORT_OK'};
      print $service->$method("MSFT");

      > I would have expected this to be more like:
      >
      > print $service->execute("params")

      My answer to that would be 'be consistent' ;). Why 'execute'? Why
      only for service descriptions with one operation? It can be easily
      implemented anyway ;). Hope it helps.

      Best wishes, Paul.

      >
      > for example: <operation name="MyMethodCall"/>
      > or: <soap:operation soapAction="#MyMethodCall"/>
      >
      > yet the examples in the SOAP::Lite documentation still require
      > you to
      > explicitly hard-code this call:
      >
      > use SOAP::Lite
      > my $service = SOAP::Lite->service('file:./MyService.wsdl');
      > print $service->MyMethodCall("params")
      >
      >
      > I would have expected this to be more like:
      >
      > print $service->execute("params")
      >
      >
      > particularly since you stipulate that your SOAP::Schema module
      > can
      > only handle WSDL files defining a single service.
      >
      > It seems to somewhat defeat the purpose of having a WSDL file if
      > you
      > are, a priori, required to know the name of the method call :-)
      >
      > Am I misunderstanding something? Is there a way to tell
      > SOAP::Schema to
      > simply execute the service that was defined in the WSDL? I know it
      > isn't a big deal - I can parse out the method call 'manually' and
      > make
      > it a variable in my Perl script, but still... it seems
      > counter-intuitive
      > to have to do so.
      >
      > Any advice appreciated!
      >
      > Cheers all!
      >
      > Mark
      >
      >
      >
      > --
      > --------------------------------
      > "Speed is subsittute fo accurancy."
      > ________________________________
      >
      > Dr. Mark Wilkinson
      > Bioinformatics Group
      > National Research Council of Canada
      > Plant Biotechnology Institute
      > 110 Gymnasium Place
      > Saskatoon, SK
      > Canada
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! - Official partner of 2002 FIFA World Cup
      http://fifaworldcup.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.