Difference between revisions of "Offerit API Ping"
From Offerit
(→Server Request/Response) |
OfferitJames (talk | contribs) (→NuSOAP Example) |
||
Line 6: | Line 6: | ||
== NuSOAP Example == | == NuSOAP Example == | ||
− | This example continues from the [[Offerit_API#Example|main article NuSOAP Example]] | + | This example continues from the [[Offerit_API#Example|main article NuSOAP Example]]: |
<pre> | <pre> |
Revision as of 14:28, 9 December 2011
Ping is a test function to make sure that you can successfully connect to the API.
NuSOAP Example
This example continues from the main article NuSOAP Example:
$result = $client->call('ping', Array(), 'offeritapiadmin_wsdl');
Sample Output
on success: 1 on failure: <no output>
Server Request/Response
Request:
<?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>
Response:
<?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>