question

crazy-4689 avatar image
0 Likes"
crazy-4689 asked

An Interesting Error in Calling GetItem

Hello, I don't understand why they haven't returned even though we've asked for help on many issues. There is a different error here. I want to make a GetItem call with C #. However, I get this error message in return.

ERROR TITLE:
Possible SOAP version mismatch: urn: ebay: apis: eBLBaseComponents envelope namespace was not expected. Expected: http://schemas.xmlsoap.org/soap/envelope



CallItem Object I'm trying to call:

        public static eBayAPIInterfaceService eBayServiceCall(string CallName)
        {

            string endpoint = "https://api.ebay.com/ws/api.dll";
            string siteId = "0";
            string appId = AppSettingsHelper.AppID;     // use your app ID
            string devId = AppSettingsHelper.DevID;     // use your dev ID
            string certId = AppSettingsHelper.CertID;   // use your cert ID
            string version = "967";
            // Build the request URL 
            string requestURL = endpoint
            + "?callname=" + CallName
            + "&siteid=" + siteId
            + "&appid=" + appId
            + "&version=" + version
            + "&routing=default";

            eBayAPIInterfaceService service = new eBayAPIInterfaceService();
            // Assign the request URL to the service locator.
            service.Url = requestURL;
            // Set credentials
            service.RequesterCredentials = new CustomSecurityHeaderType();
            service.RequesterCredentials.eBayAuthToken = AppSettingsHelper.Token;    
            service.RequesterCredentials.Credentials = new UserIdPasswordType();
            service.RequesterCredentials.Credentials.AppId = appId;
            service.RequesterCredentials.Credentials.DevId = devId;
            service.RequesterCredentials.Credentials.AuthCert = certId;
            return service;
        }


The section where I return responses to the call (Request - Response)

        protected void Page_Load(object sender, EventArgs e)
        {
            eBayAPIInterfaceService service = EbayCalls.eBayServiceCall("GetItem");
            GetItemRequestType request = new GetItemRequestType();
            request.Version = "";
            request.ItemID = "";
            request.WarningLevel = WarningLevelCodeType.High;

            GetItemResponseType response = service.GetItem(request);
            response.Item.Title.ToString();
        }


Output Message:

ERROR TITLE:
Possible SOAP version mismatch: urn: ebay: apis: eBLBaseComponents envelope namespace was not expected. Expected: http://schemas.xmlsoap.org/soap/envelope

Where the test works properly;
https://developer.ebay.com/DevZone/build-test/test-tool/?index=0&env=production&api=trading&call=GetItem&variation=xml

Selected Api = Tranding API
Call Name    = GetItem
Security = Auth'n'auth
end Point = https://api.ebay.com/ws/api.dll














getitem
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.