Re: SOAP::Lite "service" examples



"John" <john1949@xxxxxxxxx> wrote:
<xhoster@xxxxxxxxx> wrote in message
news:20070802215906.104$gS@xxxxxxxxxxxxxxxxx
I'm having trouble getting SOAP::Lite "service" method to work
properly. All of the examples I've seen point to wsdl's that are either
not found or just give no response.

http://www.xmethods.net/sd/StockQuoteService.wsdl
http://svc.perl.org/Svc.wsdl

Does anyone have a working example of how to make a call with
SOAP::Lite service which uses a working, publicly available SOAP
server?

Also, I haven't been impressed with my experience with SOAP::Lite.
When I try to use it on our internal wsdls I get inscrutable errors,
where other language's SOAP support seems to work fine. Is there
something else designed to make SOAP easy to use that I might want to
try? (SOAP::WSDL uses SOAP::Lite under the hood, so I suspect it will
have the same problem.
It refuses to install with cpan under a non-privileged user, so I
haven't yet tested it directly. Trying to fix that will be the next
step, unless I
get good suggestions here.)

Thanks,

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB

Hi

I have been down this road before.

Can you show us what you have already written?

I'm just using the client side, and unfortunately I don't think that
showing you that will do much good without also providing the whole
server side stuff, wsdl (which I have access to but would need to
go through obstructionist lawyers to show you) plus the implementation
(which I don't even have access to, or know what language it is in). Alas,
that is why I was hoping for an example using a publicly accessible
server--that way the client stuff would be meaningful to you, as we would
be using the same server.

Anyway, what I do is:

#!/usr/bin/perl
use strict;
use warnings;
use SOAP::Lite service =>
'http://bioinf-dev07/services/foobaloo.asmx?wsdl';
print HelloWorldSimple();
__END__

Can't call method "name" without a package or object reference at
/tools/GNU/perl/5.8.7_64/lib/site_perl/5.8.7/SOAP/Lite.pm line 3005.
BEGIN failed--compilation aborted at soap.pl line 5.



I have SOAP::Lite version:

# $Id: Lite.pm,v 1.43 2006/08/16 14:49:34 byrnereese Exp $

Isolating around the problem, starting at line 3003:

foreach (@{$services->{$service}{parameters}}) {
# next unless $_;
$self->{'_stub'} .= " SOAP::Data->new(name => '".$_->name."',
type => '".$_->type."', attr => {";

So the commenting out of "next unless $_" allows truly empty $_ to reach
the following line, triggering the error. However, if I comment it back
in, then everything gets skipped, apparently because $_ is an object which
seems to have overloaded operations which cause it to evaluate as false in
this (stringification?) context. I changed the line to execute the "next"
on only the values of $_ which are true empty strings, rather than objects
with overloaded operations:

next if not ref $_ and not $_;

And that solves that particular error, but now nothing is printed in the
final line of my script. (In python and C# against the same WSDL/server,
HelloWorldSimple() does return a meaningful string)

Anyway, I will work on making a simplified WSDL and a Server to serve it,
that I can post both of.

Thanks,

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.



Relevant Pages

  • Problem to invoke a method of webservice from a C++ SoapClient
    ... I used SoapClient Libray provided by SQLData to invoke a method ... exposed by Webservices of weblogic over HTTP.(using WSDL). ... and do html encoding and send that to the server, ... the response would be build as a soap response and send over http. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: SOAP project
    ... and what do I do if they haven't published the WSDL document? ... your job is much easier - you can create a SOAP ... > | the server as standard SOAP messages. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Sending raw SOAP Message to specified port
    ... system written in Delphi. ... Client and Server side. ... instead of that they have made an application, which listens for SOAP ... Is there any parameters in WSDL which says to SoapClient ...
    (comp.lang.php)
  • Re: VB.Net Web Services?
    ... get a simple request / response example working on a local IIS server. ... they use as long as they are following the WSDL standards. ... external company and wrap it in a SOAP envelope. ...
    (microsoft.public.dotnet.general)
  • Re: SOAP Request is repeated in the SOAP response.
    ... Like this way you guys can control the values returned in the SOAP response. ... Client side method SaveMailcalls Server side SetMail. ... Parameters would be cSessionKey and cXML to the server side method. ...
    (microsoft.public.fox.helpwanted)