You are required to implement a PHP SOAP based Web Service and demonstrate its operation through the implementation of suitable client and server code.
The web service must:
• provide a function called xquery which takes a single string parameter representing an XQuery statement and returns a string (xml) representing the results of the query.
• provide the means to catch, return and report errors as appropriate.
• utilise the functionality and features of PHeXist to process XQuery statements upon xml stored in an eXist XML database.