Get received XML from PHP SOAP Server

后端 未结 2 1413

I\'m using the build-in SOAP-Server within a symfony2 application and beside handling the StdClass-Object, I would need to read the complete xml received for debugging and l

2条回答
  •  温柔的废话
    2021-01-04 20:39

    I was looking for the same thing and finally found it. Hope this helps you or someone else.

    $postdata = file_get_contents("php://input");
    

    The $postdata variable will have the raw XML. Found through the following two links:

    http://php.net/manual/en/reserved.variables.httprawpostdata.php

    http://php.net/manual/en/soapserver.soapserver.php

提交回复
热议问题