Search code examples
phpsoapwsdlsoap-clientnusoap

NuSOAP - Undefined index: namespace error


I have a working service utilising NuSOAP v0.9.5, writing data to a web service.

As soon as I try to retrieve data (or even use the existing code) to do something else, I'm getting an Undefined index: namespace error (line 1499/1500) from NuSOAP.

As someone not fluent in SOAP, wondering if anyone has some pointers on debugging/what to look for.

Here's a gist with my class that interacts with the WSDL service: https://gist.github.com/aleayr/de79995554c09695cde0

Things to note:

The createTicket() function works, however, it fails with the undefined namespace index error if I call it from a different script to the one that it currently works in.

The updateTicket() function has never worked, throws the undefined namespace index error, despite using virtually the same code.

The error appears to be when $this->wsdl_client->call is invoked.

I've tried using $this->wsdl_client->request and $this->wsdl_client->response to view the XML from the successful request, but when the error happens, it's in the client and I can't work out why it's failing.

Any thoughts as to where I should start?


Solution

  • Solved this by replacing NuSOAP with PHP's SOAP library, used this Gist for getting NTLM support: https://gist.github.com/niczak/2003485

    I modified to the purposes of interacting with the system I'm getting data from rather than Exchange in that example.