by community-syndication | Mar 17, 2009 | BizTalk Community Blogs via Syndication
The WCF REST Starter Kit Preview 2 provides several classes for managing traditional query string and form input to RESTful services: HttpQueryString, HttpUrlEncodedForm, and HttpMimeMultipartForm. These make passing data into RESTful services much easier.
Here's an example using HttpQueryString:
HttpClient http = new HttpClient("http://twitter.com/statuses/");
http.TransportSettings.Credentials =
new NetworkCredential(username, password);
HttpResponseMessage resp = null;
// add query string variables
HttpQueryString vars = new HttpQueryString();
vars.Add("id", screenname);
vars.Add("count", count);
resp = http.Get(new Uri("user_timeline.xml", UriKind.Relative), vars);
resp.EnsureStatusIsSuccessful();
DisplayTwitterStatuses(resp.Content.ReadAsXElement());
And here's another example using HttpUrlEncodedForm:
HttpUrlEncodedForm form = new HttpUrlEncodedForm();
form.Add("status", status);
resp = http.Post("update.xml", form.CreateHttpContent());
resp.EnsureStatusIsSuccessful();
These classes take care of properly encoding the input values, and the HttpUrlEncodedForm sets the appropriate content-type header for a form submission (application/x-www-form-urlencoded). You can also use HttpMimeMultipartForm when you need to generate multi-part MIME messages (to simulate a file upload etc). Check out this screencast to see these new classes in action.

by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
Lately I've been spending a lot of time thinking about service virtualization and why it matters. Along the way I've been doing some work for William Oellermann's crew within Microsoft Services — they are responsible for building the Managed Services Engine (MSE) that brings many service virtualization concepts to life today on the Windows platform.
If you're interested in learning more about service virtualization, check out my short executive whitepaper on the topic that was released at the SOA/BP conference earlier this year:
Why Service Virtualization Matters (download PDF)
Abstract: Service virtualization is an emerging trend in the SOA landscape that focuses on providing a common infrastructure for building and managing a complex service ecosystem. This paper discusses the concept of service virtualization along with a brief description of the technical solutions Microsoft currently provides today.
Microsoft Services just released a new version of the MSE on CodePlex (February 09 CTP), which comes with a new-and-improved management tool (built with WPF) that really helps you visualize what's going on within your SOA environment and several new virtualization concepts and features. This release also comes with improved documentation and videos that will help you figure out how to get started.
It's interesting to note that service virtualization concepts apply to both SOAP and REST services. In fact, this new version of the MSE makes it possible to virtualize REST resources that you can manage just like any other MSE endpoint. I'll be writing more about service virtualization + MSE in the months ahead.

by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
If you are in Minneapolis on Thursday March 19th please join us for the Twin Cities Connected Systems User Group Meeting.
The meeting takes place at 8000 Norman Center Drive, Bloomington, MN 55437 (the building directly east of the Microsoft office) from 6:00 to 7:30
Steve Cavanagh and Balaji Thiagarajan will be delivering a presentation titled ‘Business Rule Execution via Managed Stored Procedures: A Data-centric Approach’.
by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
There is a UK SOA/BPM User Group event planned for 26th May 2009
For details please refer to http://sbug.org.uk/forums/p/122/174.aspx#174
by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
There is a UK SOA/BPM User Group Meeting planned for the 15th April 2009.
For details of the event please refer to; http://sbug.org.uk/forums/p/121/173.aspx#173
by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
Cross-posted from the Silverlight Web Services Team Blog.
Just a quick announcement here of a release that will be interesting to Silverlight developers who want to access REST services. The WCF REST Starter Kit Preview 2 is now out, go grab it at http://msdn.com/wcf/rest. The release gives you a polished install/uninstall experience, so don’t be afraid to try it on your box, it won’t muck it up like “preview” software so frequently does.
This release gives you one interesting client-side feature that you may have heard me or Eugene speak about: Paste XML as Types. It’s a VS menu item which helps you use XmlSerializer with REST services. Frequently these services use human-readable documentation to describe the XML shape, and it is difficult to hand-code a type to use with XmlSerializer, especially when the XML instance is complex. For example check out this sample XML response from the Yahoo BOSS API. With this new feature it takes one click to generate the type:
Another interesting feature in the release is HttpClient – a sort of specialized WebClient – which can be used to programmatically access REST services using an extensible model for sending HTTP requests and processing HTTP responses. The model enables you to complete common HTTP/REST development activities required to consume an existing service in a fraction of the time you normally spend. Some convenient time-savers include query string support (build URIs as name/value pairs) and serialization support (easily plug in types generated with Paste XML as Types to read the response).
Unfortunately in this release the starter kit only contains a .Net version of HttpClient, which will not compile in Silverlight. We are considering porting this prototype to Silverilght, and if you get a chance to try it on .Net, please let us know of any feedback you have.
Cheers,
Yavor Georgiev, Program Manager
Connected Framework Team
by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
I recently published a new screencast video on Consuming REST Services with HttpClient.
This screencast shows you how to use the new HttpClient API (found in the WCF REST Starter Kit Preview 2) to build a Twitter client application against the Twitter REST API. It's a more complete example that shows how to use several of the status operations on the Twitter REST service including the public_timeline, the friends_timeline, the user_timeline, update, and destroy (which means GET, POST, and DELETE requests). This one provides a more moderately-paced introduction than the Twitter read/write in under 3 minutes intro. 😉
Check out our growing collection of free .NET screencasts and videos. Subscribe to the Pluralsight feed to be notified when new screencasts are published. Also, check out our growing library of online .NET training courses — see what you can learn with Pluralsight On-Demand!

