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/04/05 09:57:29 UTC

svn commit: r1027888 - in /websites/production/cxf/content: cache/docs.pageCache docs/xslt-feature.html

Author: buildbot
Date: Thu Apr  5 09:57:29 2018
New Revision: 1027888

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 Thu Apr  5 09:57:29 2018
@@ -118,35 +118,35 @@ 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.rbtoc1520438163171 {padding: 0px;}
-div.rbtoc1520438163171 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1520438163171 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1522922211262 {padding: 0px;}
+div.rbtoc1522922211262 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1522922211262 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1520438163171">
+/*]]>*/</style></p><div class="toc-macro rbtoc1522922211262">
 <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;">    &lt;bean id="xsltFeature" class="org.apache.cxf.feature.transform.XSLTFeature"&gt;
-        &lt;property name="inXSLTPath" value="requestTransformation.xsl" /&gt;
-        &lt;property name="outXSLTPath" value="responseTransformation.xsl" /&gt;
-    &lt;/bean&gt;
+</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. 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. 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;">&lt;bean id="xsltFeature" class="org.apache.cxf.feature.transform.XSLTFeature"&gt;
+    &lt;property name="inXSLTPath" value="requestTransformation.xsl" /&gt;
+    &lt;property name="outXSLTPath" value="responseTransformation.xsl" /&gt;
+&lt;/bean&gt;
 </pre>
 </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;">	&lt;jaxws:client id="customerService" serviceName="customer:CustomerServiceService"
-		endpointName="customer:CustomerServiceEndpoint" address="http://localhost:9091/CustomerServicePort"
-		serviceClass="com.example.customerservice.CustomerService"&gt;
-		&lt;jaxws:features&gt;
-			&lt;ref bean="xsltFeature" /&gt;
-		&lt;/jaxws:features&gt;
-	&lt;/jaxws:client&gt;
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;jaxws:client id="customerService" serviceName="customer:CustomerServiceService"
+    endpointName="customer:CustomerServiceEndpoint" address="http://localhost:9091/CustomerServicePort"
+    serviceClass="com.example.customerservice.CustomerService"&gt;
+	&lt;jaxws:features&gt;
+		&lt;ref bean="xsltFeature" /&gt;
+	&lt;/jaxws:features&gt;
+&lt;/jaxws:client&gt;
 
-	&lt;jaxws:endpoint xmlns:customer="http://customerservice.example.com/"
-		id="CustomerServiceHTTP" address="http://localhost:9090/CustomerServicePort"
-		serviceName="customer:CustomerServiceService" endpointName="customer:CustomerServiceEndpoint"
-		implementor="com.example.customerservice.server.CustomerServiceImpl"&gt;
-		&lt;jaxws:features&gt;
-                      &lt;ref bean="xsltFeature" /&gt;
-		&lt;/jaxws:features&gt;
-	&lt;/jaxws:endpoint&gt;
+&lt;jaxws:endpoint xmlns:customer="http://customerservice.example.com/"
+	id="CustomerServiceHTTP" address="http://localhost:9090/CustomerServicePort"
+	serviceName="customer:CustomerServiceService" endpointName="customer:CustomerServiceEndpoint"
+	implementor="com.example.customerservice.server.CustomerServiceImpl"&gt;
+	&lt;jaxws:features&gt;
+        &lt;ref bean="xsltFeature" /&gt;
+	&lt;/jaxws:features&gt;
+&lt;/jaxws:endpoint&gt;
 </pre>
 </div></div><h1 id="XSLTFeature-ConfiguringtheXSLTinterceptorsincode">Configuring the XSLT interceptors in code</h1><p>Here is how a JAX-WS client can be configured:</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;">  CustomerServiceService service = new CustomerServiceService();
@@ -156,7 +156,7 @@ div.rbtoc1520438163171 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 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></div><h1 id="XSLTFeature-XSLTinterceptorsandphases">XSLT interceptors and phases</h1><p>By default XSLT interceptors run on POST_STREAM and PRE_STREAM phases. 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 XSLTInInterceptor/XSLTOutInterceptor will need to be created with a constructor accepting a 'phase' String parameter. 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 were tested with JMS Transport uses JMS Text messages
  (produces Reader/Writer message contents).</p></div>
            </div>
            <!-- Content -->
          </td>