Difference between revisions of "Offerit API Ping"
From Offerit
OfferitJames (talk | contribs) (→Sample Output) |
OfferitJames (talk | contribs) (→Server Request/Response) |
||
Line 26: | Line 26: | ||
==Server Request/Response== | ==Server Request/Response== | ||
− | Request: | + | '''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 35: | Line 35: | ||
</pre> | </pre> | ||
− | Response: | + | '''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/" |
Revision as of 13:29, 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>