SOAP::Lite

J

Jorge Reyes

Hello i´m 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 = SOAP::Lite
-> proxy('http://smn2.cna.gob.mx/webservicessmn/service1.asmx')
-> uri('http://smn.cna.gob.mx/webservices/');

my $s = $soap->ciudadesSoportadas()->result;
print $s;

and it returns the next:

Use of uninitialized value in print at clientewscna.pl line 11.

any idea, i´m really worry about this, please help me.
 
X

xhoster

Jorge Reyes said:
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.

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
 
J

Jorge Reyes

**********
Excellent, man thanks, now i dont want to be lazzy but can you help to
understand the next wsdl:
**********

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://
serviciosweb.remedyweb.iusacell.com" xmlns:impl="http://
serviciosweb.remedyweb.iusacell.com" xmlns:intf="http://
serviciosweb.remedyweb.iusacell.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/
wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="http://serviciosweb.remedyweb.iusacell.com"
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">
- <element name="paramRemedyResponse">
- <complexType>
- <sequence>
<element name="paramRemedyReturn" type="xsd:int" />
</sequence>
</complexType>
</element>
- <element name="paramRemedy">
- <complexType>
- <sequence>
<element name="estado" nillable="true" type="xsd:string" />
<element name="remedyid" type="xsd:long" />
<element name="usumod" nillable="true" type="xsd:string" />
<element name="historial" nillable="true" type="xsd:string" />
<element name="telcontacto" nillable="true" type="xsd:string" />
<element name="usua_afec" type="xsd:int" />
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
- <wsdl:message name="paramRemedyRequest">
<wsdl:part element="impl:paramRemedy" name="parameters" />
</wsdl:message>
- <wsdl:message name="paramRemedyResponse">
<wsdl:part element="impl:paramRemedyResponse" name="parameters" />
</wsdl:message>
- <wsdl:portType name="ActualizaStatus">
- <wsdl:eek:peration name="paramRemedy">
<wsdl:input message="impl:paramRemedyRequest"
name="paramRemedyRequest" />
<wsdl:eek:utput message="impl:paramRemedyResponse"
name="paramRemedyResponse" />
</wsdl:eek:peration>
</wsdl:portType>
- <wsdl:binding name="ActualizaStatusSoapBinding"
type="impl:ActualizaStatus">
<wsdlsoap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http" />
- <wsdl:eek:peration name="paramRemedy">
<wsdlsoap:eek:peration soapAction="" />
- <wsdl:input name="paramRemedyRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
- <wsdl:eek:utput name="paramRemedyResponse">
<wsdlsoap:body use="literal" />
</wsdl:eek:utput>
</wsdl:eek:peration>
</wsdl:binding>
- <wsdl:service name="ActualizaStatusService">
- <wsdl:port binding="impl:ActualizaStatusSoapBinding"
name="ActualizaStatus">
<wsdlsoap:address location="http://10.199.11.69:9080/remedyWeb/
services/ActualizaStatus" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
++++++++++++++++++++++++++++++++++++++
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","5514864823",
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
****************************
 
A

anno4000

Jorge Reyes said:
**********
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.
**********

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://

[more xml snipped]
i do the next perl:

#!C:\Perl\bin\perl -w
use strict;
use SOAP::Lite qw;

Xho advised you to add "qw (debug trace)" to the use-statement, you only
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","5514864823",
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Another SOAP::Lite 0
SOAP::LITE 3
Memory leaks with SOAP Lite 1
soap::Lite help please 0
SOAP::Lite bugs me! 0
Problem with SOAP::Lite 2
soap lite question. 1
SOAP::Lite - getting WSDL using basic authentication 0

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top