You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by johnpfeifer4 <jo...@gmail.com> on 2010/06/25 20:17:43 UTC

Versioning of Web Services using Interfaces

We have deployed CXF throughout our organization with a great degree of
success.  That being said, we've not done a very good job of versioning any
of our services.  We've been stuck on version 1.0.0 of all of our services
(making changes to the xsds and wsdls), forcing our clients to rebuild
before deploying a new release.  This isn't ideal.

That being said, I'd like to create a pure POJO service layer that my web
services delegate to without passing in the JAXB generated Request objects. 
Ideally, I would like my JAXB Request objects to implement an interface that
my POJO service tier could use.  I was wondering if anyone can point me to
some good documentation on how to achieve this.

Thanks,

John
-- 
View this message in context: http://old.nabble.com/Versioning-of-Web-Services-using-Interfaces-tp28995162p28995162.html
Sent from the cxf-user mailing list archive at Nabble.com.


RE: Versioning of Web Services using Interfaces

Posted by Oliver Wulff <ow...@progress.com>.
Maybe the following document gives you some ideas:
http://blogs.iona.com/sos/20070410-WSDL-Versioning-Best-Practise.pdf

IMHO, I'd have an unversioned business logic layer where you have versioned jaxb classes where you semantically adapt the jaxb classes to your business logic layer which is decoupled from the communication technology.

Thanks
Oliver

________________________________________
From: Daniel Kulp [dkulp@apache.org]
Sent: 30 June 2010 19:24
To: users@cxf.apache.org
Cc: johnpfeifer4
Subject: Re: Versioning of Web Services using Interfaces

On Friday 25 June 2010 2:17:43 pm johnpfeifer4 wrote:
> We have deployed CXF throughout our organization with a great degree of
> success.  That being said, we've not done a very good job of versioning any
> of our services.  We've been stuck on version 1.0.0 of all of our services
> (making changes to the xsds and wsdls), forcing our clients to rebuild
> before deploying a new release.  This isn't ideal.
>
> That being said, I'd like to create a pure POJO service layer that my web
> services delegate to without passing in the JAXB generated Request objects.
> Ideally, I would like my JAXB Request objects to implement an interface
> that my POJO service tier could use.  I was wondering if anyone can point
> me to some good documentation on how to achieve this.

Using interfaces with JAXB can be quite difficult.   For each interface, you
need to create the concrete implementations (which get output to the WSDL) as
well as type mappers that would bind the two together.   Then various
@XmlSeeAlso's and @XmlJavaTypeAdapter things, etc....

As a starting point, look at the java_first_jaxws sample in the distro.  It
shows using an interface for an web method.


--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Versioning of Web Services using Interfaces

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 25 June 2010 2:17:43 pm johnpfeifer4 wrote:
> We have deployed CXF throughout our organization with a great degree of
> success.  That being said, we've not done a very good job of versioning any
> of our services.  We've been stuck on version 1.0.0 of all of our services
> (making changes to the xsds and wsdls), forcing our clients to rebuild
> before deploying a new release.  This isn't ideal.
> 
> That being said, I'd like to create a pure POJO service layer that my web
> services delegate to without passing in the JAXB generated Request objects.
> Ideally, I would like my JAXB Request objects to implement an interface
> that my POJO service tier could use.  I was wondering if anyone can point
> me to some good documentation on how to achieve this.

Using interfaces with JAXB can be quite difficult.   For each interface, you 
need to create the concrete implementations (which get output to the WSDL) as 
well as type mappers that would bind the two together.   Then various 
@XmlSeeAlso's and @XmlJavaTypeAdapter things, etc....   

As a starting point, look at the java_first_jaxws sample in the distro.  It 
shows using an interface for an web method.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog