You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Florian Müller <fm...@apache.org> on 2015/07/11 22:42:05 UTC

Web Services and Java 8/9

Hi,

The Web Service binding server implementation of OpenCMIS was based on 
the Sun JAX-WS RI. This JAX-WS implementation seems to have serious 
issues with Java 8 and 9 (see [1] and [2]).
The Web Service binding client implementation used the JAX-WS provided 
by the JRE. Because of some shortcomings of the JAX-WS specification we 
had to call a few internal APIs. That's not working anymore with 
upcoming Java 8 and 9 releases.

So, I have changed the Web Service binding implementation (client and 
server) to use Apache CXF 3.0 instead.
This is a major change! It should not affect code that uses OpenCMIS, 
but it affects the deployment. OpenCMIS has now different dependencies. 
Updating to the next OpenCMIS release will need some more work and 
attention than before.

The new implementation (in trunk) is complete but not well tested. The 
TCK passes and my smoke tests were all successful so far. It would be 
great if someone else could test it as well.


- Florian



[1] https://issues.apache.org/jira/browse/CMIS-917
[2| 
https://mail-archives.apache.org/mod_mbox/chemistry-dev/201506.mbox/%3C2FBF817A4032C64CA8DE5F4F73ED93A4438F3EEE%40otmucxg20.opentext.net%3E


Re: Web Services and Java 8/9

Posted by Florian Müller <fm...@apache.org>.
Hi Michael,

Sorry, my bad. I should have provided some migration hints. Here we go.

* Get the OpenCMIS code from trunk and build it.
* If you are not using Maven for your server, you have to remove all 
OpenCMIS related jars from your WEB-INF/lib directory manually.
   Then copy all files except 
chemistry-opencmis-server-fileshare-1.0.0-SNAPSHOT.jar from 
<trunk>/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/target/chemistry-opencmis-server-fileshare-1.0.0-SNAPSHOT/WEB-INF/lib 
into your WEB-INF/lib directory.
* Remove the WSServletContextListener in your web.xml.
* Remove the file sun-jaxws.xml from your WEB-INF directory.
* Copy the files cxf-servlet.xml and sun-web.xml from
<trunk>/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF 
into your WEB-INF directory.


I hope I didn't miss a step. If you are in doubt, check the fileshare 
repository. It has no extra dependencies and demonstrates the bare 
minimum of an OpenCMIS server.


- Florian



> Hi,
> 
> What changes are needed?
> I removed the WSServletContextListener listener.
> Anything else?
> 
> Currently i get
> org.apache.cxf.BusException: No binding factory for namespace
> http://schemas.xmlsoap.org/wsdl/soap/ registered.
> 
>  at
> org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:93)
> 
> Michael
> 
> On Sat, Jul 11, 2015 at 10:42 PM, Florian Müller <fm...@apache.org> 
> wrote:
> 
>> Hi,
>> 
>> The Web Service binding server implementation of OpenCMIS was based on 
>> the
>> Sun JAX-WS RI. This JAX-WS implementation seems to have serious issues 
>> with
>> Java 8 and 9 (see [1] and [2]).
>> The Web Service binding client implementation used the JAX-WS provided 
>> by
>> the JRE. Because of some shortcomings of the JAX-WS specification we 
>> had to
>> call a few internal APIs. That's not working anymore with upcoming 
>> Java 8
>> and 9 releases.
>> 
>> So, I have changed the Web Service binding implementation (client and
>> server) to use Apache CXF 3.0 instead.
>> This is a major change! It should not affect code that uses OpenCMIS, 
>> but
>> it affects the deployment. OpenCMIS has now different dependencies.
>> Updating to the next OpenCMIS release will need some more work and
>> attention than before.
>> 
>> The new implementation (in trunk) is complete but not well tested. The 
>> TCK
>> passes and my smoke tests were all successful so far. It would be 
>> great if
>> someone else could test it as well.
>> 
>> 
>> - Florian
>> 
>> 
>> 
>> [1] https://issues.apache.org/jira/browse/CMIS-917
>> [2|
>> https://mail-archives.apache.org/mod_mbox/chemistry-dev/201506.mbox/%3C2FBF817A4032C64CA8DE5F4F73ED93A4438F3EEE%40otmucxg20.opentext.net%3E
>> 
>> 


Re: Web Services and Java 8/9

Posted by Michael Brackx <mi...@gmail.com>.
Hi,

What changes are needed?
I removed the WSServletContextListener listener.
Anything else?

Currently i get
org.apache.cxf.BusException: No binding factory for namespace
http://schemas.xmlsoap.org/wsdl/soap/ registered.

 at
org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:93)

Michael

On Sat, Jul 11, 2015 at 10:42 PM, Florian Müller <fm...@apache.org> wrote:

