Calling .Net web service using a PERL client.

Discussion in 'ASP .Net Web Services' started by JTrigger, Aug 19, 2004.

  1. JTrigger

    JTrigger Guest

    I need to call a .Net web service that takes an array or object as a
    parameter from a PERL client. I have been trying to use the PERL SOAP::Lite
    package to do this without success. I can call one that takes a simple
    type, such as int or string, but not an array or object. Please help!!! My
    code that I have written to call the web service and the SOAP packets that
    get sent and received are below. It seems like no matter what I do I cannot
    get it to recognize the array that I pass. Please CC my email address with
    any responses. My address is as follows with the $# removed:
    J$#im.Fo$#wl$#er@E$#D$#S$#.c$#o$#m
    Thanks in advance for any assistance.

    use SOAP::Lite;

    my @web;
    @web[0] = '234234';
    @web[1] = 'Test1';
    @web[2] = '3454545';
    @web[3] = 'Test2';

    my $s = SOAP::Lite
    -> uri('EDS.Galileo/')
    -> proxy('http://testedsapps.weyer.com/Galileo/Galileo.asmx')
    -> on_action(sub{sprintf '%s%s', @_ })
    -> on_debug(sub{print@_}) ;
    ;
    $result =
    $s->UpdateIncident(SOAP::Data->name('TicketValues')->value(SOAP::Data->value
    (\@web)));

    unless ($result->fault) {
    if (length ($result->result()) == 0)
    {
    print "result = ".$result->result()."\n";
    }

    } else {

    print "error ".$result->faultstring."\n";


    unless ($result->fault) {
    if (length ($result->result()) == 0)
    {
    print "result = ".$result->result()."\n";
    }

    } else {

    print "error ".$result->faultstring."\n";
    }

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <namesp1:UpdateIncident xmlns:namesp1="EDS.Galileo/">
    <TicketValues xsi:type="SOAP-ENC:Array"
    SOAP-ENC:arrayType="xsd:string[4]">
    <item xsi:type="xsd:string">"600100024"</item>
    <item xsi:type="xsd:string">"GFS000999"</item>
    <item xsi:type="xsd:string">"536871002"</item>
    <item xsi:type="xsd:string">"1092585900"</item>
    </TicketValues>
    </namesp1:UpdateIncident>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    HTTP/1.1 500 (Internal Server Error) Internal Server Error.
    Cache-Control: private
    Connection: close
    Date: Thu, 19 Aug 2004 14:07:57 GMT
    Server: Microsoft-IIS/5.0
    Content-Length: 732
    Content-Type: text/xml; charset=utf-8
    Client-Date: Thu, 19 Aug 2004 14:08:41 GMT
    Client-Peer: 10.31.240.10:80
    Client-Response-Num: 1
    MicrosoftOfficeWebServer: 5.0_Pub
    X-AspNet-Version: 1.1.4322
    X-Powered-By: ASP.NET

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>System.Web.Services.Protocols.SoapException: Server was
    unable to process request. ---&gt; System.NullReferenceException: Object
    reference not set to an instance of an object.
    at EDS.Galileo.Galileo.UpdateIncident(String[] TicketValues) in
    c:\inetpub\wwwroot\galileo\galileo.asmx.cs:line 484
    --- End of inner exception stack trace ---</faultstring>
    <detail />
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    JTrigger, Aug 19, 2004
    #1
    1. Advertising

  2. JTrigger

    [MSFT] Guest

    Hello,

    I am not a expert on PERL. Here are some document I found so far, you may
    take a look to see if they can help:

    How to Call a .NET-based Web Service Using the SOAP::Lite Perl Library
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoap/html
    /soapliteperl.asp

    SOAP::Lite Client HOWTO
    http://soapenv.org/article.pl?sid=02/02/11/1740229&mode=thread

    Since this group focus on .NET web service, it may be hard to find one who
    is familar with PERL client. I suggest you may also post this question on a
    PERL related newsgroup to get more information.

    Luke
    [MSFT], Aug 20, 2004
    #2
    1. Advertising

  3. This service
    http://www.xmethods.net/ve2/ViewListing.po?key=uuid:E0515679-9336-68FD-D116-DD728CC865DE

    includes a perl client that retrieves an array from a C# ASMX service.

    "JTrigger" <> wrote in message
    news:...
    > I need to call a .Net web service that takes an array or object as a
    > parameter from a PERL client. I have been trying to use the PERL

    SOAP::Lite
    > package to do this without success. I can call one that takes a simple
    > type, such as int or string, but not an array or object. Please help!!!

    My
    > code that I have written to call the web service and the SOAP packets that
    > get sent and received are below. It seems like no matter what I do I

    cannot
    > get it to recognize the array that I pass. Please CC my email address

    with
    > any responses. My address is as follows with the $# removed:
    > J$#im.Fo$#wl$#er@E$#D$#S$#.c$#o$#m
    > Thanks in advance for any assistance.
    >
    > use SOAP::Lite;
    >
    > my @web;
    > @web[0] = '234234';
    > @web[1] = 'Test1';
    > @web[2] = '3454545';
    > @web[3] = 'Test2';
    >
    > my $s = SOAP::Lite
    > -> uri('EDS.Galileo/')
    > -> proxy('http://testedsapps.weyer.com/Galileo/Galileo.asmx')
    > -> on_action(sub{sprintf '%s%s', @_ })
    > -> on_debug(sub{print@_}) ;
    > ;
    > $result =
    >

    $s->UpdateIncident(SOAP::Data->name('TicketValues')->value(SOAP::Data->value
    > (\@web)));
    >
    > unless ($result->fault) {
    > if (length ($result->result()) == 0)
    > {
    > print "result = ".$result->result()."\n";
    > }
    >
    > } else {
    >
    > print "error ".$result->faultstring."\n";
    >
    >
    > unless ($result->fault) {
    > if (length ($result->result()) == 0)
    > {
    > print "result = ".$result->result()."\n";
    > }
    >
    > } else {
    >
    > print "error ".$result->faultstring."\n";
    > }
    >
    > <?xml version="1.0" encoding="UTF-8"?>
    > <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    > <SOAP-ENV:Body>
    > <namesp1:UpdateIncident xmlns:namesp1="EDS.Galileo/">
    > <TicketValues xsi:type="SOAP-ENC:Array"
    > SOAP-ENC:arrayType="xsd:string[4]">
    > <item xsi:type="xsd:string">"600100024"</item>
    > <item xsi:type="xsd:string">"GFS000999"</item>
    > <item xsi:type="xsd:string">"536871002"</item>
    > <item xsi:type="xsd:string">"1092585900"</item>
    > </TicketValues>
    > </namesp1:UpdateIncident>
    > </SOAP-ENV:Body>
    > </SOAP-ENV:Envelope>
    > HTTP/1.1 500 (Internal Server Error) Internal Server Error.
    > Cache-Control: private
    > Connection: close
    > Date: Thu, 19 Aug 2004 14:07:57 GMT
    > Server: Microsoft-IIS/5.0
    > Content-Length: 732
    > Content-Type: text/xml; charset=utf-8
    > Client-Date: Thu, 19 Aug 2004 14:08:41 GMT
    > Client-Peer: 10.31.240.10:80
    > Client-Response-Num: 1
    > MicrosoftOfficeWebServer: 5.0_Pub
    > X-AspNet-Version: 1.1.4322
    > X-Powered-By: ASP.NET
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    > <soap:Body>
    > <soap:Fault>
    > <faultcode>soap:Server</faultcode>
    > <faultstring>System.Web.Services.Protocols.SoapException: Server was
    > unable to process request. ---&gt; System.NullReferenceException: Object
    > reference not set to an instance of an object.
    > at EDS.Galileo.Galileo.UpdateIncident(String[] TicketValues) in
    > c:\inetpub\wwwroot\galileo\galileo.asmx.cs:line 484
    > --- End of inner exception stack trace ---</faultstring>
    > <detail />
    > </soap:Fault>
    > </soap:Body>
    > </soap:Envelope>
    >
    >
    Dino Chiesa [Microsoft], Aug 23, 2004
    #3
    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. hocho888
    Replies:
    1
    Views:
    628
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,223
    Michael Averstegge
    Jan 10, 2006
  3. Replies:
    1
    Views:
    233
    Joe Kaplan \(MVP - ADSI\)
    Jun 14, 2006
  4. JC

    Calling a web service from a web service

    JC, Aug 16, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    121
    Tom Vande Stouwe MCSD.net
    Aug 20, 2003
  5. Mr. x

    calling web-service from another web-service

    Mr. x, Sep 29, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    123
    Mr. x
    Sep 29, 2003
Loading...

Share This Page