开发者

Zend_Soap with attachments (server)

i'm trying to build a SOAP service with Zend_Soap. Everything is working great but the client needs the ability to send attachments to the service (not base64 encoded strings, as this service will be called multiple times a day with various file sizes so processing all that in memory is not possible.

So I'd like to handle a normal SOAP attachment (DIME/MIME) with the SOAP server in Zend Framework h开发者_如何学编程owever I'm unable to find documentation about it. Can I access it with $_FILES[] or any other way? Is it even possible in Zend_Soap (as there's not that much info available).

SOAP is a must - so thanks for the advice but it has to be SOAP, not REST.


SOAP attachments are not implemented in the standard PHP SoapServer/SoapClient classes and therefore not available in Zend_Soap which is mainly a wrapper for these.

AFAIK only the PEAR::SOAP class supports attachments but honestly, I gave up and convinced everyone to use base64encoded strings...

I found this blog post describing at least a client solution with PEAR: http://www.casarini.org/blog/2009/php-soap-messages-with-attachments/


I wrote class to add Soap with Attachments support to PHP5's native SoapServer. Usage example is in phpdoc, class itself is located at http://juks.alkohol.ee/tools/attic/PHP/MultipartRawPostHelper.php.txt

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