blob: fdd018423e55a6d8393c2d3909866ced75c0b84f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<link type="text/css" rel="stylesheet" href="/resources/site.css">
<script src='/resources/space.js'></script>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="keywords" content="business integration, EAI, SOA, Service Oriented Architecture, web services, SOAP, JBI, JMS, WSDL, XML, EDI, Electronic Data Interchange, standards support, integration standards, application integration, middleware, software, solutions, services, CXF, open source">
<meta name="description" content="Apache CXF, Services Framework - 2.6 Migration Guide">
<title>
Apache CXF -- 2.6 Migration Guide
</title>
</head>
<body onload="init()">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td id="cell-0-0" colspan="2">&nbsp;</td>
<td id="cell-0-1">&nbsp;</td>
<td id="cell-0-2" colspan="2">&nbsp;</td>
</tr>
<tr>
<td id="cell-1-0">&nbsp;</td>
<td id="cell-1-1">&nbsp;</td>
<td id="cell-1-2">
<!-- Banner -->
<div class="banner" id="banner"><div><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
<a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
</td><td align="right" colspan="1" nowrap>
<a shape="rect" href="http://www.apache.org/" title="The Apache Sofware Foundation"><img border="0" alt="ASF Logo" src="http://cxf.apache.org/images/asf-logo.png"></a>
</td></tr></table></div></div>
<!-- Banner -->
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
<tr>
<td>
<div align="left">
<!-- Breadcrumbs -->
<a href="index.html">Index</a>&nbsp;&gt;&nbsp;<a href="how-tos.html">How-Tos</a>&nbsp;&gt;&nbsp;<a href="migration-guides.html">Migration Guides</a>&nbsp;&gt;&nbsp;<a href="26-migration-guide.html">2.6 Migration Guide</a>
<!-- Breadcrumbs -->
</div>
</td>
<td>
<div align="right">
<!-- Quicklinks -->
<div id="quicklinks"><p><a shape="rect" href="http://cxf.apache.org/download.html">Download</a> | <a shape="rect" href="http://cxf.apache.org/docs/index.html">Documentation</a></p></div>
<!-- Quicklinks -->
</div>
</td>
</tr>
</table>
</div>
</td>
<td id="cell-1-3">&nbsp;</td>
<td id="cell-1-4">&nbsp;</td>
</tr>
<tr>
<td id="cell-2-0" colspan="2">&nbsp;</td>
<td id="cell-2-1">
<table>
<tr valign="top">
<td height="100%">
<div id="wrapper-menu-page-right">
<div id="wrapper-menu-page-top">
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
<div id="navigation"><ul class="alternate"><li><a shape="rect" href="overview.html">Overview</a></li><li><a shape="rect" href="how-tos.html">How-Tos</a></li><li><a shape="rect" href="frontends.html">Frontends</a></li><li><a shape="rect" href="databindings.html">DataBindings</a></li><li><a shape="rect" href="transports.html">Transports</a></li><li><a shape="rect" href="configuration.html">Configuration</a></li><li><a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a></li><li><a shape="rect" href="tools.html">Tools</a></li><li><a shape="rect" href="restful-services.html">RESTful Services</a></li><li><a shape="rect" href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect" href="service-routing.html">Service Routing</a></li><li><a shape="rect" href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect" href="ws-support.html">WS-* Support</a></li><li><a shape="rect" href="advanced-integration.html">Advanced Integration</a></li><li><a shape="rect" href="deployment.html">Deployment</a></li><li><a shape="rect" href="schemas-and-namespaces.html">Use of Schemas and Namespaces</a></li></ul><hr><ul class="alternate"><li><p>Search</p></li></ul><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" size="21">
<input type="submit" name="sa" value="Search">
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p>&#160;</p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
<!-- NavigationBar -->
</div>
</div>
</div>
</div>
</td>
<td height="100%">
<!-- Content -->
<div class="wiki-content">
<div id="ConfluenceContent"><h3 id="id-2.6MigrationGuide-NewFeatures">New Features</h3>
<ul><li>The big OSGi bundle used in the Karaf features.xml has been replaced with the individual modules which are now all individual bundles. The big OSGi bundle is still built, but some features may not be available if that is used instead of the little bundles.</li><li>New ability to configure HTTP Conduits from the OSGi config:admin service</li><li>New ability to configure the CXF created HTTP Jetty ports from config:admin service</li><li>OAuth 2 support (new cxf-rt-rs-security-oauth2 module)</li><li>The STS now supports the Renewal binding for SAML tokens.</li><li>The STS also supports bulk issuing/validation/cancelling/renewal of security tokens.</li><li>The STS supports some advanced features based around Claims, such as Claims Transformation, and pluggable custom Claims Parsing.</li><li>The WS-Security module now supports replay detection by default of Timestamps and UsernameToken nonces.</li><li>New ability to register custom JAX-RS Context providers.</li><li>New <a shape="rect" href="annotations.html">@UseAsyncMethod</a> annotation for JAX-WS services.</li></ul>
<h3 id="id-2.6MigrationGuide-RemovedModules">Removed Modules</h3>
<ul><li>cxf-common-utilites was merged into cxf-api</li><li>cxf-rt-binding-http has been removed. It's been "deprecated" for a while and it's functionality has long been replaceable with the JAX-RS frontend.</li></ul>
<h3 id="id-2.6MigrationGuide-RemovedClasses">Removed Classes</h3>
<ul><li>org.apache.cxf.jaxrs.ext.codegen.CodeGeneratorProvider has been removed. Please use a wadl2java code-generator to generate the JAX-RS code.</li><li>org.apache.cxf.jaxrs.features.clustering.FailoverFeature has been removed. Please use the common org.apache.cxf.clustering.FailoverFeature instead.</li></ul>
<h3 id="id-2.6MigrationGuide-APIChanges">API Changes</h3>
<ul><li>All API's that take or return "generic" classes have been update to properly define the generic part. For example, methods like:<br clear="none">
"Class getServiceClass()" have been updated to be "Class&lt;?&gt; getServiceClass()"</li><li>To resolve some of the "split-package" issues between jars, SOME (very few) classes did have their packages changed.
<ul><li>org.apache.cxf.jaxb.JAXBUtils -&gt; org.apache.cxf.common.jaxb.JAXBUtils (and a couple other classes in that jaxb package)</li><li>Many of the internal "Impl" classes and "Managers" (like BindingFactoryManagerImpl, CXFBusLifeCycleManager, etc...) have moved into org.apache.cxf.bus.managers. Users should always rely on the interfaces they implement anyway.</li></ul>
</li><li>The selectedConduit field of AbstractConduitSelector has been removed as a ConduitSelector may be used to select multiple conduits depending on scenarios and the selectedConduit field may not accurately reflect the conduit that had been selected depending on the state of the threads, clients, etc...</li><li>The classes in org.apache.cxf.tools.common.extensions.soap have been moved to org.apache.cxf.binding.soap.wsdl.extensions to remove a runtime dependency on the tooling modules.</li><li>org.apache.cxf.tools.common.DataTypeAdapter has been deprecated and moved to org.apache.cxf.xjc.runtime.DataTypeAdapter in a new runtime jar that is part of the cxf-xjc package. This allows using the runtime without bringing in all the CXF tooling dependencies. The DataTypeAdapter doesn't have any other CXF dependencies and thus is usable outside of CXF as well.</li><li>The XJC "ToString" plugin also had it's runtime dependencies moved out of org.apache.cxf.tools and into the cxf-xjc-runtime jar. If you use the newer version of the ToString plugin, you will need to add the cxf-xjc-runtime dependency to your application. However, the cxf-xjc-runtime jar does not depend on other CXF jars or classes and can thus be easily used in other applications without as many dependencies pulled in.</li></ul>
<h3 id="id-2.6MigrationGuide-DependencyChanges">Dependency Changes</h3>
<ul><li>The org.apache.cxf.tools.* classes that were in cxf-api have been moved into cxf-tools-common or cxf-tools-validator.</li><li>The org.apache.cxf.ws.policy classes that were in cxf-api have been moved into cxf-rt-ws-policy.</li><li>cxf-common-utilities is no longer available. All the classes in there were moved into cxf-api to represent a complete "api".</li><li>Various classes in cxf-rt-core and cxf-rt-ws-addr have been moved up to cxf-api to resolve split-package issues. Dependencies on cxf-rt-core would have transitively brought in cxf-api anyway, so there should be little impact.</li><li>Spring is now an optional component of the http-jetty transports module and other modules. Applications that may have pulled in Spring transitively via CXF will be required to declare required spring dependencies in their own poms directly.</li><li>Most of the optional JAX-RS Providers have been moved out of the cxf-rt-frontend-jaxrs module and into a cxf-rt-rs-extension-providers module with the various dependencies marked optional/provided. Applications that use these optional providers will need to add the required dependencies. Also, the package names of those providers has changed to resolve split-package issues. Example: org.apache.cxf.jaxrs.provider.JSONProvider to org.apache.cxf.jaxrs.provider.json.JSONProvider. 'org.apache.cxf.jaxrs.provider.aegis' is the new package for for Aegis providers,<br clear="none">
'org.apache.cxf.jaxrs.provider.xmlbeans' for XMLBeans providers and 'org.apache.cxf.jaxrs.provider.atom' - for Atom providers.</li><li>EhCache is now a compile time dependency of the cxf-rt-ws-security module to support caching and replay detection. It can be safely excluded downstream, at the expense of weakening the caching support.</li><li>CORS package has changed to org.apache.cxf.rs.security.cors and moved to a new cxf-rt-rs-security-cors module.</li><li>JAX-RS Search extension code has been moved to a new cxf-rt-rs-extension-search module.</li></ul>
<h3 id="id-2.6MigrationGuide-RuntimeChanges">Runtime Changes</h3>
<ul><li>The syntax of WS-SecurityPolicy policies is enforced more strictly. Some policies that worked with CXF &lt; 2.6 will not load in CXF 2.6 as a result.</li><li>JMS Transport - when using TextMessage, CXF now leaves the contents as a String and uses java.io.Reader and java.io.Writer to boost performance. Previously, CXF would convert the Strings to/from byte[] requiring use of encoders, increasing memory usage, etc... However, some interceptors and functionality in CXF (or user interceptors) may expect or require they InputStream/OutputStreams, not Reader/Writer. In those cases, you may need to change to use a BytesMessage. For example, the FastInfoset feature and GZIP features expect to work on InputStream/OutputStream and thus would now work with TextMessage.</li></ul>
<h3 id="id-2.6MigrationGuide-SecurityCachingChanges">Security Caching Changes</h3>
<ul><li>EhCache is now used by default to cache SecurityTokens for re-use, and for replay detection. It is possible to plug in other implementations by configuration.</li><li>The WS-Security module now supports replay detection by default of Timestamps and UsernameToken nonces. The default caching time is 60 minutes.</li><li>The STS now issues SAML and SecurityContextTokens with a default lifetime of 30 minutes (they are also stored in the cache for this length of time).</li></ul></div>
</div>
<!-- Content -->
</td>
</tr>
</table>
</td>
<td id="cell-2-2" colspan="2">&nbsp;</td>
</tr>
<tr>
<td id="cell-3-0">&nbsp;</td>
<td id="cell-3-1">&nbsp;</td>
<td id="cell-3-2">
<div id="footer">
<!-- Footer -->
<div id="site-footer">
<a href="http://cxf.apache.org/privacy-policy.html">Privacy Policy</a> -
(<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27835345">edit page</a>)
(<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27835345&amp;showComments=true&amp;showCommentArea=true#addcomment">add comment</a>)<br>
Apache CXF, CXF, Apache, the Apache feather logo are trademarks of The Apache Software Foundation.<br>
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</div>
<!-- Footer -->
</div>
</td>
<td id="cell-3-3">&nbsp;</td>
<td id="cell-3-4">&nbsp;</td>
</tr>
<tr>
<td id="cell-4-0" colspan="2">&nbsp;</td>
<td id="cell-4-1">&nbsp;</td>
<td id="cell-4-2" colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4458903-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>