小编JPe*_*son的帖子

PHP - 扩展SoapClient以处理SWA(带附件的SOAP)

我正在尝试处理来自Java SOAP服务的SWA响应.在SWA响应中,附加到XML末尾的二进制附件以及一些MIME头.我不能将WSO2用于依赖性要求限制.

任何帮助将非常感激!

// Input

------=_Part_42_539586119.1332526191981
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <03B4708A9544C182C43E51D9ADA1E456>

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body> ... TRUNCATED XML SOAP RESPONSE ... </soapenv:Body></soapenv:Envelope>

------=_Part_42_539586119.1332526191981
Content-Type: image/png
Content-Transfer-Encoding: binary
Content-Id: <D637B1257E3E5EEA06AF0E45494F8448>

BINARY DATA GOES HERE


// End of input
Run Code Online (Sandbox Code Playgroud)

//分割响应的脚本+返回StdObj就像父类SoapClient +对文件做一些事情

namespace Project;
class SoapClient extends \SoapClient
{
    public function __call ($function_name, $arguments)
    {
        // have the parent do a soap call, catch the lastResponse() if an error
        // occurred (eg has an attachment) and parse it out. …
Run Code Online (Sandbox Code Playgroud)

php soap

5
推荐指数
1
解决办法
3412
查看次数

标签 统计

php ×1

soap ×1