PHP SOAP webservices检索

时间:2017-03-27 20:01:42

标签: php xml web-services soap

我使用SOAP webservices来检索记录。我已经成功地用XML进行了检索,但是我在使用PHP进行相同的调用时遇到了问题。如何将此xml代码转换为php代码?

<soap:Body>
    <query xmlns="http://k.com/type">
        <queryString>Comp_codeid = 0</queryString>
        <entityname>Code</entityname>
    </query>
</soap:Body>

这是我的PHP代码:

    //$data = new SoapVar($object, SOAP_ENC_OBJECT, NULL, NULL, NULL);
    $data = new SoapVar($myId, SOAP_ENC_OBJECT, NULL, NULL, NULL);

    // Prepare the data for sending 
    $company = array( 'queryString' =>$data,'entityname' => 'code',);

0 个答案:

没有答案