question

surpius_surplus avatar image
0 Likes"
surpius_surplus asked ·

Need a VBA Sample of the API uploadFile for Large Merchant Services

I am in need of a VBA Sample of the API uploadFile for Large Merchant Services. I have tried so many times to upload this file and it is not working. Please include Headers as this is XML over HTTP. I have the XML uploadFile and then I have my XML Bulk Call File full of AddFixedPriceItems but I can not figure out how to combine these files together for the call. Thanks!
apiaddfixedpriceitemxmllarge merchant servicesuploadfilebulk data exchange servicefiletransferservicelarge-merchant-servicesvbafile transfer service
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.

surpius_surplus avatar image
0 Likes"
surpius_surplus answered ·
@memorie_pro Thank you very much this is VERY helpful. This API seems very difficult in comparison to others. I need some clarification please. I have read that I have to have a UUID in the < Data> value to match my "fileAttachment". Is that true because the way your VBA is set up there is no place for the UUID??? In the VBA above it would just place a file location on my PC or wherever I direct it. Example : C:\Users\Station\Documents\Access XML Save Files\New Testing\AddFixedPriceItem.gz I just want to clarify so I can jump this hurdle. Thank you
· Share
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.

memorie_pro avatar image
0 Likes"
memorie_pro answered ·
ReferenceID="yourReferenceID" JobID="yourJobID" UserToken="yourAuthToken" DataFile="ContentOfYourXMLFile" compatLevel="1.5.0" Verb="uploadFile" fileformat="zip" XMLcallAddress="/XML/eBay/XML/Large/"&Verb&".xml" DataZip=Base64Encode(DataFile) SizeZip=len(DataZip) set xmlRequestDoc = Server.CreateObject("MSXML2.DOMDocument") xmlRequestDoc.load(Server.MapPath(XMLCallAddress)) xmlRequestdoc.selectSingleNode(Verb & "Request/fileAttachment/Data").nodeTypedValue=DataZip xmlRequestdoc.selectSingleNode(Verb & "Request/fileAttachment/Size").nodeTypedValue=SizeZip xmlRequestdoc.selectSingleNode(Verb & "Request/fileFormat").nodeTypedValue=FileFormat xmlRequestdoc.selectSingleNode(Verb & "Request/fileReferenceId").nodeTypedValue=ReferenceID xmlRequestdoc.selectSingleNode(Verb & "Request/taskReferenceId").nodeTypedValue=JobID 'Send the Request and Get Response set xmlResponse = PostXmlRequestFT (xmlRequestDoc, verb, CompatLevel, UserToken) 'Check Response exists if xmlResponse is nothing then Response.Write("Request could not be completed") else 'if response has error messages '........ else ' parse the response end if end if end if '************************* Function PostXmlRequestFT (xmlDoc, Verb, CompatLevel,Token) 'Create a new ServerXMLHTTP object to post the request and get the response set xmlRequest = Server.CreateObject("MSXML2.ServerXMLHTTP") ServiceName="FileTransferService" 'set method and server URL FT_URL=" https://storage.ebay.com/FileTransferService"; xmlRequest.open "POST", FT_URL 'Set the required HTTP Headers for the request xmlRequest.setRequestHeader "Content-Type", "text/xml" 'Regulates versioning of the XML interface for the API xmlRequest.setRequestHeader "X-EBAY-SOA-SECURITY-TOKEN", Token xmlRequest.setRequestHeader "X-EBAY-SOA-SERVICE-NAME", ServiceName xmlRequest.setRequestHeader "X-EBAY-SOA-SERVICE-VERSION", CompatLevel xmlRequest.setRequestHeader "X-EBAY-SOA-OPERATION-NAME", verb 'send the request xmlRequest.send xmlDoc If xmlRequest.status = 200 then set PostXmlRequestFT = xmlRequest.responseXML else set PostXmlRequestFT = nothing End If End Function
· Share
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.

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.