Skip to content

Commit 04113b4

Browse files
committed
fix: call with array arguments is not working correctly
1 parent b83cd39 commit 04113b4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Client/Request.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ public function xmlContent(): string
156156
public function arguments(): array
157157
{
158158
$doc = Document::fromXmlString($this->body());
159-
$method = $doc->locate(new SoapBodyLocator())?->firstElementChild;
160-
161-
return Arr::wrap(Arr::get(element_decode($method, traverse(new RemoveNamespaces())), 'node', []));
159+
$method = $doc->locate(new SoapBodyLocator());
160+
return Arr::wrap(Arr::get(element_decode($method, traverse(new RemoveNamespaces())), 'Body', []));
162161
}
163162

164163
/**

src/SoapClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public function call(string $method, Validator|array $arguments = []): Response
341341
}
342342
$arguments = $arguments->validated();
343343
}
344-
$arguments = [$arguments];
344+
$arguments = Arr::wrap($arguments);
345345
$result = $this->engine->request($method, $arguments);
346346
if ($result instanceof ResultProviderInterface) {
347347
return $this->buildResponse(Response::fromSoapResponse($result->getResult()));

0 commit comments

Comments
 (0)