I use the PHP nusoap_client library to query a WSDL, this WSDL has an attachment in PDF format that I need to download, and try the following code
$response = $client->response;
$filename = "recibo";
$destination = dirname(__FILE__) . '/'.$filename.'.pdf';
$file = fopen($destination, "w+");
fputs($file, $response);
fclose($file);
But I do not save it correctly, check the WSDL with SOAP UI and if you send the PDF correctly, you know some other way to download the PDF.
This receipt from the WSDL
%PDF-1.2
%���
1 0 obj
<< /Type /Page
/Parent 3 0 R
/Resources 4 0 R
/Contents 2 0 R
>> endobj
2 0 obj <>
Thank you.