Hallo,
kann man folgendes Powershell-Skript mit Perl SOAP::Lite abbilden?
Ich stehe ganz schön auf den Schlauch :-/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$user = "musteruser"
$pass = "4711"
$URI = "http://SERVER:8080/inf-process-engine/soap?wsdl"
$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
$credentials = New-Object System.Management.Automation.PSCredential($user, $secpasswd)
$Body = '<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>'
$response = [xml](Invoke-WebRequest -Credential $credentials -Uri $URI -Headers (@{SOAPAction = 'instantiate'}) -Method Post -Body $Body -ContentType text/xml | Select-Object -Expand Content )
$executionId = $response.Envelope.Body.instantiateResponse.return.executionId
$var_a = 3
$var_b = 7
Write-Host "ExecutionID:" + $executionId
$Body = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://soap.service.engine.inf.com/" xmlns:dat="http://www.inf.com/datastore"><soapenv:Header/><soapenv:Body><soap:startProcess><executionId>' + $executionId + '</executionId><processParams><dat:entry name="a" type="x-xsd/integer"><dat:value>' + $var_a + '</dat:value></dat:entry><dat:entry name="b" type="x-xsd/integer"><dat:value>' + $var_b + '</dat:value></dat:entry></processParams></soap:startProcess></soapenv:Body></soapenv:Envelope>'
$response = [xml](Invoke-WebRequest -Credential $credentials -Uri $URI -Headers (@{SOAPAction = 'startProcess'}) -Method Post -Body $Body -ContentType text/xml | Select-Object -Expand Content)
Write-Host "Ergebnis: " + $response.Envelope.Body.startProcessResponse.return.pipeline.entry.value
mfg
nyjo
alles wird gut
---
mfg
Joachim Nyenhuis