use strict;
use LWP::UserAgent;
use HTTP::Request;
use XML::Simple;
use Data::Dumper;
my $url_of_wsdl = "http://[SERVER]:8080/inf-process-engine/soap?wsdl";
my $username = "musteruser";
my $password = "4711";
my $xml = new XML::Simple;
my $message = "API_Test.ipd";
my $userAgent = LWP::UserAgent->new();
my $request = HTTP::Request->new(POST => $url_of_wsdl);
$request->authorization_basic( "$username", "$password" );
$request->content($message);
$request->content_type("text/xml; charset=utf-8");
my $response = $userAgent->request($request);
print $response->error_as_HTML unless $response->is_success;
my $data = $xml->XMLin( $response->content );
my $executionId = $data->{'S:Body'}->{'ns0:instantiateResponse'}->{'return'}->{executionId};
print "ExecutionID: ".$executionId."\n";
$message = "".$executionId."37";
$request->content($message);
$response = $userAgent->request($request);
print $response->error_as_HTML unless $response->is_success;
$data = $xml->XMLin( $response->content );
my $ergebnis = $data->{'S:Body'}->{'ns0:startProcessResponse'}->{'return'}->{'pe:pipeline'}->{'dat:entry'}->{'dat:value'};
print "Ergebnis: ".$ergebnis;