Service SOAP d'Ebay de l'Aide SVP | Sujet: Service SOAP d'Ebay de l'Aide SVP par Whaouu sur 11/8/2006 21:07:45
Bonjour, à tous,
Je désire tester les services SOAP d'Ebay.
J'ai importé le service XML fournis pas Ebay et j'ai un exemple en C# pour interroger l'heure du serveur mais je ne parviens pas correctement à le traduire en Windev.
Si une âme charitable pouvait m'aider ?
Voilà le code C# :
using System;
using TesteBaySoap405.com.ebay; // use your project name here
namespace TesteBaySoap405 // use your project name here
{
class GeteBayOfficialTime
{
[STAThread]
static void Main(string[] args)
{
string endpoint = "https://api.sandbox.ebay.com/wsapi";
string callName = "GeteBayOfficialTime";
string siteId = "0";
string appId = "yourAppId"; // use your app ID
string devId = "yourDevId"; // use your dev ID
string certId = "yourCertId"; // use your cert ID
string version = "405";
// Build the request URL
string requestURL = endpoint
+ "?callname=" + callName
+ "&siteid=" + siteId
+ "&appid=" + appId
+ "&version=" + version
+ "&routing=default";
// Create the service
eBayAPIInterfaceService service = new eBayAPIInterfaceService();
// Assign the request URL to the service locator.
service.Url = requestURL;
// Set credentials
service.RequesterCredentials = new CustomSecurityHeaderType();
service.RequesterCredentials.eBayAuthToken = "yourToken"; // use your token
service.RequesterCredentials.Credentials = new UserIdPasswordType();
service.RequesterCredentials.Credentials.AppId = appId;
service.RequesterCredentials.Credentials.DevId = devId;
service.RequesterCredentials.Credentials.AuthCert = certId;
// Make the call to GeteBayOfficialTime
GeteBayOfficialTimeRequestType request = new GeteBayOfficialTimeRequestType();
request.Version = "405";
GeteBayOfficialTimeResponseType response = service.GeteBayOfficialTime(request);
Console.WriteLine("The time at eBay headquarters in San Jose, California, USA, is:");
Console.WriteLine(response.Timestamp);
}
}
}
Par avance merci pour vos conseils.
|
|
Connexion
Menu
Chercher WDForge
Chercher Web
Partenaires
|