问题
I'm writing some code to talk to a web service via WSDL-SOAP. I'm using php5's native soap implementation. So far so good.
However I now need to download files as "attachments" over soap. The interwebs is mysteriously silent on how to do this. Surely its possible or the PHP docs would mention it as a limitation ? :\ I did this a few years ago with Pear soap but would really prefer to use the native Soap implementation.
回答1:
Please see my answer here. Perhaps this may be helpful.
回答2:
Considering this discussion on the PHP Soap Mailing List, it doesn't seem to be possible :
Guilhem Martin wrote:
> Hello all,
>
> I was not able to find in the PHP SOAP documentation anything about sending
> attachment.
> So my question is: does PHP SOAP extension support SOAP attachment?
>
No.
Samisa...
But there isn't much detail about it...
Still, I've never seen a file being attached to a SOAP request in PHP
来源:https://stackoverflow.com/questions/1529263/file-attachements-with-php5-soap