cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Having trouble with XML calls...

Hallo, i'm new to the ebay api and am working on getting api calls to work. I assume to have done everything required according to the documentation, but still the XML interface only works for one single call (getItem) for me, but not for any of the other listing/finding calls i have tried. On the other hand, when i put the exact same parameters in URL-parameters for the finding API calls, it works.

 

While i could get away with the matter by switching over to URL-GET-parameters for the finding API, that does not apply to the Trading API. So i have to figure out the reason for the discrepancy anyways.

 

I am working with both the "Trading" and "Finding" API. I am using simple reading calls for the beginning to avoid as much trouble as possible. Thus, i am trying to list the products of my customer via the Trading API with GetSellerList and via the Finding API with findItemsIneBayStores and findItemsAdvanced or to read single Items with GetItem.

 

What worked so far are GetItem via XML Interface and findItemsAdvanced via URL-Parameterlist-Interface. Since findItemsAdvanced can be called in both modes (XML and URL-Parameterlist) and is working in one of them, i would like to solve the issue with that particular call.

 

This is my working call with URL Parameters:

	$url = 'http://svcs.ebay.com/services/search/FindingService/v1'.
		'?SECURITY-APPNAME=CPO...'.
		'&OPERATION-NAME=findItemsAdvanced'.
		'&SERVICE-VERSION=1.13.0'.
		'&RESPONSE-DATA-FORMAT=XML'.
		'&GLOBAL-ID=EBAY-DE'.
		'&itemFilter(0).name=Seller'.
		'&itemFilter(0).value=cpo_handel'.
		'&paginationInput.entriesPerPage=10'.
		'&keywords=Radmuttern*';

This is the same call NOT working via XML:

