直接使用 SoapClient 我得到一个异常:'看起来我们没有 XML 文档',但是通过捕获异常并访问$client->__lastReponse()
我得到了完整的消息 - 在这里描述:http: //www.w3.org/TR/ SOAP 附件#SOAPMultipart
例子:
------=_Part_13_5075710.1359624351743
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <740ABC2FC7835A4DF5526C699A3C302D>
<?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><ns1:GetOneFileResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/"><DataHandler href="cid:8D6C4A5AD0F2C0339324FBFC92417B5C" xsi:type="ns2:DataHandler" xmlns:ns2="DimeGetFileService"/></ns1:GetOneFileResponse></soapenv:Body></soapenv:Envelope>
------=_Part_13_5075710.1359624351743
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Id: <8D6C4A5AD0F2C0339324FBFC92417B5C>
Binary data here
------=_Part_13_5075710.1359624351743--
什么是解析这个的正确方法,假设二进制数据是我的示例请求,作为文本,我试图通过 SOAP 服务下载。
我想在没有任何额外扩展的情况下解决这个问题,例如WSO2,它似乎具有二进制附件 ( MTOM ) 处理能力,但需要扩展