So the error is:
PHP Fatal error: Procedure 'sup:set_availability' not present in XMLSoapServer.php
I am receiving this error on my development environment (MAMP).
This is caused by an invalid XML string, in wich the 'sup' namespace isn't defined:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<sup:set_availability>
<SetAvailability>
...
</SetAvailability>
</sup:set_availability>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
(It's an external request, so I can't just go and correct the source - well I can, but atleast not on a short notice.)
The problem is that I got 2 servers that are processing the same request. Without the error. So my quest is to find out why :)
Some details:
Things I have checked so far:
Server 1 has version 2.6.26 server 2 has version 2.7.7 - on which the request works like a charm My dev environment has lixml2 version 2.8.0 - and does throw the fatal error.
My guess is (or was) that libxml2 is causing the errors - but I can't find any resource on this topic - neither was I succesfull to downgrade my local libxml2 version to 2.6 or 2.7.
So... any thoughts on this?
I don't know what the problem is ... but since the native PHP SoapClient always seemed a bit "opaque" to me, I like to use the Dklab_SoapClient library.
It uses Curl to retrieve Soap data and it is much more flexible than the native PHP class. Plus you can even extends it to add your own functionnaly if you need too :) I am guessing it would solve your problem.
However, if you dont want to use an external library, I don't have a clue what might cause this ...
I think missing variable in passed to soap client.Check with with soap client working or not
I'll suggest a different angle for fixing this problem.
Instead of breaking your XML parser you could modify the request before giving it to your XML parser. Add the sup
namespace to the request if it isn't present. Preferably push this change to production and update/fix your production XML parsers.
Once the external source gets their software working remove this hack.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With