For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

.NET sample in C# for making a SOAP call to a non-US site

  • Answer ID 1087
  • Published 06/14/2007 03:22 PM
  • Updated 10/20/2013 06:41 AM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=1087
Product
I need to make a GeteBayDetails call to get the ShippingServices for UK using SOAP. How should I specify the site?
Summary

You need to specify the required siteid in the server URL against which you are making the SOAP request.  For instance, if you are need to get the shipping services for UK, you need to set the numeric value of the siteid parameter to 3.

Detailed Description

Here is a C# .NET example for making a SOAP call to GeteBayDetails for getting the Shipping Services for UK.  In this sample, eBaySOAP is a reference to the eBay Web Service.  

You can add a web reference to the latest version of the WSDL using the following url:
http://developer.ebay.com/webservices/latest/ebaySvc.wsdl

 
>

private void SOAPCall()

{

    eBaySOAP.eBayAPIInterfaceService service = new eBaySOAP.eBayAPIInterfaceService();

    string endpoint = "https://api.sandbox.ebay.com/wsapi";

    string callName = "GeteBayDetails";

    string siteId = "3";

    string appId = "appid"; //use your app ID

    string devId = "devid"; //use your dev ID

    string certId = "certid"; //use your cert ID

    string version = "515";

 

    // Build the request URL and set the siteid

    string requestURL = endpoint + "?callname=" + callName
                        + "&siteid=" + siteId
                        + "&appid=" + appId + "&version=" + version + "&routing=default";

 

    // Assign the request URL to the servicelocator.

    service.Url = requestURL;

 

    // Set credentials

    service.RequesterCredentials = new eBaySOAP.CustomSecurityHeaderType();

    service.RequesterCredentials.eBayAuthToken = "token"; //use your token

    service.RequesterCredentials.Credentials = new eBaySOAP.UserIdPasswordType();

    service.RequesterCredentials.Credentials.AppId = appId;

    service.RequesterCredentials.Credentials.DevId = devId;

    service.RequesterCredentials.Credentials.AuthCert = certId;

 

    eBaySOAP.GeteBayDetailsRequestType request = new eBaySOAP.GeteBayDetailsRequestType();

    request.DetailName = new eBaySOAP.DetailNameCodeType[1];

    request.DetailName.SetValue(eBaySOAP.DetailNameCodeType.ShippingServiceDetails, 0);

    request.Version = version;

    eBaySOAP.GeteBayDetailsResponseType response = service.GeteBayDetails(request);

 

}

 


Version Info

The code example above was based on the versions specified below:

API Schema Version 515


Additional Resources


How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter