question

colonialmedical avatar image
0 Likes"
colonialmedical asked ·

Ebay LMS uploadFile API not working, please help

<p>We have the trading api workign great, but it takes forever to upload products this way, considering we have 20,000+ items to list.&nbsp; I was told to use the file transfer api to upload a large volume of listings, the only problem is the documentation and api itself seem very flawed.&nbsp; I have searched google for hours trying to find a solution to this and no such luck.&nbsp; If anyone can help it would be greatly appretiated.&nbsp; We are trying to upload a gzip file in base64 encoding to ebay, below is the PHP code.</p><p>&nbsp;</p><p><span style="background-color:#daa520;">## FILE TRANSFER REQUEST&nbsp;</span>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</p><p>$timeout=60;<br />$target=&quot;https://storage.ebay.com/FileTransferService&quot;;&nbsp;&nbsp; &nbsp;<br /><br />$headers=array(&nbsp;&nbsp; &nbsp;&#39;CONTENT-TYPE:text/xml&#39;,<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&#39;X-EBAY-SOA-OPERATION-NAME:uploadFile&#39;,<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&#39;X-EBAY-SOA-SECURITY TOKEN:lTiVPOFZgjSd8guGWZHBvFJiAEv7zJqkyqh9gCM+SNa1HZjGp&#39;,<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&#39;X-EBAY-SOA-SERVICE-NAME:FileTransferService&#39;<br />);<br /><br />$request=&#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;BulkDataExchangeRequests&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Header&gt;&lt;Version&gt;795&lt;/Version&gt;&lt;SiteID&gt;0&lt;/SiteID&lt;/Header&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;AddFixedPriceItemRequest xmlns=&quot;urn:ebay:apis:eBLBaseComponents&quot;&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Item ComplexType=&quot;ItemType&quot;&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ApplicationData&gt;54524&lt;/ApplicationData&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;AutoPay&gt;true&lt;/AutoPay&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Country&gt;US&lt;/Country&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Currency&gt;USD&lt;/Currency&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Description&gt;&lt;![CDATA[&lt;strong&gt;Merchant Sku: &lt;/strong&gt;54524&lt;br&gt;&lt;br&gt;&lt;strong&gt;Shipping Weight: &lt;/strong&gt;8.00 oz&lt;br&gt;&lt;br&gt;&lt;strong&gt;Dimensions: &lt;/strong&gt;13.00&quot;L X 7.50&quot;W&lt;br&gt;&lt;br&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;br&gt;Stay warm and cozy all year long with the Hot Water Bottle. Made with natural and durable rubber latex, the Hot Water Bottle conforms to the contours of your body while the ribbed outer surface helps keep the contents hot. The bottle is 7.5 inches wide and 13 inches long and can hold up to two quarts of water. The Hot Water Bottle has a strong plastic cap with a small handle that twists easily, securing the bottle and preventing water from leaking out. The bottle is perfect for heat therapy on sore, tense muscles and can also be filled with cold water and used as an ice pack.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Durable rubber latex helps retain desired temperature.&lt;/li&gt;&lt;li&gt;Can be used for heat therapy or as an ice pack.&lt;/li&gt;&lt;li&gt;Strong plastic cap prevents leaks.&lt;/li&gt;&lt;li&gt;Holds up to 2 quarts of water.&lt;/li&gt;&lt;li&gt;Lifetime limited warranty.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;br&gt;]]&gt;&lt;/Description&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;HitCounter&gt;NoHitCounter&lt;/HitCounter&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ListingDetails&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PayPerLeadEnabled&gt;false&lt;/PayPerLeadEnabled&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/ListingDetails&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ListingDuration&gt;GTC&lt;/ListingDuration&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ListingType&gt;FixedPriceItem&lt;/ListingType&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Location&gt;Nashua, NH&lt;/Location&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PaymentMethods&gt;PayPal&lt;/PaymentMethods&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PayPalEmailAddress&gt;itspaypal@paypal.com&lt;/PayPalEmailAddress&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PrimaryCategory&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;CategoryID&gt;1277&lt;/CategoryID&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/PrimaryCategory&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Quantity&gt;500&lt;/Quantity&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingDetails&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;GlobalShipping&gt;false&lt;/GlobalShipping&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingServiceOptions&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingService&gt;ShippingMethodStandard&lt;/ShippingService&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingServiceCost&gt;0&lt;/ShippingServiceCost&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingServiceAdditionalCost&gt;0&lt;/ShippingServiceAdditionalCost&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingServicePriority&gt;1&lt;/ShippingServicePriority&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;FreeShipping&gt;false&lt;/FreeShipping&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/ShippingServiceOptions&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingType&gt;Flat&lt;/ShippingType&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/ShippingDetails&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Site&gt;US&lt;/Site&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;StartPrice&gt;11.95&lt;/StartPrice&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Storefront&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;StoreCategoryID&gt;2756431010&lt;/StoreCategoryID&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/Storefront&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;SubTitle&gt;&lt;/SubTitle&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Title&gt;&lt;![CDATA[Hot Water Bottle]]&gt;&lt;/Title&gt;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;DisableBuyerRequirements&gt;false&lt;/DisableBuyerRequirements&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;SKU&gt;54524&lt;/SKU&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;CategoryBasedAttributesPrefill&gt;false&lt;/CategoryBasedAttributesPrefill&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PostalCode&gt;03063&lt;/PostalCode&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingTermsInDescription&gt;false&lt;/ShippingTermsInDescription&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PictureDetails&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;GalleryType&gt;None&lt;/GalleryType&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PhotoDisplay&gt;None&lt;/PhotoDisplay&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PictureURL&gt;http://www.colonialmedical.com/imgsize.php?w=320&amp;amp;img=images/deta... />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PictureSource&gt;Vendor&lt;/PictureSource&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ExternalPictureURL&gt;http://www.colonialmedical.com/imgsize.php?w=320&amp;amp;img=images/deta... />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/PictureDetails&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;DispatchTimeMax&gt;3&lt;/DispatchTimeMax&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;SkypeEnabled&gt;false&lt;/SkypeEnabled&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ReturnPolicy&gt;&lt;RefundOption&gt;MoneyBack&lt;/RefundOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ReturnsWithinOption&gt;Days_30&lt;/ReturnsWithinOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ReturnsAcceptedOption&gt;ReturnsAccepted&lt;/ReturnsAcceptedOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Description&gt;Must be in resaleable condition for return.&lt;/Description&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;WarrantyOfferedOption&gt;&lt;/WarrantyOfferedOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;WarrantyTypeOption&gt;&lt;/WarrantyTypeOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;WarrantyDurationOption&gt;&lt;/WarrantyDurationOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;EAN&gt;&lt;/EAN&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ShippingCostPaidByOption&gt;Buyer&lt;/ShippingCostPaidByOption&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/ReturnPolicy&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;InventoryTrackingMethod&gt;SKU&lt;/InventoryTrackingMethod&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ConditionID&gt;1000&lt;/ConditionID&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ConditionDescription&gt;New&lt;/ConditionDescription&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;PostCheckoutExperienceEnabled&gt;false&lt;/PostCheckoutExperienceEnabled&gt;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;UnitInfo&gt;&lt;UnitType&gt;&lt;/UnitType&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;UnitQuantity&gt;1&lt;/UnitQuantity&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/UnitInfo&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/Item&gt;&nbsp;&nbsp; &nbsp;&lt;Version&gt;795&lt;/Version&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;WarningLevel&gt;Low&lt;/WarningLevel&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/AddFixedPriceItemRequest&gt;<br />&lt;/BulkDataExchangeRequests&gt;&#39;;<br /><br />$zipbuffer = gzencode($request, 5);<br /><br />$xml=&#39;&nbsp;&nbsp; &nbsp;&lt;?xml version=\&#39;1.0\&#39; encoding=\&#39;UTF-8\&#39;?&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;uploadFileRequest xmlns:sct=&quot;http://www.ebay.com/soaframework/common/types&quot; xmlns=&quot;http://www.ebay.com/marketplace/services&quot;&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;taskReferenceId&gt;5080784280&lt;/taskReferenceId&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileReferenceId&gt;5070043310&lt;/fileReferenceId&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileFormat&gt;gzip&lt;/fileFormat&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileAttachment&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;Data&gt;&#39;.base64_encode($zipbuffer).&#39;&lt;/Data&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/fileAttachment&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/uploadFileRequest&gt;&#39;;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$ch=curl_init();<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_URL, $target);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_POST, 1);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$resp=curl_exec($ch);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$error=curl_error($ch);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$http_code=curl_getinfo($ch ,CURLINFO_HTTP_CODE);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;curl_close($ch);<br /><br /><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; The response we get from ebay is</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5006CoreRuntimeErrorSystemUnable to create xml stream reader for XML: payload format incorrect or payload is emptyComm_RecvXML</p><p>&nbsp;</p><p>&nbsp;</p><p>any help would be greatly appreciated, this is very frustrating!!!<br />&nbsp;</p>

lms-uploadfile-erroruploadfile
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.

colonialmedical avatar image
1 Like"
colonialmedical answered ·

I hate this site.

· 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.

davidtsadler avatar image
0 Likes"
davidtsadler answered ·

Hello,

 

The error message that you are getting is due to space characters appearing at the start of your xml request string.  The spaces are appearing in the line of code below.

 

$xml='    <?xml version=\'1.0\' encoding=\'UTF-8\'?>

 

Remove the spaces so that they are not part of the xml.

 

$xml=' <?xml version=\'1.0\' encoding=\'UTF-8\'?>

 

In addition the xml for the AddFixedPriceItemRequest is missing a few closing tags. I have taken the liberty of slightly editing your code and creating a Gist found here https://gist.github.com/4041969

 

I have also found on the eBay Knowledge Base an article about LMS that provides some example PHP code  for downloading. I have to admit I have not tried this code so I can't vouch as to how good or bad it is.

 

https://ebaydts.com/eBayKBDetails?KBid=1472

 

Kind Regards,

David

· 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.

colonialmedical avatar image
0 Likes"
colonialmedical answered ·

Formatting error, and of course I cant edit my post.  Typical.

· 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.