Skip to content

Commit

Permalink
Fix action for xmlEncode
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Feb 15, 2024
1 parent 306a926 commit 433abd7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Service/ZGWToZDSService.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,16 @@ public function zgwToZdsInformationObjectHandler(array $data, array $configurati
*/
public function zgwToZdsXmlEncodeHandler(array $data, array $configuration): array

Check warning on line 343 in src/Service/ZGWToZDSService.php

View workflow job for this annotation

GitHub Actions / build

Avoid unused parameters such as '$configuration'.
{
// $encoder = new XmlEncoder(['xml_root_node_name' => 'SOAP-ENV:Envelope']);
// $message = $encoder->encode($data['response'], 'xml');
$response = $data['response'];
$responseBody = json_decode($response->getContent(), true);

$encoder = new XmlEncoder(['xml_root_node_name' => 'SOAP-ENV:Envelope']);
$responseBody = $encoder->encode($responseBody, 'xml');

$data['response'] = new Response($responseBody, $response->getStatusCode(), ['content-type' => 'text/xml']);

return $data;

}//end zgwToZdsXmlEncodeHandler()


Expand Down

0 comments on commit 433abd7

Please sign in to comment.