Skip to content

Commit 003724a

Browse files
committed
sendSoapRequest SOAP modules's method wasn't sending more than 1 (top level) parameters to server
1 parent f79c374 commit 003724a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Codeception/Module/SOAP.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ public function sendSoapRequest($action, $body = "")
134134
$call = $xml->createElement('ns:' . $action);
135135
if ($body) {
136136
$bodyXml = SoapUtils::toXml($body);
137-
$bodyNode = $xml->importNode($bodyXml->documentElement, true);
138-
$call->appendChild($bodyNode);
137+
if ($bodyXml->hasChildNodes()) {
138+
foreach ($bodyXml->childNodes as $bodyChildNode) {
139+
$bodyNode = $xml->importNode($bodyChildNode, true);
140+
$call->appendChild($bodyNode);
141+
}
142+
}
139143
}
140144

141145
$xmlBody = $xml->getElementsByTagNameNS($soap_schema_url, 'Body')->item(0);

0 commit comments

Comments
 (0)