SOAP::Lite
am 22.08.2007 00:23:55 von Jorge Reyes
Hello i=B4m stacked with this issue, i want to consume a web service
powered by the cna (Comision Nacional del Agua, its a goverment
dependence) they do this with Visual .NET and its wsdl is the next:
http://smn2.cna.gob.mx/webservicessmn/service1.asmx?WSDL
So i make a perl script as follows:
#!C:\Perl\bin\perl -w
use strict;
use SOAP::Lite;
my $soap =3D SOAP::Lite
-> proxy('http://smn2.cna.gob.mx/webservicessmn/service1.asmx')
-> uri('http://smn.cna.gob.mx/webservices/');
my $s =3D $soap->ciudadesSoportadas()->result;
print $s;
and it returns the next:
Use of uninitialized value in print at clientewscna.pl line 11.
any idea, i=B4m really worry about this, please help me.
Re: SOAP::Lite
am 22.08.2007 01:04:46 von xhoster
Jorge Reyes wrote:
> Hello i=B4m stacked with this issue, i want to consume a web service
> powered by the cna (Comision Nacional del Agua, its a goverment
> dependence) they do this with Visual .NET and its wsdl is the next:
>
> http://smn2.cna.gob.mx/webservicessmn/service1.asmx?WSDL
First of all, SOAP::Lite isn't very good at modern SOAP. It desperately
needs to be rewritten. There is also SOAP::WSDL, but I haven't had any
better luck with it. I'd be willing to put some effort into improving
them, but I don't know which one to try my hand at first. You might
want to consider using a different language with better support for SOAP
off the shelf.
>
> So i make a perl script as follows:
>
> #!C:\Perl\bin\perl -w
> use strict;
> use SOAP::Lite;
If you add qw (debug trace) to your use, it will help find the
problem. As you currently have it, it silently discards any error
messages, which makes it hard to figure out what they are.
>
> my $soap = SOAP::Lite
> -> proxy('http://smn2.cna.gob.mx/webservicessmn/service1.asmx')
> -> uri('http://smn.cna.gob.mx/webservices/');
if I add:
-> on_action( sub { join '', @_} );
to the above then I start getting non-error responses. I don't
know how to interpret the response that I am getting, but at least
it is now getting one step further.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
Re: SOAP::Lite
am 22.08.2007 02:23:57 von Jorge Reyes
**********
Excellent, man thanks, now i dont want to be lazzy but can you help to
understand the next wsdl:
**********
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
-
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://
serviciosweb.remedyweb.iusacell.com" xmlns:intf="http://
serviciosweb.remedyweb.iusacell.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema">
-
-
-
-
-
-
-
-
-
-
name="paramRemedyRequest" />
name="paramRemedyResponse" />
-
type="impl:ActualizaStatus">
-
-
-
-
-
name="ActualizaStatus">
++++++++++++++++++++++++++++++++++++++
i do the next perl:
#!C:\Perl\bin\perl -w
use strict;
use SOAP::Lite qw;
my $soap = SOAP::Lite
-> uri('http://serviciosweb.remedyweb.iusacell.com')
-> proxy('http://10.199.11.69:9080/remedyWeb/services/
ActualizaStatus')
-> on_action( sub { join '', @_} );
my $s = $soap->paramRemedy("CERRADO",333,"OMAR","FALLITA","551486482 3",
50)->result;
print $s;
and gives me the error:
Possible attempt to separate words with commas at wsremedyclient.pl
line 8.
syntax error at wsremedyclient.pl line 10, near "my "
Execution of wsremedyclient.pl aborted due to compilation errors.
******** please its the last favor please
****************************
Re: SOAP::Lite
am 22.08.2007 10:29:09 von anno4000
Jorge Reyes wrote in comp.lang.perl.misc:
> **********
> Excellent, man thanks, now i dont want to be lazzy but can you help to
> understand the next wsdl:
You didn't get that from the code you show below.
> **********
>
>
> -
added "qw;". That renders the rest of your script useless because qw
will interpret part of your code as data. See "Quote-Like Operators"
in perlop.
> my $soap = SOAP::Lite
> -> uri('http://serviciosweb.remedyweb.iusacell.com')
> -> proxy('http://10.199.11.69:9080/remedyWeb/services/
> ActualizaStatus')
> -> on_action( sub { join '', @_} );
>
> my $s = $soap->paramRemedy("CERRADO",333,"OMAR","FALLITA","551486482 3",
> 50)->result;
> print $s;
>
> and gives me the error:
>
> Possible attempt to separate words with commas at wsremedyclient.pl
> line 8.
That's a warning from the erroneous "qw".
> syntax error at wsremedyclient.pl line 10, near "my "
> Execution of wsremedyclient.pl aborted due to compilation errors.
This error turns up only because of the misapplied "qw".
> ******** please its the last favor please
> ****************************
The way it looks, you still have a way to go.
Anno