On 23/12/11 01:27, Christopher Riley wrote:
Hi Brice,

There isn't a "standard" in web services versioning however you can check
out SOA Design Patterns like Version Identification at www.soapatterns.org.

With Web Services, you have the service contract(WSDL) and data contract
(XSD). One common approach especially with WSDL is to use the XML Namespace
of the Web Service and include the major version details like:

xmlns:tns="http://www.example.com/services/<servicename>/v1"

When the consumer invokes the service, this namespace will be in the SOAP
request. You should also version the schema and this again can be done in
the Namespace or you can use XML Attributes to contain this information. By
using this approach the communication includes the version details and
technologies like Enterprise Service Bus, Web Service containers etc can
sniff the request using XPath etc. to determine the consumer's version and
route accordingly.

Within REST, check out Foursquare, Twitter and others who embed the version
in the URI for the REST service.


In CXF we can also use Transform Feature to redirect from one destination to the other one if the 'differentiator' is in URI:

http://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-InputTransformationandRedirection

Sergey

Chris

On Thu, Dec 22, 2011 at 1:58 PM, Brice<[email protected]>  wrote:

Hi,


How and what technologies would you use to version wabservices either in
SOAP or REST ?
This is an open question, there's no real code behind yet.


For Rest webservices I was thinking about using a Gson (the google gson
project) MessageBodyWriter that support some trivial versioning.
It is based on annotations on the transferred objects. However these
annotations are com.google.* not really standard.
Do the JAX-RS 2.0 expert group have some versionning in mind ?

For Soap webservices, I really don't know how I would to start or which
direction to arrive to something elegant. (I have some heavyweight
solutions in mind though).



Cheers and happy holiday also :)


--
Brice






--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to