I'm doing some testing with LC and the eBay XML API. Basically involves a POST to eBay's server. I'm testing with a simple request - GetOfficialEbayTime (yes it says get but all the eBay requests are POST). I've tested my XML in eBay's API Explorer which allows me to paste my XML code. This was successful. However, using the same headers (and variations to test) and XML it fails using LC's lesson code sample format:
Code: Select all
put "X-EBAY-API-COMPATIBILITY-LEVEL: '1149'" into xCompatLevel put "X-EBAY-API-DEV-NAME: " & devID into xDevID put "X-EBAY-API-APP-NAME: " & appID into xAppID put "X-EBAY-API-CERT-NAME: "& certID into xCertID put "X-EBAY-API-CALL-NAME: GeteBayOfficialTime" into xAPICALL //only interested in message request at this point put "X-EBAY-API-SITEID: 0" into xSiteID //defaulted to USA put "content-type: text/xml" into xContent //default text/xml content /*create request*/ put xCompatLevel & " " & xDevID & " " & xAppID & " " & xCertID & " " & xAPICALL & " " & xSiteID & " " & xContent & " Request Payload: " into Header /*build request*/ put "<?xml version='1.0' encoding='utf-8'?>" into xStep1 put xStep1 & "<GeteBayOfficialTimeRequest xmlns='urn:ebay:apis:eBLBaseComponents'>" into xStep2 put xStep2 & "<RequesterCredentials><eBayAuthToken>xyz....zyx</eBayAuthToken></RequesterCredentials>" into xStep2a put xStep2a & "<ErrorLanguage>en_US</ErrorLanguage>" into xStep3 put xStep3 & "<WarningLevel>High</WarningLevel>" into xStep4 put xStep4 & "</GeteBayOfficialTimeRequest>" into xPayload put tsNetPost("connectionA",serverURL,xHeader,xPayload,"postResponse") into tError
Any ideas? I suspect it is something to do with how the requests are formatted since I know the XML is correct. TIA.