SoapServer/Client now handle binary files correctly & large tests/fixtures update
Soap Server and Client were breaking binary files during transfer due to invalid Mime Message Parser. Now is it working fine with no errors, but the message parser is about to be rewritten into a better form.
This commit is contained in:
27
tests/Fixtures/DummyServiceHandlerWithIncomingLargeSwa.php
Normal file
27
tests/Fixtures/DummyServiceHandlerWithIncomingLargeSwa.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Fixtures;
|
||||
|
||||
class DummyServiceHandlerWithIncomingLargeSwa
|
||||
{
|
||||
/**
|
||||
* @param DummyServiceMethodWithIncomingLargeSwaRequest $request
|
||||
* @return DummyServiceMethodWithIncomingLargeSwaResponse
|
||||
*/
|
||||
public function handle(DummyServiceMethodWithIncomingLargeSwaRequest $request)
|
||||
{
|
||||
if ($request->hasAttachments() === true) {
|
||||
foreach ($request->attachmentCollection->attachments as $attachment) {
|
||||
file_put_contents(
|
||||
__DIR__.'/../../cache/attachment-server-request-'.$attachment->fileName,
|
||||
$attachment->content
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$response = new DummyServiceMethodWithIncomingLargeSwaResponse();
|
||||
$response->status = true;
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user