You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2018/03/07 15:56:41 UTC
svn commit: r1026401 - in /websites/production/cxf/content:
cache/docs.pageCache docs/xslt-feature.html
Author: buildbot
Date: Wed Mar 7 15:56:41 2018
New Revision: 1026401
Log:
Production update by buildbot for cxf
Modified:
websites/production/cxf/content/cache/docs.pageCache
websites/production/cxf/content/docs/xslt-feature.html
Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/cxf/content/docs/xslt-feature.html
==============================================================================
--- websites/production/cxf/content/docs/xslt-feature.html (original)
+++ websites/production/cxf/content/docs/xslt-feature.html Wed Mar 7 15:56:41 2018
@@ -118,19 +118,19 @@ Apache CXF -- XSLT Feature
<!-- Content -->
<div class="wiki-content">
<div id="ConfluenceContent"><h1 id="XSLTFeature-XSLTFeature">XSLT Feature</h1><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1511272610095 {padding: 0px;}
-div.rbtoc1511272610095 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1511272610095 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1520438163171 {padding: 0px;}
+div.rbtoc1520438163171 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1520438163171 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1511272610095">
-<ul class="toc-indentation"><li><a shape="rect" href="#XSLTFeature-XSLTFeature">XSLT Feature</a></li><li><a shape="rect" href="#XSLTFeature-WhenshouldIuseTransformationFeatureandwhenXSLTFeature?">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/Blueprint">Configuring the XSLT Feature from the Spring/Blueprint</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="http://cxf.apache.org/docs/transformationfeature.html">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 id="XSLTFeature-WhenshouldIuseTransformationFeatureandwhenXSLTFeature?">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 tran
sformation, 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 actually not completely stream oriented, XSLT Feature breaks streaming. However it uses high-performance DTM (Document Table Model) instead complete DOM model.<br clear="none"> Performance can be improved in the future by using further versions of Xalan or other XSLT engines (like Saxon or STX oriented Joost).</p><h1 id="XSLTFeature-Springconfiguration">Spring configuration</h1><p>It is necessary to configure XSLT script for inbound or/and outbound transformation. Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+/*]]>*/</style></p><div class="toc-macro rbtoc1520438163171">
+<ul class="toc-indentation"><li><a shape="rect" href="#XSLTFeature-XSLTFeature">XSLT Feature</a></li><li><a shape="rect" href="#XSLTFeature-WhenshouldIusetheTransformationFeatureandwhentheXSLTFeature?">When should I use the Transformation Feature and when the XSLT Feature?</a></li><li><a shape="rect" href="#XSLTFeature-Springconfiguration">Spring configuration</a></li><li><a shape="rect" href="#XSLTFeature-ConfiguringtheXSLTFeaturefromSpring/Blueprint">Configuring the XSLT Feature from Spring/Blueprint</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 an alternative to the <a shape="rect" href="http://cxf.apache.org/docs/transformationfeature.html">CXF Transformation Feature</a>, providing a flexible way to dynamically transform XML messages. <br clear="none"> The XSLT Feature applies custom XSL transformations to inbound and/or outbound messages.</p><h1 id="XSLTFeature-WhenshouldIusetheTransformationFeatureandwhentheXSLTFeature?">When should I use the Transformation Feature and when the XSLT Feature?</h1><p>If only trivial transformations must be done, it is recommended to use the lightweight and fast Transformation Feature. It covers most use cases such 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>The Transformation Feature is completely stream oriented and works fast especially for large messages.</p><p>If you sho
uld apply non-trivial transformations, not supported by Transformation Feature - it is a use case for the XSLT Feature. Here you can write any custom XSL Transformation and apply it to inbound and/or outbound messages.<br clear="none"> As the Xalan XSLT engine is actually not completely stream oriented, the XSLT Feature breaks streaming. However it uses the high-performance DTM (Document Table Model) instead of the complete DOM model.<br clear="none"> Performance can be improved in the future by using further versions of Xalan or other XSLT engines (like Saxon or STX oriented Joost).</p><h1 id="XSLTFeature-Springconfiguration">Spring configuration</h1><p>It is necessary to configure the location of the XSLT script for inbound or/and outbound transformation. Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> <bean id="xsltFeature" class="org.apache.cxf.feature.transform.XSLTFeature">
<property name="inXSLTPath" value="requestTransformation.xsl" />
<property name="outXSLTPath" value="responseTransformation.xsl" />
</bean>
</pre>
-</div></div><p>The XSLT scripts should be available from the classpath. If XSLT path is not specified, no transformation will be done.</p><h1 id="XSLTFeature-ConfiguringtheXSLTFeaturefromtheSpring/Blueprint">Configuring the XSLT Feature from the Spring/Blueprint</h1><p>The feature can be configured from the code for JAX-WS or JAX-RS clients and endpoints. Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The XSLT scripts should be available from the classpath. If the XSLT path is not specified, no transformation will be done.</p><h1 id="XSLTFeature-ConfiguringtheXSLTFeaturefromSpring/Blueprint">Configuring the XSLT Feature from Spring/Blueprint</h1><p>The feature can be configured in spring or blueprint for JAX-WS or JAX-RS clients and endpoints. Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> <jaxws:client id="customerService" serviceName="customer:CustomerServiceService"
endpointName="customer:CustomerServiceEndpoint" address="http://localhost:9091/CustomerServicePort"
serviceClass="com.example.customerservice.CustomerService">
@@ -156,7 +156,7 @@ div.rbtoc1511272610095 li {margin-left:
XSLT_REQUEST_PATH);
client.getOutInterceptors().add(outInterceptor);
</pre>
-</div></div><h1 id="XSLTFeature-XSLTinterceptorsandphases">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.<br clear="none"> For such transformations to succeed XLSTInInterceptor/XSLTOutInterceptor will need to be created with a constructor accepting a 'phase' String parameter.<br clear="none"> Additionally you can specify before and after interceptors for this phase as further constructor parameters.</p><h1 id="XSLTFeature-Supportedmessagecontents">Supported message contents</h1><p>The XSLT interceptors support following message contents:</p><ul><li>InputStream/OutputStream;</li><li>Reader/Writer;</li><li>XMLStreamReader/XMLStreamWriter.</li></ul><p>Therefore the interceptors can be used on different phases. XSLT Interceptors were t
ested with JMS Transport uses JMS Text messages (produces Reader/Writer message contents).</p></div>
+</div></div><h1 id="XSLTFeature-XSLTinterceptorsandphases">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.<br clear="none"> For such transformations to succeed XSLTInInterceptor/XSLTOutInterceptor will need to be created with a constructor accepting a 'phase' String parameter.<br clear="none"> Additionally you can specify before and after interceptors for this phase as further constructor parameters.</p><h1 id="XSLTFeature-Supportedmessagecontents">Supported message contents</h1><p>The XSLT interceptors support the following message contents:</p><ul><li>InputStream/OutputStream;</li><li>Reader/Writer;</li><li>XMLStreamReader/XMLStreamWriter.</li></ul><p>Therefore the interceptors can be used on different phases. XSLT Interceptors we
re tested with JMS Transport uses JMS Text messages (produces Reader/Writer message contents).</p></div>
</div>
<!-- Content -->
</td>