PHP SOAP client that understands multi-part messages?

后端 未结 7 608
死守一世寂寞
死守一世寂寞 2020-12-03 03:27

Is there such a beastie? The simple SOAP client that ships with PHP does not understand multi-part messages. Thanks in advance.

7条回答
  •  猫巷女王i
    2020-12-03 04:01

    Just to add more light to previous suggested steps. You must be getting response in following format

        --uuid:eca72cdf-4e96-4ba9-xxxxxxxxxx+id=108
    Content-ID: 
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
    
     content goes here 
    --uuid:c19585dd-6a5a-4c08-xxxxxxxxx+id=108--
    

    Just use following code (I am not that great with regex so using string functions)

     public function __doRequest($request, $location, $action, $version, $one_way = 0)
    {
        $response = parent::__doRequest($request, $location, $action, $version, $one_way);
        // strip away everything but the xml.
        $response = stristr(stristr($response, "", true) . "";
    return $response;
    }
    

提交回复
热议问题