0

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',);
Sara
  • 1
  • 2
  • This might help http://stackoverflow.com/questions/11593623/how-to-make-a-php-soap-call-using-the-soapclient-class – Trent Mar 27 '17 at 20:24
  • There's no need to create a specific class. A stdClass can do the job as well: http://stackoverflow.com/questions/40994425/webservice-soap-request-wrong-type-of-data-sent/41101969#41101969 – Gabriel Heming Mar 27 '17 at 20:33
  • Is any book that I can refer to ?I am really struggling here.. – Sara Mar 29 '17 at 13:09

0 Answers0