cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r837674 - in /websites/production/cxf/content: cache/docs.pageCache docs/xslt-feature.html
Date Thu, 08 Nov 2012 16:47:57 GMT
Author: buildbot
Date: Thu Nov  8 16:47:57 2012
New Revision: 837674

Production update by buildbot for cxf


Modified: websites/production/cxf/content/cache/docs.pageCache
Binary files - no diff available.

Added: websites/production/cxf/content/docs/xslt-feature.html
--- websites/production/cxf/content/docs/xslt-feature.html (added)
+++ websites/production/cxf/content/docs/xslt-feature.html Thu Nov  8 16:47:57 2012
@@ -0,0 +1,253 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+    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
+    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.
+  <head>
+    <link type="text/css" rel="stylesheet" href="">
+    <script src="" type="text/javascript"></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 - XSLT Feature">
+    <title>
+Apache CXF -- XSLT Feature
+    </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">
+      <div style="padding: 5px;">
+        <div id="banner">
+          <!-- Banner -->
+<div id="banner-content">
+<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left"
colspan="1" nowrap>
+<a shape="rect" href="" 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="" title="The Apache Sofware Foundation"><img
border="0" alt="ASF Logo" src=""></a>
+          <!-- Banner -->
+        </div>
+      </div>
+      <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="configuration.html">Configuration</a>&nbsp;&gt;&nbsp;<a
href="featureslist.html">FeaturesList</a>&nbsp;&gt;&nbsp;<a href="xslt-feature.html">XSLT
+                <!-- Breadcrumbs -->
+              </div>
+            </td>
+            <td>
+              <div align="right">
+                <!-- Quicklinks -->
+<div id="quicklinks"><p><a shape="rect" href="">Download</a>
| <a shape="rect" href="">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" type="square"><li><a shape="rect"
href="overview.html" title="Overview">Overview</a></li><li><a shape="rect"
href="how-tos.html" title="How-Tos">How-Tos</a></li><li><a shape="rect"
href="frontends.html" title="Frontends">Frontends</a></li><li><a shape="rect"
href="databindings.html" title="DataBindings">DataBindings</a></li><li><a
shape="rect" href="transports.html" title="Transports">Transports</a></li><li><a
shape="rect" href="configuration.html" title="Configuration">Configuration</a></li><li><a
shape="rect" href="debugging-and-logging.html" title="Debugging and Logging">Debugging
and Logging</a></li><li><a shape="rect" href="tools.html" title="Tools">Tools</a></li><li><a
shape="rect" href="restful-services.html" title="RESTful Services">RESTful Services</a></li><li><a
shape="rect" href="wsdl-bindings.html" title="WSDL Bindings">WSDL Bindings</a></li><li><a
shape="rect" href="service-routing.html" title="Service Routing">Service 
 Routing</a></li><li><a shape="rect" href="dynamic-languages.html" title="Dynamic
Languages">Dynamic Languages</a></li><li><a shape="rect" href="ws-support.html"
title="WS-* Support">WS-* Support</a></li><li><a shape="rect" href="advanced-integration.html"
title="Advanced Integration">Advanced Integration</a></li><li><a shape="rect"
href="deployment.html" title="Deployment">Deployment</a></li><li><a
shape="rect" href="schemas-and-namespaces.html" title="Schemas and Namespaces">Use of Schemas
and Namespaces</a></li></ul>
+<ul class="alternate" type="square"><li>Search
+<form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="">
+  <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>
+<script type="text/javascript" src=";lang=en"></script>
+<ul class="alternate" type="square"><li><a shape="rect" href="">API
(Javadoc)</a></li><li><a shape="rect" href="">CXF
+                    <!-- NavigationBar -->
+                  </div>
+              </div>
+            </div>
+          </div>
+         </td>
+         <td height="100%">
+           <!-- Content -->
+           <div class="wiki-content">
+<div id="ConfluenceContent"><p><span style="font-size:2em;font-weight:bold">
XSLT Feature </span></p>
+<ul><li><a shape="rect" href="#XSLTFeature-WhenshouldIuseTransformationFeatureandwhenXSLTFeature%3F">When
should I use Transformation Feature and when XSLT Feature?</a></li><li><a
shape="rect" href="#XSLTFeature-Springconfiguration">Spring configuration</a></li><li><a
shape="rect" href="#XSLTFeature-ConfiguringtheXSLTFeaturefromtheSpring%2FBluepring">Configuring
the XSLT Feature from the Spring/Bluepring</a></li><li><a shape="rect"
href="#XSLTFeature-ConfiguringtheXSLTinterceptorsincode">Configuring the XSLT interceptors
in code</a></li><li><a shape="rect" href="#XSLTFeature-XSLTinterceptorsandphases">XSLT
interceptors and phases</a></li><li><a shape="rect" href="#XSLTFeature-Supportedmessagecontents">Supported
message contents</a></li></ul></div>
+<p>The CXF XSLT Feature is alternative to <a shape="rect" href="">CXF
Transformation Feature</a> providing flexible way to do the dynamic transformations
of XML messages. <br clear="none">
+XSLT Feature applies custom XSL transformations to inbound and/or outbound messages.</p>
+<h1><a shape="rect" name="XSLTFeature-WhenshouldIuseTransformationFeatureandwhenXSLTFeature%3F"></a>When
should I use Transformation Feature and when XSLT Feature?</h1>
+<p>If only trivial transformations must be done, it is recommended to use lightweight
and fast Transformation Feature. It covers the most use cases as:</p>
+<ul><li>dropping the namespace of the outbound messages;</li><li>qualifying
the incoming message;</li><li>changing namespaces;</li><li>appending
or dropping elements;</li><li>converting attributes to elements.</li></ul>
+<p>Transformation Feature is completely stream oriented and work fast especially for
large messages.</p>
+<p>If you should apply non-trivial transformation, not supported by Transformation
Feature - it is use case for XSLT Feature. Here you can write any custom XSL Transformation
and apply it to inbound and/or outbound messages.<br clear="none">
+As far as Xalan XSLT engine is not completely stream oriented, XSLT Feature breaks streaming.
However it uses high-performance DTM (Document Table Model) instead complete DOM model. Performance
can be improved in the future by using newer versions of Xalan or other XSLT engines (like
Saxon or STX oriented Joost).</p>
+<h1><a shape="rect" name="XSLTFeature-Springconfiguration"></a>Spring configuration</h1>
+<p>It is necessary to configure XSLT script for inbound or/and outbound transformation.
Example: </p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+    <span class="code-tag">&lt;bean id=<span class="code-quote">"xsltFeature"</span>
class=<span class="code-quote">"org.apache.cxf.feature.transform.XSLTFeature"</span>&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"inXSLTPath"</span>
value=<span class="code-quote">"requestTransformation.xsl"</span> /&gt;</span>
+        <span class="code-tag">&lt;property name=<span class="code-quote">"outXSLTPath"</span>
value=<span class="code-quote">"responseTransformation.xsl"</span> /&gt;</span>
+    <span class="code-tag">&lt;/bean&gt;</span>
+<p>The XSLT scripts should be available from the classpath.</p>
+<h1><a shape="rect" name="XSLTFeature-ConfiguringtheXSLTFeaturefromtheSpring%2FBluepring"></a>Configuring
the XSLT Feature from the Spring/Bluepring</h1>
+<p>The feature can be configured from the code for JAX-WS or JAX-RS clients and endpoints.
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+	&lt;jaxws:client id=<span class="code-quote">"customerService"</span> serviceName=<span
+		endpointName=<span class="code-quote">"customer:CustomerServiceEndpoint"</span>
address=<span class="code-quote">"http://localhost:9091/CustomerServicePort"</span>
+		serviceClass=<span class="code-quote">"com.example.customerservice.CustomerService"</span>&gt;
+		<span class="code-tag">&lt;jaxws:features&gt;</span>
+			<span class="code-tag">&lt;ref bean=<span class="code-quote">"xsltFeature"</span>
+		<span class="code-tag">&lt;/jaxws:features&gt;</span>
+	<span class="code-tag">&lt;/jaxws:client&gt;</span>
+	&lt;jaxws:endpoint <span class="code-keyword">xmlns:customer</span>=<span
+		id=<span class="code-quote">"CustomerServiceHTTP"</span> address=<span class="code-quote">"http://localhost:9090/CustomerServicePort"</span>
+		serviceName=<span class="code-quote">"customer:CustomerServiceService"</span>
endpointName=<span class="code-quote">"customer:CustomerServiceEndpoint"</span>
+		implementor=<span class="code-quote">"com.example.customerservice.server.CustomerServiceImpl"</span>&gt;
+		<span class="code-tag">&lt;jaxws:features&gt;</span>
+                      <span class="code-tag">&lt;ref bean=<span class="code-quote">"xsltFeature"</span>
+		<span class="code-tag">&lt;/jaxws:features&gt;</span>
+	<span class="code-tag">&lt;/jaxws:endpoint&gt;</span>
+<h1><a shape="rect" name="XSLTFeature-ConfiguringtheXSLTinterceptorsincode"></a>Configuring
the XSLT interceptors in code</h1>
+<p>Here is how a JAX-WS client can be configured:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+  CustomerServiceService service = <span class="code-keyword">new</span> CustomerServiceService();
+  CustomerService customerService = service.getCustomerServicePort();
+  Client client = ClientProxy.getClient(customerService);
+  XSLTOutInterceptor outInterceptor = <span class="code-keyword">new</span> XSLTOutInterceptor(Phase.PRE_STREAM,
StaxOutInterceptor.class, <span class="code-keyword">null</span>,
+                                                                   XSLT_REQUEST_PATH);
+  client.getOutInterceptors().add(outInterceptor);
+<h1><a shape="rect" name="XSLTFeature-XSLTinterceptorsandphases"></a>XSLT
interceptors and phases</h1>
+<p>By default XSLT interceptors run on POST_STREAM and PRE_STREAM phases.<br clear="none">
+In some cases it may be needed to change the phase, for example, the in transformation has
to be applied after the encrypted payload has been decrypted and its signature checked. For
such transformations to succeed XLSTInInterceptor will need to be created with a constructor
accepting a 'phase' String parameter, for the interceptor to run after the decryption and
signature validation actions have been performed.</p>
+<h1><a shape="rect" name="XSLTFeature-Supportedmessagecontents"></a>Supported
message contents</h1>
+<p>The XSLT interceptors support following message contents: </p>
+<p>Therefore the interceptors can be used on different phases. XSLT Interceptors were
tested with JMS Transport uses JMS Text messages (produces Reader/Writer message contents).</p></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="">Privacy Policy</a>
+         (<a href="">edit
+	 (<a href=";showComments=true&amp;showCommentArea=true#addcomment">add
+	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
+       </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>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-4458903-1");
+} catch(err) {}</script>

View raw message