vb6 - eBay trading API run-time error when sending request -


i having problems sending getebaydetails request. use code (vb6, yes know) findpopularitems, getebaytime, etc, , works fine.

private sub command1_click()  dim httpcnct xmlhttp40 dim xmldoc freethreadeddomdocument40 dim ebayurl string dim devid string dim appid string dim certid string dim xmlstring string dim ebaytoken string dim title string dim itemid string dim price string  ebayurl = "http://open.api.sandbox.ebay.com/shopping?"  set httpcnct = createobject("msxml2.xmlhttp.4.0")  httpcnct.open "post", ebayurl, false  httpcnct.setrequestheader "x-ebay-api-app-id", appid httpcnct.setrequestheader "x-ebay-api-version", "857" httpcnct.setrequestheader "x-ebay-api-site-id", "3" httpcnct.setrequestheader "x-ebay-api-call-name", "findpopularitems" httpcnct.setrequestheader "x-ebay-api-request-encoding", "xml"  xmlstring = "<?xml version=""1.0"" encoding=""utf-8""?>" & _   "<findpopularitemsrequest xmlns=""urn:ebay:apis:eblbasecomponents"">" & _   "<querykeywords>camera</querykeywords>" & _   "</findpopularitemsrequest>"  httpcnct.send xmlstring  'xmldoc   sending raw string works. 

....

but when modify code slightly, using url, headers , xml api test tool, this:

ebayurl = "https://api.sandbox.ebay.com/ws/api.dll"  set httpcnct = createobject("msxml2.xmlhttp.4.0")  httpcnct.open "post", ebayurl, false  httpcnct.setrequestheader "x-ebay-api-app-id", appid httpcnct.setrequestheader "x-ebay-api-cert-name", certid httpcnct.setrequestheader "x-ebay-api-version", "903" httpcnct.setrequestheader "x-ebay-api-site-id", "0" httpcnct.setrequestheader "x-ebay-api-call-name", "getebaydetails" httpcnct.setrequestheader "x-ebay-api-request-encoding", "xml"  xmlstring = "<?xml version=""1.0"" encoding=""utf-8""?>" & _  "<getebaydetailsrequest xmlns=""urn:ebay:apis:eblbasecomponents"">" & _  "<requestercredentials> <ebayauthtoken>" & ebaytoken &     "</ebayauthtoken>" & _  "</requestercredentials> </getebaydetailsrequest>"  httpcnct.send xmlstring  'xmldoc   sending raw string works. 

i

run-time error '-2146697208 (800c0008)': download of specified resource has failed

ebaytoken set token.devid, appid, certid set ealier in program , same in both instances.the xml okay, headers , url api test tool. got idea what's going on here? thanks


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -