Creating a Consumer Service with Turmeric… [part II]

Posted: March 3, 2011 in eBayOpenSource, SOA, Turmeric, wsdl

…. let’s resume  the Consumer creation process.

My first attempt to run the consumer throw an Server internal exception, as a result Error 500. WTF! I pasted the url at my FF browser and the answer appeared: “Missing SOA operation name header”. Browsing the eBay doco I found that I need to add at least 2 http headers to my request. (for eBay service interaction, I recommend you to take a look at eBay’s devzone site ). The headers are:

  • OPERATION-NAME: The name of the call you are using (for example, findItemsAdvanced or getHistograms).
  • SECURITY-APPNAME: This is the application ID (AppID) for the service consumer. You obtain an AppID by joining the eBay Developers Program.

As it request, I had to join the eBay program. Simple process with the exception of the fully complex password it requires, despite you want to play in his sandbox environment. Btw, do you remember when I added a new environment at Consumer creation wizard?? (part I).

Now, with a eBay sandbox user, let’s set the headers.

Under your META-INF/soa/client/config/FindingServiceV1Consumer/sandbox/ you will find the ClientConf.xml file. Here we could set any particular setting for the rpc, such us endpoints, protocol, headers, timeouts, retries, etc….and headers is what I need!!

FMI about header settings please refer to Transport Header Mapping and Configuring Custom Transport Headers.

In this case both end point in the call are SOA implementations we can avoid the header mappings. So, just added into my ClientConf.xml the following lines:

<transport name="HTTP11">
	<class-name>
		org.ebayopensource.turmeric.runtime.sif.impl.transport.http.HTTPSyncAsyncClientTransport
	</class-name>
	<header-options>
		<option name="X-EBAY-SOA-OPERATION-NAME">findItemsByKeywords</option>
		<option name="X-EBAY-SOA-SECURITY-APPNAME">xxxxxxxxxxxxxxxxxxxxxxxxx</option>   <!-- my sandbox appId -->
	</header-options>
</transport>

At this point of the game everything seems to be done, let’s press Run so…

and the response says:

New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
LG Chocolate Touch VX8575 Verizon Retail Box Cell Phone
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
SAMSUNG A837 RUGBY AT&T CAMERA PTT GSM PHONE BLACK
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
Palm Treo 700wx (Verizon)
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
NEW T MOBILE MOTO MOTOROLA CLIQ WIFI BLUR MB200 ANDRIOD
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
New unlocked FM mini Iphone KA09 GSM AT&T T-Mobile Cell
NEW SAMSUNG A887 SOLSTICE UNLOCKED 3G PHONE BLUE……..

In case you get in timeouts troubles please refer to TimeOuts settings

Leave a comment