in reply to Parameter passing using SOAP::Data in perl

Asking a question about SOAP::Lite seems to be almost like yelling "Fire!" in a theater:-). Here's my attempt at dousing the fire:
#!/usr/bin/perl use strict; use warnings; use SOAP::Lite +trace => 'all'; my $soap = SOAP::Lite ->uri("http://www.example.com/") ->on_action(sub { join "/", "http://www.example.com", $_[1] } ) ->proxy("http://localhost/Example1/Service1.asmx"); my $method = SOAP::Data->name('name') ->attr({'xmlns' => "http://www.example.com/"}); my @params = (SOAP::Data->name(str1 => 'string1'), SOAP::Data->name(str2 => 'string2')); print $soap->call($method => @params)->result;

Replies are listed 'Best First'.
Re^2: Parameter passing using SOAP::Data in perl
by Anonymous Monk on Aug 08, 2012 at 08:10 UTC
    Very good and helpful answer!!! maybe it would be better if you set the namespace in data object.
    my $soapa = SOAP::Lite->new(); $soapa->proxy("$WS_proxy"); $soapa->readable(1); $soapa->service("$WS_service"); my $data = SOAP::Data->new(); $data->uri("$WS_namespace"); my $method = $data->name('yourService'); my @params = (SOAP::Data->name('arg1' => ""), SOAP::Data->name('arg0' => "")); $result = $soapa->call($method => @params)->result; print Dumper($result); }