Home:ALL Converter>PHP SOAP webservices retrieval

PHP SOAP webservices retrieval

Ask Time:2017-03-28T04:01:41         Author:Sara

Json Formatter

I am using SOAP webservices to retrieve records. I have managed to make a successful retrieval in XML, However I am having problems making the same call in PHP. How do I convert this xml code into php code?

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

and this is my php code:

    //$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',);

Author:Sara,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/43055440/php-soap-webservices-retrieval
yy