Hi all, Thanx for your replies. Sorry for the belated reply, you know christmas / nuyear holidays... So happy new year to all.
Anyway many interesting reads. Yeah managing WSDL versioning through XSD was one of the heavyweight solution I had in mind, but I'm not sure many people have the right tools in hand to make versioned WSDL. I'm not an expert but in the approach you mentioned, it leads to one WSDL document, correct ? Then how can we address those mappings on the Java side. CXF can handle this via the Transformation feature that Sergey just mentioned. The wiki is not really clear on how to redirect things given a certain differentiator. Also it might be possible to use this transformation feature on the target endpoint to match the Java API. However it does seem to work only on the XML not on other content such as JSON which is common which JAX-RS services. In all the things I read here and there, it seems all the techniques about versioning avoids to handle this on the Java side be it possible, limited, or experimental at best. For example, what would you do if you need to expose two different versions, with difference in object/property names, in some value (ex: splitting old value to indicate different sub-cases), etc. In a previous mission we were using EJB-JARs and WARs, this way we could use different objects with the same qualified name (due to the JEE classloader architecture), services were exposed with a version number in the URI (.../ws/5_0/quote) and in the JNDI name (.../ejb/5_0/quote), and of course one WSDL per services (no versioning on this front). While clean, this approach is also pretty heavyweight to maintain and is limited to people that use JEE and EJB-JARs or people that can work in multi classloader environment. The annotation approach seems more code centric and probably easier for people that don't follow the contract first approach. But you need to deal with annotating your code then. But if you share your API artefact with your partners (or your colleagues) so they don't have to generate code from the WSDL or from the WADL, you will expose fields object that belong to the upper version or the lower version. Do the JAX-WS / JAX-RS are good candidates to address or at least provide support for contract versioning ? Cheers, -- Brice On Fri, Dec 23, 2011 at 19:24, Sergey Beryozkin <[email protected]>wrote: > 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/<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-**InputTransformationandRedirect**ion<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 >
