I use Urls and packages on the server (generates namespaces in the WSDL and
on the client)
For example 
for REST  /services/v1/rest/HelloWorld/methodName
for SOAP: /services/v1/soap/HelloWorld

java packages as follows:
com.foo.webservices.v1.ports.helloworld


Sertic Mirko, Bedag wrote:
> 
> Hi Oliver
> 
> Thank you so much for your answer!
> 
> But how should I handle versioning with RESTful endpoints? Some of the
> RESTful endpoints are no "real" REST endpoints, they are something
> selfmade, meaning a POST with an XML Request is made and an XML response
> is generated, sometimes with XML namespaces, sometimes without. Ugly, but
> it is a requirement. I think the only way to handle this properly is to
> use different URLs, or am I wrong? Can I use CXF for this, or would a
> simple Servlet be the better way? From my point of view it would be nice
> to have a full stack available for stuff like message handlers /
> interceptors...
> 
> Thanks in advance
> Mirko
> 
> -----Ursprüngliche Nachricht-----
> Von: Oliver Wulff [mailto:[email protected]] 
> Gesendet: Mittwoch, 9. Dezember 2009 09:26
> An: [email protected]; [email protected]
> Betreff: RE: Best practice for SOAP and RESTful WebServices / Versioning
> 
> Hi Mirko
>  
>>>>
> Now my question is: are there best practices available for CXF and the
> mentioned requirements? I searched the WIKI and the net, but didn't find
> an answer.
>>>>
>  
> Adrian Trenaman and myself were working on WSDL best practises and
> versioning and published the following document:
> http://blogs.iona.com/sos/20070410-WSDL-Versioning-Best-Practise.pdf
> 
> 
>>>>
> Would it be better to use a different Endpoint URL for each Webservice
> version, or do I use the same URL, and implement decision logic based on
> the Namespaces?
>>>>
> Web Services stacks like CXF know based on the namespace of the soap
> message to which implementation the request should be dispatched. There is
> no need to have different URL but you can if you like (see the referenced
> document)
> 
>>>>
> Which strategy should I use for Java package naming?
>>>>
> When you use versioning on the target namespace level and use the default
> namespace to java packaging mapping, isolation in Java is guaranteed.
> 
> How do I mix SOAP and Rest?
> 
>>>>
> Would OSGi make sense here?
>>>>
> OSGi doesn't solve versioning on the WSDL interface level. It manages
> versioning for the implementation.
>  
> HTH
>  
> Oliver
>  
> 
> ________________________________
> 
> From: Sertic Mirko, Bedag [mailto:[email protected]]
> Sent: Wed 09.12.2009 09:14
> To: [email protected]
> Subject: Best practice for SOAP and RESTful WebServices / Versioning
> 
> 
> 
> h...@all
> 
> 
> 
> I want to implement a series of Webservices based on the following
> requirements
> 
> 
> 
> *         An Endpoint must be available using SOAP and REST(like)
> 
> *         Some of the Webservices must be implemented WSDL first, others
> contract first
> 
> *         An Endpoint should be versionable, using the XML Namespaces
> 
> 
> 
> Now my question is: are there best practices available for CXF and the
> mentioned requirements? I searched the WIKI and the net, but didn't find
> an answer.
> 
> 
> 
> Would it be better to use a different Endpoint URL for each Webservice
> version, or do I use the same URL, and implement decision logic based on
> the Namespaces?
> 
> Which strategy should I use for Java package naming?
> 
> How do I mix SOAP and Rest?
> 
> Would OSGi make sense here?
> 
> 
> 
> Thanks in advance
> 
> Mirko
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Best-practice-for-SOAP-and-RESTful-WebServices---Versioning-tp26706590p26721593.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to