Thread Hilfe zu SOAP::Lite (Migration Powershell nach Perl) (4 answers)
Opened by nyjo at 2020-06-19 09:38

nyjo
 2020-06-22 12:50
#192366 #192366
User since
2005-01-11
17 Artikel
BenutzerIn
[Homepage] [default_avatar]
Hallo Linuxer,

Mir fehlt irgendwie der Einstieg!

Mit LWP::UserAgent und HTTP::Request hat es geklappt! Möchte aber gerne SOAP::Lite verwenden/einsteigen.

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use LWP::UserAgent;
use HTTP::Request;


my $url_of_wsdl = "http://[SERVER]:8080/inf-process-engine/soap?wsdl";
my $username = "musteruser";
my $password = "4711";

my $message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap='http://soap.service.engine.inf.com/'><soapenv:Header/><soapenv:Body><soap:instantiate><processUri>API_Test.ipd</processUri></soap:instantiate></soapenv:Body></soapenv:Envelope>";


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->as_string;


mfg
Nyenhuis
alles wird gut

---

mfg

Joachim Nyenhuis

View full thread Hilfe zu SOAP::Lite (Migration Powershell nach Perl)