blog community

Welcome to blog community Sign in | Join | Help
in Search

Raimond Brookman

Architecture and .NET Development

Service versioning through convenants

The Server Side has a nice article about making service contracts more relaxed into convenants. Following this technique, services can be versioned by supporting multiple schemas for one service.

So we're basically talking about overloading service functions with different schema. I think this is a rather nice conceptual approach, although not directly usable according to the current Web Services. This is because the current WSDL schema does not support overloading of methods.

For example; the following code in .NET will yield a runtime exception:

[WebMethod]
public string HelloWorld(int input)
{ return "Hello World" + input; }

[WebMethod]
public string HelloWorld(string input)
{ return "Hello World" + input; }

The message given by ASP.NET is:

Both System.String HelloWorld(System.String) and System.String HelloWorld(Int32) use the message name 'HelloWorld'. Use the MessageName property of the WebMethod custom attribute to specify unique message names for the methods.

But, I still like the approach taken in this article to solve the versioning problem. The article can be found here.

Published Wednesday, April 27, 2005 8:24 AM by Raimondb
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Erno said:

Currently, web services from Microsoft do support overloading! You can specify the wsmessagename as an attribute on the overloaded methods. WSDL.exe is able to recognize this and will create overloaded operations on the proxy.

April 27, 2005 11:16 AM
 

Raimond said:

This only supports overloading a the .NET side. What I mean is overloading inside the WSDL contract, so that this versioning style will work on multiple platforms. Recently I've been thinking about another way to do this, namely using XSD type inheritance features to make one Service Endpoint accept multiple versions of a message... I will post something about that method soon...
May 10, 2005 10:55 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Subscribe in NewsGator Online

Subscribe in Bloglines

Add to Google


 Visitors since June 2005




Powered by Community Server, by Telligent Systems