by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
I just posted a new screencast video on Getting Started with the WCF REST Starter Kit Preview 2. This one shows how to download the starter kit from CodePlex, what it contains, and how to get started.
This screencast shows you how to get started with the new version of the WCF REST Starter Kit (Preview 2) that you can download now from CodePlex. It shows how to use the starter kit to create a simple REST service, along with a simple client to consume it.
Check out our growing collection of free .NET screencasts and videos. Subscribe to the Pluralsight feed to be notified when new screencasts are published. Also, check out our growing library of online .NET training courses — see what you can learn with Pluralsight On-Demand!

by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
I just posted a new screencast video on Getting Started with the WCF REST Starter Kit Preview 2. This one shows how to download the starter kit from CodePlex, what it contains, and how to get started.
This screencast shows you how to get started with the new version of the WCF REST Starter Kit (Preview 2) that you can download now from CodePlex. It shows how to use the starter kit to create a simple REST service, along with a simple client to consume it.
Check out our growing collection of free .NET screencasts and videos. Subscribe to the Pluralsight feed to be notified when new screencasts are published. Also, check out our growing library of online .NET training courses — see what you can learn with Pluralsight On-Demand!

by community-syndication | Mar 16, 2009 | BizTalk Community Blogs via Syndication
One of the things people often complain about when building REST clients is the lack of proxy generation support. Although to be fair, it's usually only heard from those coming from a SOAP/WSDL background (some would argue it's completely unnecessary). Achieving this typically requires support for a metadata language like WADL or WSDL 2.0, which are not yet widely supported nor considered standards.
The WCF REST Starter Kit Preview 2 provides a nice solution to this dilemma for .NET developers. They provide a new HttpClient API that provides generic support for the uniform HTTP interface (Get, Post, Put, Delete, Head, etc) that can be used to process a variety of common resource representations like XML/XHTML, JSON, Atom/AtomPub, binary streams, etc. And when using XML/JSON, you can tell it to use an XmlSerializer or DataContractSerialzier type, which gives you the dot-notation experience that you might long for while writing .NET clients.
The only problem is how do you get the serializable types to use with HttpClient? If the REST service provides an XSD schema, you can always use xsd.exe or svcutil.exe to generate the appropriate serializable types. But many REST services don't provide schema definitions. In this case, you'd typically be forced to write the serializable types by hand by inspecting the documentation or XML instances while using the service (very common). Hence, the WCF REST Starter Kit Preview 2 provides another new feature for this specific scenario: Paste XML as Types.

You simply copy a sample XML instance for the resource in question into your clipboard, and then select "Paste XML as Types" from the Visual Studio Edit menu. The plug-in will then generate a set of XmlSerializer types capable of processing the XML instance you pasted. You'll still probably want to tweak the generated class definitions to some degree, but this feature can definitely speed up the process for this use case.
Watch this screencast on building a Twitter read/write client in under 3 minutes to see this feature in action.
