in reply to Re: Dynamic Language questions
in thread Dynamic Language questions

Phil,

Could you describe to me the web service this accesses and what it does with it? Maybe show me an text-capture of a user interactive session with it?

Thanks,
Richard

Replies are listed 'Best First'.
Re^3: Dynamic Language questions
by philcrow (Priest) on May 15, 2007 at 12:23 UTC
    Here is the output from running the above script:
    perl soapclient 98.6
    Produces request:
    <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://sunflower.com/soapns" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <soap:Body> <tns:temperature> <tns:farenheit>98.6</tns:farenheit> </tns:temperature> </soap:Body> </soap:Envelope>
    When the server has done its bit, the script prints the response:
    <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <soap:Body> <GantrySoapServiceResponse xmlns="http://usegantry.org/soapservice"> <currentUTCTime>2007-05-15T12:08:18Z</currentUTCTime> <celcius>37</celcius> </GantrySoapServiceResponse> </soap:Body> </soap:Envelope>
    The names of the parameters and their allowed types are usually governed by a WSDL file (perhaps that expands to Web Service Description Language, but I'm not sure of the achronymn).

    Note well that you can convert the script to contact any document style service on the web by changing the URLs and providing the correct argument structure. For instance, I started this test against a public web service. I used:

    my $site = { action_url => 'http://in2test.lsi.uniovi.es/sqlmutationws/getMutantsCompress +ed', post_to_url => 'http://in2test.lsi.uniovi.es/sqlmutationws/SQLMutationWS.asmx +', target_namespace => 'http://in2test.lsi.uniovi.es/sqlmutationws', };
    and
    my $request_args = [ { getMutantsCompressed => [ { sql => 'select * from table1' }, { schema => undef }, { options => undef }, ] }, ];
    If you make those changes, and the public service is still up, you should get a result from anywhere on the net.

    In case it might help with this question or some other question you didn't post, here is the code from the Gantry samples which serves the original script:

    If you have Gantry installed, that's a complete server module. All you need to do is mount it with mod_perl or some other server approach.

    Thanks for taking the time to respond to the survey for all of us.

    Phil

    The Gantry Web Framework Book is now available.
      Your support (and everyone else's!) makes all the difference. Thanks for helping out.

      Cheers,
      Richard