“Object reference not set to an instance of an object” error connecting to SOAP server from PHP

后端 未结 2 1090
眼角桃花
眼角桃花 2020-12-11 01:30

I\'m making my first attempt to connect to a SOAP server from PHP, and I\'m not understanding how to log in and get the data I need. The service I\'m trying to connect to i

相关标签:
2条回答
  • 2020-12-11 02:09

    Probably it's not the same case but it also gives the same error if you don't specify empty strings in fields you don't need to use, taken from http://www.sitepoint.com/forums/showthread.php?755549-SOAP-XML-Object-reference-not-set-to-an-instance-of-an-object

    0 讨论(0)
  • 2020-12-11 02:10

    You're close. Looking at the WSDL the InventoryList method takes an object called "request". Modify your call line slightly:

    $client->InventoryList(array("request" => array("LoginId" => $login_id, "Password" => $password));
    
    0 讨论(0)
提交回复
热议问题