PHP, SOAP and the eBay API
Posted: Fri Jan 11, 2008 9:19 am
Having a few problems with the eBay API when submitting new items (hardly any decent doc's anywhere about this feature).
I have the following code
I then get the following 'cryptic' response.
I have the following code
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns="urn:ebay:api:eBayAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:urn="urn:ebay:apis:CoreComponentTypes"><SOAP-ENV:Header>
<ns:RequesterCredentials SOAP-ENV:mustUnderstand="0" xmlns:ns="urn:ebay:api:eBayAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents">
<ebl:eBayAuthToken>YOUR AUTH & AUTH TOKEN</ebl:eBayAuthToken>
<ebl:Credentials xmlns:ebl="urn:ebay:apis:eBLBaseComponents">
<ebl:AppId xmlns:ebl="urn:ebay:apis:eBLBaseComponents">MalcolmB-8209-436e-ac64-f9850f5edd47</ebl:AppId>
<ebl:DevId xmlns:ebl="urn:ebay:apis:eBLBaseComponents">88f73c86-d910-4404-a21e-1a218bc17961</ebl:DevId>
<ebl:AuthCert xmlns:ebl="urn:ebay:apis:eBLBaseComponents">b60a7ef3-1b50-46b0-9ad2-147384f21a9d</ebl:AuthCert>
</ebl:Credentials>
</ns:RequesterCredentials>
</SOAP-ENV:Header><SOAP-ENV:Body>
<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>AgAAAA**AQAAAA**aAAAAA**312HRw**nY+sHZ2PrBwFk4CpAJCBqQudj6x9nY+seQ**BNIAAA**AAMAAA**w7Q0h8EQedq5cHUdpFvnctxphOr9kAvg7nMnNs7DquEnKmQvbrqJy4Tcz6oJNWmMxThn4eBfhQDIWwrinu0vVFUCvQfsej17wa6jm0VH1rRWTB0q1DvfGJFozGd6mOovZupLz3iTWKhKm7WLi7DbV43Q97lLLXihBwCFp+9hsKODbWpSLVarr33e4poOcNXE9QJaUSpupzxFX6dlcQ9lXR0U6du1fNdDv4cvk7w5VtbszGMUXaDICVYP+cOzMto7tE+c1652bWT9X2ELFKDBHTSXWquensdwoZ/Own+XUIsnDVWWzilfdkXieK1L/joUVINwWld2XJ1p7rIFBHRkSRGmD106fCl8olBnbXirdN80nkZ3ludHNyWA98YTXgzhTp8dFbrQuiwdY9tPUGGMuYZvdCqwbcTlsbBHJb623sRse3olKlOcvwwpm9QtHFi6M1UIY0k70yYa45rSZajoUL8uwSQVvBIIHLpvzwdIM5NgsRjNZljNFccrBdgg1IJI4S23XUvAAejvzeoaNR5KV4EqQLm2gM8edoHMFXBkA4ODWqsyzOCWvB1F50rlJn+izsVhec8n7w/pTAQY5LxoqBs2et237Pb1tpwgNy6OkgJ1XdBJInDNVCaE2g/oP22U2pohfb7v0hLZB9MF7hhL2CzNlNTNOsauLzqXXvqNY6EsRTREEA4PdgUXgDGqchM9VQAz52aFNMV/D4iGQsf3x4qbmi3/GOKNpT2FwXb8BDZVjNFXTCT/H262X2yB/YS5</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_UK</ErrorLanguage>
<Version>451</Version>
<Item>
<ApplicationData>Local_Inventory_XXX</ApplicationData>
<Country>UK</Country>
<Currency>GBP</Currency>
<Description>
<ul>
<li>100% leather Keychain from Carhartt</li>
<li>Metallic Carhartt logo button fastener</li>
</ul><h2>Check out more at <a href="http://www.redsquareclothing.co.uk">Red Square Clothing</a>!</h2>
</Description>
<ListingDuration>Days_10</ListingDuration>
<ListingType>English</ListingType>
<Location>Middlesbrough, England</Location>
<PaymentMethods>Paypal</PaymentMethods>
<PayPalEmailAddress>paypal@redsquareclothing.co.uk</PayPalEmailAddress>
<PictureDetails>
<GalleryURL>http://www.redsquareclothing.co.uk/70703b.jpg</GalleryURL>
<GalleryType>Gallery</GalleryType>
<PictureURL>http://www.redsquareclothing.co.uk/70703b.jpg</PictureURL>
</PictureDetails>
<PostalCode>TS1 4AG</PostalCode>
<PrimaryCategory>
<CategoryID>11450</CategoryID>
</PrimaryCategory>
<SecondaryCategory>
<CategoryID>xxxxx</CategoryID>
</SecondaryCategory>
<Quantity>1</Quantity>
<ShippingDetails>
<ShippingServiceOptions>
<ShippingServiceCost>2.95</ShippingServiceCost>
<ShippingService>Other</ShippingService>
</ShippingServiceOptions>
</ShippingDetails>
<ShippingTerms>BuyerPays</ShippingTerms>
<Site>UK</Site>
<StartPrice currencyID="GBP">14.99</StartPrice>
<Title>CARHARTT LOGO KEYCHAIN - BNWT! SIZE REGULAR</Title>
</Item>
</AddItemRequest>Code: Select all
Response HTTP/1.1 500 Internal Server Error Date: Fri, 11 Jan 2008 15:15:45 GMT Server: Microsoft-IIS/5.0 X-EBAY-API-SERVER-NAME: ___dW0ucnVlYnVvNzM3KTYzKzc2LT0zKTowPD8zPTY= Content-Type: text/xml;charset=utf-8 X-Cache: MISS from thrasher.sjc.ebay.com Connection: close Transfer-Encoding: chunked <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.</faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
Can anyone shed any light on what this means and how to possibly fix it?
As a side note i get a notice from PHPNotice: Undefined property: operation in /xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxx/ebay/nusoap.php on line 6837