Tuesday, May 03, 2005
« Mo' memory! | Main | Good SOA article »

Over the past few weeks I've given a number of presentations on service-oriented design and how it relates to both OO and n-tier models. One constant theme has been my recommendation that service methods use a request/response or just request method signature:

 

   response = f(request)

or

   f(request)

 

"request" and "response" are both messages, defined by a type or schema (with a little "s", not necessarily XSD).

 

The actual procedure, f, is then implemented as a Message Router, routing each call to an appropriate handler method depending on the specific type of the request message.

 

In concept this is an ideal model, as it helps address numerous issues around decoupling the client and service, and around versioning of a service over time. I discussed many of these issues in my article on SOA Covenants.

 

Of course the devil is in the details, or in this case the implementation. Today's web service technologies don't make it particularly easy to attach multiple schemas to a given parameter - which we must do to the "request" parameter in order to allow our single endpoint to accept multiple request messages.

 

One answer is to manually create the XSD and/or WSDL. Personally I find that answer impractical. Angle-brackets weren't meant for human creation or consumption, and programmers shouldn't have to see (much less type) things like XSD or WSDL.

 

Fortunately there's another answer. In this blog entry, Microsoft technology expert Bill Wagner shows how to implement "method overloading" in asmx using C# to do the heavy lifting.

 

While the outcome isn't totally seamless or perfect, it is pretty darn good. In my mind Bill's answer is a decent compromise between getting the functionality we need, and avoiding the manual creation of cryptic WSDL artifacts.

 

The end result is that it is totally possible to construct flexible, maintainable and broadly useful web services using VB.NET or C#. Web services that follow a purely message-based approach, implement a message router on the server and thus provide a good story for both versioning and multiple message format stories.

 

Indigo, btw, offers a similar solution to what Bill talks about. In the Indigo situation however, it appears that we’ll have more fine-grained control over the generation of the public schema through the use of the DataContract idea, combined with inheritance in our VB or C# code.


Tuesday, May 03, 2005 1:44:03 PM (Central Standard Time, UTC-06:00)
Great Idea ... not a very simple solution, you must work with Attributes (great thing), but the code becomes "not clean". Anyways a simple solution to fix a complex problem (I like this kind of stuff ;).

I hope Indigo has more flexible ways to to this.

Byes from Spain

El Bruno

PS: Sorry 4 my poor English.
Wednesday, May 04, 2005 8:59:34 AM (Central Standard Time, UTC-06:00)
very creative and imaginative solution.
I still think that it has limitations.
By using XSD Schema , One can make sure more quality data arrives at service end point by using pattern constraint and regular expression.
e.g would be ssn number in form 999-99-9999
I have not yet figure out a way to emit pattern and regular expression to wsdl document.
Right now native .net tools generates only proxy class with public members. Asmx 2.0 will generate only proxy class with public properties .
http://weblogs.asp.net/cweyer/archive/2004/12/28/333194.aspx

I have not seen any information in asmx 2.o or Indigo where proxy class will generated with additional business rules mapped from pattern constraints and regular expression in WSDL or xsd schema.

I have been following very closely the debate between code first or contract first debate on web log regarding Web Services
http://vikasnetdev.blogspot.com/2005/04/contract-through-native-net-or.html


There does not look any escape from Angle brackets.

I think that for a serious enterprise designer or developer working in a environment where platform interoperability and EAI is a requirement, there is no escape from XML .

With Regards,
Vikas



Wednesday, May 04, 2005 3:47:33 PM (Central Standard Time, UTC-06:00)
Would it be fair to say that you are looking to allow progressive discovery of resources that are not directly identified by a globally unique URI.

If so one way to address this might be through WS-Router and WS-Referral
Keenan Newton
Wednesday, May 04, 2005 8:58:35 PM (Central Standard Time, UTC-06:00)
I have posted my own Contract First Alternative here.

http://www.softwaremaker.net/blog/PermaLink,guid,d3a66c9e-9e3b-490c-8ccd-51fb067ab8d8.aspx

Feel free to comment on it :)
Thursday, January 19, 2006 11:54:35 AM (Central Standard Time, UTC-06:00)
I want to bounce a concept off you thatI am beginning to design as part of a SOA architecture for a large company. Specifically, I am looking at the parameters and return types of a WS as XML Nodes themselves. These both would adhere to a published XSD of there own. In this manner I never worry about returning a real complex dataset since we want to be interoperable with all platforms. Problem I see is the actual types just becoming nodes and a manual validation against the XSD on server calls. I was hoping to find a way to expose the parameter not so much as an xmlnode but as an implementation of this XSD (like an interface). Thoughts?
Comments are closed.