Re: SOAP::Lite "service" examples
- From: xhoster@xxxxxxxxx
- Date: 03 Aug 2007 11:03:54 GMT
"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
.
- Follow-Ups:
- Re: SOAP::Lite "service" examples
- From: anno4000
- Re: SOAP::Lite "service" examples
- References:
- SOAP::Lite "service" examples
- From: xhoster
- Re: SOAP::Lite "service" examples
- From: John
- SOAP::Lite "service" examples
- Prev by Date: Re: I finally got a round tuit. (My first JAPH)
- Next by Date: Re: Home directory not seen as writable in Vista
- Previous by thread: Re: SOAP::Lite "service" examples
- Next by thread: Re: SOAP::Lite "service" examples
- Index(es):
Relevant Pages
|