C# en Wlanguage

Posté par romano le 5/7/2006 16:43:59
Bonjour a tous, j'ai un code en C# utilisant les services WEB, je n'arrive pas a l'adapter en Wlanguage... sa fait 5 jour que je suis dessus si quelqun pourrai m'aiguiller sa serai sympa :)

Cordialement

Romain.

//--------------
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);
}
}
}

Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=17&topic_id=4313&post_id=17805