How to invoke eTapestry API [closed]
开发者_StackOverflow中文版
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI need information / Sample examples about eTapestry API.
Thanks, Koustubh
The primary documentation for the eTapestry API (including code samples) can be found at http://www.etapestry.com/files/api/home.html. You'll need a sandbox account from https://atl.etapestry.com/prod/APIWebOrder.jsp in order to have a system to test your code against.
For better understanding of eTapestry API please visit :
http://www.etapestry.com/files/api/home.html
Sample code for Login Method:
require("lib/utils.php");
require("lib/nusoap.php");
// Set login details and initial endpoint
$loginId = "INPUT_LOGIN_ID";
$password = "INPUT_PASSWORD";
$endpoint = "https://sna.etapestry.com/v2messaging/service?WSDL";
// Instantiate nusoap_client
echo "Establishing NuSoap Client...";
$nsc = new nusoap_client($endpoint, true);
echo "Done";
// Did an error occur?
checkStatus($nsc);
// Invoke login method
echo "Calling login method...";
$newEndpoint = $nsc->call("login", array($loginId, $password));
echo "Done";
// Did a soap fault occur?
checkStatus($nsc);
// Determine if the login method returned a value
if ($newEndpoint != "")
{
echo "New Endpoint: $newEndpoint";
// Instantiate nusoap_client with different endpoint
echo "Establishing NuSoap Client with new endpoint...";
$nsc = new nusoap_client($newEndpoint, true);
echo "Done";
// Did an error occur?
checkStatus($nsc);
// Invoke login method
echo "Calling login method...";
$nsc->call("login", array($loginId, $password));
echo "Done";
// Did a soap fault occur?
checkStatus($nsc);
}
// Output results
echo "Login Successful";
// Call logout method
stopEtapestrySession($nsc);
精彩评论