jump to navigation

Microsoft selects Restlet to show REST interoperability February 20, 2009

Posted by Jerome Louvel in Ecosystem, Microsoft, Noelios, REST, Restlet, Restlet General, User interface.
trackback

After a long investment in WS-*/SOAP initiatives, Microsoft has recognized the value of REST. But they didn’t adopt REST only on the surface, they have put in place a comprehensive offer and are actively working to demonstrate and facilitate the interoperability with other platforms such as Java.

Silverlight

Facing a strong competition in the Rich Internet Application area, from Google with GWT, from Adobe with Flex/AIR/Flash and more recently from Sun with JavaFX/Applets, Microsoft has finally reacted with the introduction of their Silverlight 2 technology.

Silverlight requires a browser plug-in (ActiveX available for IE, Firefox and Safari) and provides you with a subset of the .NET Framework. Microsoft supports Windows and Mac while Novell has a Linux version called Moonlight. For the user interface it relies on a declarative language called XAML, not too different from Flex MXML or JavaFX scripts.

silverlight

Regarding communication, it relies on WCF and offers direct support for HTTP/REST, RSS and Atom, POX/JSON and XML/LINQ. A description of the full architecture is available here.

Now, if you follow this blog, you are probably wondering how Silverlight interoperates with Java on the server-side. Even if its support for HTTP has a few limitations (partially due to its nature of browser plugin), Silverlight allows you to communicate easily with a REST back-end.

To demonstrates this, Microsoft has leveraged our Restlet framework and illustrated this interoperability with several detailled posts in their Silverlight plus Java blog written by Stève Sfartz from Microsoft. Other examples are available on Blog in the Cloud and Cloud it up.

eclipse4SL

If you are a traditional Microsoft developer, you would naturally turn to Visual Studio to develop your Silverlight applications, but what if you are a Java developer?

Well, Microsoft has done an unusual move by supporting the development of a Silverlight IDE for Eclipse! It’s called eclipse4SL and is co-developped with Soyatec, a French software editor specialized in Eclipse products development.

eclipse4sl

REST interoperability is also covered in eclipse4SL’s user documentation, illustrated by the usage of Restlet on the server-side. See this page for Restlet guidance. This is currently based on Restlet 1.0 and a Tomcat deployment, but work is underway to upgrade to Restlet 1.1.

The eclipse4SL project has even been submitted to the Eclipse foundation. See this post from the executive director of the Eclipse foundation.

TechDays

After meeting with Stève Sfartz, who very enthusiastically introduced us to Microsoft projects for REST, cloud computing and RIA, we worked on a join presentation for the Microsoft TechDays in Paris.

The goal was to present interoperability scenarios around REST. Thierry Boileau did the presentation for Noelios Technologies. A detailled summary (in French) has been posted by Stève Sfartz on his blog.

techdays09

This presentation gave us the opportunity to show case our recent support for the Shared Key HTTP authentication scheme. This protocol is similar to the one defined for Amazon S3 and allows you to access to Microsoft Azure Data Services from a Restlet Java client.

This new feature is available in recent snapshots of our future Restlet 1.2 release!

Update 1:  article from BetaNews covering Eclipse4SL and mentioning Restlet

Update 2: Stève Sfartz has posted a complete article on MSDN detailling the example showcased at the TechDays (in French), including downloadable source code.

Advertisements

Comments»

1. SQL Data Services : manipuler depuis Java en REST , Ronny Kwon - March 3, 2009

[…] Par conception la plateforme SQL Data Services est accessible via l’interface SOAP ou REST. J’ai eu l’occasion de rédiger quelques articles sur bloginthecloud concernant l’accessibilité de SDS avec l’api Java Restlet de Noelios Technologies: […]

2. Rob Blackwell - May 16, 2009

I notice that HttpMsSharedKeyHelper has been added to Restlet to support the Microsoft Azure services. Do you have any code samples that show how I could access a Windows Azure queue from Java using Restlet please?

Thierry Boileau - May 18, 2009

Hello Rob,

here is a sample client code that delete a queue called “testQueue”:

Client client = new Client(Protocol.HTTP);
ChallengeResponse challengeResponse =
new ChallengeResponse(
ChallengeScheme.HTTP_MS_SHAREDKEY,
“[account]”,
“[password]”);
Request request = new Request(Method.DELETE,
“http://[account].queue.core.windows.net/testQueue”);
request.setChallengeResponse(challengeResponse);
Response response = client.handle(request);
System.out.println(response.getStatus());

I hope that helps you.
Best regards,
Thierry Boileau

Rob Blackwell - May 19, 2009

Thanks very much.

Interestingly, this works fine against the cloud service, but wont seem to work against the development storage that you can run locally.

Client client = new Client(Protocol.HTTP);
ChallengeResponse challengeResponse = new ChallengeResponse(
ChallengeScheme.HTTP_MS_SHAREDKEY,
“devstoreaccount1”,
“Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==”);
Request request = new Request(Method.DELETE,
“http://127.0.0.1:10001/testQueue”);
request.setChallengeResponse(challengeResponse);
Response response = client.handle(request);
System.out.println(response.getStatus());

Comes back with

Forbidden (403) – Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

Is this a bug? Is there a mailing list where I should be posting this to instead?

Thanks!

3. Rob Blackwell : Java, Restlet and Windows Azure - May 19, 2009
4. Thierry Boileau - May 20, 2009

Hello Rob

That sounds surprising because there should be not difference between a remote service and a local one.
Would be so kind as to share your issue by posting to our “discuss” list?
http://www.restlet.org/community/lists

best regards,
Thierry Boileau

5. Thierry Boileau - May 20, 2009

Hi Rob

I’ve just read this page: http://msdn.microsoft.com/en-us/library/dd320275.aspx.
I wonder if you should use the shared key *lite* scheme instead:

ChallengeResponse challengeResponse = new ChallengeResponse(
ChallengeScheme.HTTP_MS_SHAREDKEY_LITE,
“…″,
“…”);

best regards,
Thierry Boileau

6. Restlet bridges ADO.NET Data Services and Java « Noelios Technologies - September 28, 2009

[…] 28, 2009 Posted by Jerome Louvel in Microsoft, Restlet, Restlet General. trackback After a successful collaboration in February with Microsoft, we continued to explore the interoperability opportunities between […]

7. Restlet Extension for Astoria « WillyXoft - October 1, 2009

[…] los desarrolladores Java el aprovechar los servicios brindados por ADO.NET Data Services. Para ello Restlet Extension for ADO.NET Data Services brinda una API de alto nivel que extiende las capacidades básicas del Restlet Framework para […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s