> Hi,
>
> The Web Service binding server implementation of OpenCMIS was based on the
> Sun JAX-WS RI. This JAX-WS implementation seems to have serious issues with
> Java 8 and 9 (see [1] and [2]).
> The Web Service binding client implementation used the JAX-WS provided by
> the JRE. Because of some shortcomings of the JAX-WS specification we had to
> call a few internal APIs. That's not working anymore with upcoming Java 8
> and 9 releases.
>
> So, I have changed the Web Service binding implementation (client and
> server) to use Apache CXF 3.0 instead.
> This is a major change! It should not affect code that uses OpenCMIS, but
> it affects the deployment. OpenCMIS has now different dependencies.
> Updating to the next OpenCMIS release will need some more work and
> attention than before.
>
> The new implementation (in trunk) is complete but not well tested. The TCK
> passes and my smoke tests were all successful so far. It would be great if
> someone else could test it as well.
>
>
> - Florian
>
>
>
> [1] https://issues.apache.org/jira/browse/CMIS-917
> [2|
> https://mail-archives.apache.org/mod_mbox/chemistry-dev/201506.mbox/%3C2FBF817A4032C64CA8DE5F4F73ED93A4438F3EEE%40otmucxg20.opentext.net%3E
>
>

Re: Web Services and Java 8/9

Posted by Florian Müller <fm...@apache.org>.
Hi Alex,


It doesn't matter which JAX-WS implementation we choose, there will 
always be pros and cons and people who prefer one or the other.
 From a licenses point of view, Apache CXF is the better choice because 
it's under the Apache license. Removing CDDL dependencies is a good 
thing.
 From an OpenCMIS development point of view, it doesn't make a big 
difference.
 From a support point of view, Apache CXF is also the better choice. 
There are more documentation and support channels for Apache CXF than 
there are for the Metro RI. There is more information on the Internet 
how to run CXF on various application servers than there is for Metro 
RI.

There shouldn't be much impact for applications that also provide other 
Web Services in the boundaries of JAX-WS. It's a different story for 
applications that use Metro RI internal APIs - like OpenCMIS did. If 
this is an issue for someone, please let us know.

I think there is no need to have two versions of the server framework. 
If you don't want the Web Services binding, you only have to remove the 
servlet configuration from the web.xml. You can also remove the Web 
Services related dependencies or - if you use Maven - exclude them in 
your pom.xml.

Would it help if we provide sample web.xml and pom.xml files?


- Florian



> Hi Florian,
> Would upgrading to a newer version of Metro RI have helped instead of
> moving to Apache CXF? The latest version available is 2.2.10.  I guess
> moving to CXF would make it difficult for any application that's
> already using Sun's JAX-WS and the OpenCMIS server framework. Does it
> make sense to have 2 versions of the server framework available - one
> with support for all 3 bindings and the other with atompub and browser
> binding only?
> Thanks  
>       From: Florian Müller <fm...@apache.org>
>  To: dev@chemistry.apache.org
>  Sent: Sunday, July 12, 2015 2:12 AM
>  Subject: Web Services and Java 8/9
> 
> Hi,
> 
> The Web Service binding server implementation of OpenCMIS was based on
> the Sun JAX-WS RI. This JAX-WS implementation seems to have serious
> issues with Java 8 and 9 (see [1] and [2]).
> The Web Service binding client implementation used the JAX-WS provided
> by the JRE. Because of some shortcomings of the JAX-WS specification we
> had to call a few internal APIs. That's not working anymore with
> upcoming Java 8 and 9 releases.
> 
> So, I have changed the Web Service binding implementation (client and
> server) to use Apache CXF 3.0 instead.
> This is a major change! It should not affect code that uses OpenCMIS,
> but it affects the deployment. OpenCMIS has now different dependencies.
> Updating to the next OpenCMIS release will need some more work and
> attention than before.
> 
> The new implementation (in trunk) is complete but not well tested. The
> TCK passes and my smoke tests were all successful so far. It would be
> great if someone else could test it as well.
> 
> 
> - Florian
> 
> 
> 
> [1] https://issues.apache.org/jira/browse/CMIS-917
> [2|
> https://mail-archives.apache.org/mod_mbox/chemistry-dev/201506.mbox/%3C2FBF817A4032C64CA8DE5F4F73ED93A4438F3EEE%40otmucxg20.opentext.net%3E


Re: Web Services and Java 8/9

Posted by Alex Devasia <de...@yahoo.com.INVALID>.
Hi Florian,
Would upgrading to a newer version of Metro RI have helped instead of moving to Apache CXF? The latest version available is 2.2.10.  I guess moving to CXF would make it difficult for any application that's already using Sun's JAX-WS and the OpenCMIS server framework. Does it make sense to have 2 versions of the server framework available - one with support for all 3 bindings and the other with atompub and browser binding only?
Thanks  
      From: Florian Müller <fm...@apache.org>
 To: dev@chemistry.apache.org 
 Sent: Sunday, July 12, 2015 2:12 AM
 Subject: Web Services and Java 8/9
   
Hi,

The Web Service binding server implementation of OpenCMIS was based on 
the Sun JAX-WS RI. This JAX-WS implementation seems to have serious 
issues with Java 8 and 9 (see [1] and [2]).
The Web Service binding client implementation used the JAX-WS provided 
by the JRE. Because of some shortcomings of the JAX-WS specification we 
had to call a few internal APIs. That's not working anymore with 
upcoming Java 8 and 9 releases.

So, I have changed the Web Service binding implementation (client and 
server) to use Apache CXF 3.0 instead.
This is a major change! It should not affect code that uses OpenCMIS, 
but it affects the deployment. OpenCMIS has now different dependencies. 
Updating to the next OpenCMIS release will need some more work and 
attention than before.

The new implementation (in trunk) is complete but not well tested. The 
TCK passes and my smoke tests were all successful so far. It would be 
great if someone else could test it as well.


- Florian



[1] https://issues.apache.org/jira/browse/CMIS-917
[2| 
https://mail-archives.apache.org/mod_mbox/chemistry-dev/201506.mbox/%3C2FBF817A4032C64CA8DE5F4F73ED93A4438F3EEE%40otmucxg20.opentext.net%3E