SOAP::Lite

Discussion in 'Perl Misc' started by Jorge Reyes, Aug 21, 2007.

  1. Jorge Reyes

    Jorge Reyes Guest

    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.
    Jorge Reyes, Aug 21, 2007
    #1
    1. Advertising

  2. Jorge Reyes

    Guest

    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
    , Aug 22, 2007
    #2
    1. Advertising

  3. Jorge Reyes

    Jorge Reyes Guest

    **********
    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
    ****************************
    Jorge Reyes, Aug 22, 2007
    #3
  4. Jorge Reyes

    -berlin.de Guest

    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.

    > **********
    >
    > <?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
    -berlin.de, Aug 22, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Saqib Ali

    SOAP:Lite Limitations re: https??

    Saqib Ali, Sep 12, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,022
    Serge Dubrouski
    Sep 16, 2003
  2. Blaine Everingham

    SOAP::Lite

    Blaine Everingham, Dec 9, 2003, in forum: Perl
    Replies:
    0
    Views:
    711
    Blaine Everingham
    Dec 9, 2003
  3. Rushikesh Joshi
    Replies:
    0
    Views:
    430
    Rushikesh Joshi
    Aug 19, 2004
  4. Aaron Brady

    SQL, lite lite lite

    Aaron Brady, Dec 29, 2008, in forum: Python
    Replies:
    15
    Views:
    739
    Aaron Brady
    Jan 1, 2009
  5. droesler
    Replies:
    2
    Views:
    473
    droesler
    Aug 31, 2010
Loading...

Share This Page