=======================
webcall(https://svcs.ebay.com/services/search/FindingService/v1)
=======================

outgoing Headers were:
-----------------------
POST /services/search/FindingService/v1 HTTP/1.1
Host: svcs.ebay.com
Accept: */*
X-EBAY-SOA-OPERATION-NAME: findItemsAdvanced
X-EBAY-SOA-SERVICE-VERSION: 1.13.0
X-EBAY-SOA-GLOBAL-ID: EBAY-DE
X-EBAY-SOA-SECURITY-APPNAME: CPO...
Content-Type: text/xml
Content-Length: 476
-----------------------

request body:
-----------------------
<?xml version="1.0" encoding="utf-8"?>
<findItemsAdvancedRequest xmlns="https://www.ebay.com/marketplace/search/v1/services">
	<paginationInput>
		<entriesPerPage>10</entriesPerPage>
		<pageNumber>1</pageNumber>
	</paginationInput>
	<itemFilter>
		<name>Seller</name>
		<value>cpo_handel</value>
	</itemFilter>
	<keywords>Radmuttern*</keywords>
	<MessageID>RHJk4jEyDHcElycamgA0uTSN1rl46jEpDbyj3R5yZvI=</MessageID>
	<Site>Germany</Site>
</findItemsAdvancedRequest>
-----------------------

...giving the response:

array (
  'retcode' => '200',
  'headers' => 
  array (
    'Server' => 'Apache-Coyote/1.1',
    'X-EBAY-SOA-SERVICE-METRICS' => '12863500',
    'X-EBAY-SOA-REQUEST-ID' => '16f0efc4-ef20-a9e4-1454-4ab4ffaf4af5',
    'X-EBAY-SOA-SERVICE-VERSION' => '1.13.0',
    'X-EBAY-SOA-LOCALE-LIST' => 'en-DE_DE',
    'X-EBAY-SOA-MESSAGE-PROTOCOL' => 'NONE',
    'X-EBAY-SOA-RESPONSE-DATA-FORMAT' => 'XML',
    'X-EBAY-SOA-GLOBAL-ID' => 'EBAY-DE',
    'X-EBAY-SOA-OPERATION-NAME' => 'findItemsAdvanced',
    'X-EBAY-SOA-SERVICE-NAME' => '{http://www.ebay.com/marketplace/search/v1/services}FindingService',
    'Content-Type' => 'text/xml;charset=UTF-8',
    'Transfer-Encoding' => 'chunked',
    'Date' => 'Mon, 16 Dec 2019 13:53:33 GMT',
  ),
  'data' => 
  array (
    'ack' => 'Failure',
    'errorMessage' => 
    array (
      'error' => 
      array (
        'errorId' => '6',
        'domain' => 'Marketplace',
        'severity' => 'Error',
        'category' => 'Request',
        'message' => 'Keyword or category ID are required.',
        'subdomain' => 'Search',
      ),
    ),
    'version' => '1.13.0',
    'timestamp' => '2019-12-16T13:53:33.954Z',
  ),
)

Any idea whats wrong with the XML version?

Message 1 of 3
latest reply
1 BEST ANSWER

Accepted Solutions

Having trouble with XML calls...

Solved: The eBay API documentation is erroneous at a rather well hidden point:

https://developer.ebay.com/devzone/finding/Concepts/MakingACall.html#xml

...stipulates that the namespace argument of the documentElement of the XML envelope should be:

xmlns="https://www.ebay.com/marketplace/search/v1/services"

The working example...

https://developer.ebay.com/DevZone/finding/HowTo/GettingStarted_PHP_XML_XML/GettingStarted_PHP_XML_XML.zip

...differs in one single character from that stipulation: http without "s".

 

Changing that one character in my source, i got it to work.

Thus, the API documentation is proven erroneous.

 

While being an incredible tiny thing, it successfully avoids detection. The better you are in notoriously exactly following the advises, the smaller your chances of detecting that error an the basis of the API documentation.

Luckily, the example provided a working solution, thus going line by line, header by header, value by value through each and every parameter, i ended up at that little character in the xml Namespace descriptor.

 

Boys at eBay: Those descriptors are so **bleep** irrelevant to the content of the API... But YOU (!) the heck go on full strike if a single tiny character is wrong... AND: YOU (!) are the ones who provides the wrong character in your  so called "documentation".

 

Make your homework, guys!

View Best Answer in original post

Message 3 of 3
latest reply
2 REPLIES 2

Having trouble with XML calls...

While looking over the matter after a longer break, it looks to me as if the complete body in the XML version gets ignored.

BUT... The exact same procedure works for GetItem. Thus, the CURL-encapsulation i am using is working fine (i use the same for all XML-calls for all APIs - with adapted header and body generation, which produces the outcome seen above).

What is wrong with the Headers or the body that the latter gets ignored?
Message 2 of 3
latest reply

Having trouble with XML calls...

Solved: The eBay API documentation is erroneous at a rather well hidden point:

https://developer.ebay.com/devzone/finding/Concepts/MakingACall.html#xml

...stipulates that the namespace argument of the documentElement of the XML envelope should be:

xmlns="https://www.ebay.com/marketplace/search/v1/services"

The working example...

https://developer.ebay.com/DevZone/finding/HowTo/GettingStarted_PHP_XML_XML/GettingStarted_PHP_XML_XML.zip

...differs in one single character from that stipulation: http without "s".

 

Changing that one character in my source, i got it to work.

Thus, the API documentation is proven erroneous.

 

While being an incredible tiny thing, it successfully avoids detection. The better you are in notoriously exactly following the advises, the smaller your chances of detecting that error an the basis of the API documentation.

Luckily, the example provided a working solution, thus going line by line, header by header, value by value through each and every parameter, i ended up at that little character in the xml Namespace descriptor.

 

Boys at eBay: Those descriptors are so **bleep** irrelevant to the content of the API... But YOU (!) the heck go on full strike if a single tiny character is wrong... AND: YOU (!) are the ones who provides the wrong character in your  so called "documentation".

 

Make your homework, guys!

Message 3 of 3
latest reply