Difference between revisions of "Offerit API Ping"
From Offerit
(→Server Request/Response) |
(→Server Request/Response) |
||
Line 25: | Line 25: | ||
==Server Request/Response== | ==Server Request/Response== | ||
− | + | ||
+ | Request: | ||
<pre> | <pre> | ||
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | ||
Line 33: | Line 34: | ||
</SOAP-ENV:Body></SOAP-ENV:Envelope> | </SOAP-ENV:Body></SOAP-ENV:Envelope> | ||
</pre> | </pre> | ||
− | |||
− | + | Response: | |
<pre> | <pre> | ||
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | ||
Line 43: | Line 43: | ||
</ns1:pingResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> | </ns1:pingResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> | ||
</pre> | </pre> | ||
− |
Revision as of 16:27, 25 October 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>