#!/usr/bin/perl use SOAP::Lite +trace; my ($server, $endpoint, $soapaction, $method, $body, $envelope); $server = 'http://127.0.0.1'; $endpoint = "$server/Just_Some_Test"; $soapaction = "Just_Some_Test"; # This will eventually come from a file $body = qq~ ~; # Set the envelope - Will eventually contain other specific stuff my $envelope = SOAP::Serializer->new(); $envelope-> register_ns ("http://www.w3.org/2001/XMLSchema-instance", "xsi"); $envelope-> register_ns ("http://www.w3.org/2001/XMLSchema", "xsd"); # Initialize the object my $getData = SOAP::Lite -> serializer ($envelope) -> uri ($soapaction) -> readable (1) -> proxy ($endpoint) -> on_fault(sub { my($soap, $res) = @_; die ref $res ? "ERROR " . $res->faultdetail : "ERROR " .$soap->transport->status, "\n"; }) ; # Make the call and set the Body of the message my $response = $getData->call( method => SOAP::Data->type(xml => $body) ); if ( $response->fault ) { printf "***A fault (%s) occurred: %s\n", $response->faultcode, $response->faultstring; } else { print "***Response: " . $response->result . "\n"; } exit;