Difference between revisions of "Offerit API Ping"
From Offerit
OfferitJames (talk | contribs) (→NuSOAP Example) |
|||
Line 3: | Line 3: | ||
}} | }} | ||
Ping is a test function to make sure that you can successfully connect to the API. | Ping is a test function to make sure that you can successfully connect to the API. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== NuSOAP Example == | == NuSOAP Example == | ||
Line 42: | Line 23: | ||
[[Category:Offerit API Articles]] | [[Category:Offerit API Articles]] | ||
+ | |||
+ | ==Server Request/Response== | ||
+ | |||
+ | <pre> | ||
+ | <?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> | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | <?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> | ||
+ | </pre> |
Revision as of 16:09, 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
<?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>
<?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>