Archive for March, 2011

Turmeric 1.0.0 Beta Release Candidate 1 is out and available. More information about the release can be found on the Release Notes page.

Advertisements

Hi!

Today starts the EclipseCon 2011 in Santa Clara, California. If you have a chance to attend these conferences do not hesitate to get into the Product Showcase Ballroom E on Wednesday 17th. There, Dave Carver and Sastry Mallady, the 2 renowned gurus, will be introducing us Turmeric and what development tools have been created for eclipse around the turmeric framework.

Enjoy it!!

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

HI,

In this post I will show you how to create a new Consumer service with Turmeric Eclipse plugin. I used a wsdl from an existing eBay’s Developer Service.
For general steps and preconditions, please refer to Create a Consumer using Turmeric Eclipse Plugin.

In your Eclipse,  go to File -> new -> other

new Consumer

This is the wsdl I choose:

http://developer.ebay.com/webservices/finding/latest/FindingService.wsdl

As you can see, I set two environments, production and local. This will create two different configuration files, as follows:

Finally, I implemented the Consumer Service. I selected the SharedFindingServiceV1Consumer class as superclass.

(Please take a look at BaseFindingServiceRequest in the wsdl for more info about the needed parameters in your request.)

	public static void main(String[] args) {
		FindItemsByKeywordsRequest req = new FindItemsByKeywordsRequest();
		req.setKeywords("phone");
		
		try {
		FindItemsByKeywordsResponse res;
		
		
		res = new FindingServiceV1Consumer("FindingServiceV1Consumer", "sandbox").findItemsByKeywords(req);
		if(res.getSearchResult()!=null && res.getSearchResult().getItem().size()>0){
			for (SearchItem item : res.getSearchResult().getItem()) {
				System.out.println(item.getTitle());
			}
		}
		
		
		} catch (ServiceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

now ,let’s compile:

 


aja!… that’s because I didn’t compile my FindingServiceV1 project yet. Once I did it, a new jar was created under worspace/FindingServiceV1/target, in my case: FindingServiceV1-1.9.0.jar. We need to add this jar into our local maven repository. Now, let’s try a new Consumer compilation. And this time compiles  :).

Is time to try my classes, “run Consumer, run!!!!”

[ TO BE CONTINUED]

Turmeric

Posted: March 1, 2011 in Policy Governance, SOA, Turmeric

During last times, I was involved on a new OpenSource SOA platform.Turmeric, a policy-driven Open Source SOA platform .

eBayOpenSource.org is recently created to open source and host best of breed technologies that were developed originally within eBay Inc, for the benefit of the community, under a liberal open source license. These projects are generic technology projects and several years of development effort has gone into them to mature them. eBay trusts Intalio for a strong and mature partner, and as a result, today we have the first open sourced project, Turmeric.

Turmeric is a comprehensive, policy-driven SOA platform that you can use to develop, deploy, secure, run and monitor SOA services and consumers. It is a Java based platform and follows the standards (SOAP, REST, XML, JSON, XACML, etc.). Salient features include high performance, low overhead, pluggable and extensible architecture, developer friendly eclipse plug-ins, support for a variety of protocols/formats, local binding, tools for managing re-usable types, error definitions, policy administration and monitoring and many more.

I invite you to read about it, download it and of course,  feel free to fire any doubt/suggestion you have at Turmeric forum.

My Turmeric’s experiences are coming soon….