Offerit API Ping
From Offerit
Revision as of 15:06, 25 October 2011 by OfferitJames (talk | contribs) (Created page with "{{Offerit Manual | show_api_admin_section = true }} Ping is a test function to make sure that you can successfully connect to the API. <pre> <?xml version="1.0" encoding="ISO-88...")
Ping is a test function to make sure that you can successfully connect to the API.
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:offeritapiadmin_wsdl"><SOAP-ENV:Body><tns:ping xmlns:tns="urn:offeritapiadmin_wsdl"></tns:ping> </SOAP-ENV:Body></SOAP-ENV:Envelope>
You will get a response similar to the following:
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body><ns1:pingResponse xmlns:ns1="urn:offeritapiadmin_wsdl"><return xsi:type="xsd:boolean">true</return> </ns1:pingResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
NuSOAP Example
This example continues from the main article NuSOAP Example):
$values = Array(); $result = $client->call('ping', Array(), 'offeritapiadmin_wsdl');
Sample Output
on success: 1 on failure: <no output>