in reply to Error calling a simple Soap API using Perl's Soap::Lite

or the # sign in the SOAPAction (I couldnt find out why and where this is added to the uri)

See on_action(callback) in SOAP::Lite. Try adding

$client->on_action( sub { join '', @_ } );
poj

Replies are listed 'Best First'.
Re^2: Error calling a simple Soap API using Perl's Soap::Lite
by rjx5 (Novice) on Oct 10, 2018 at 22:31 UTC
    Thanks poj, that helps. I overlooked the on_action method. Final code looks like this:
    my $proxy = 'http://www.dneonline.com/calculator.asmx'; my $ns = 'http://www.tempuri.org/'; $method = SOAP::Data->name('Add') ->attr({xmlns => 'http://tempuri.org/'}); $client = SOAP::Lite->new() ->proxy($proxy) ->ns($ns,'tem') ->readable(1); $client->on_action( sub { join '', @_ } ); push(@parms, SOAP::Data->name(intA => $x)); push(@parms, SOAP::Data->name(intB => $y)); $response = $client->call($method => @parms)->result; print "Result is $response \n";