|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (33)
View Page History{note}
This is due to a bug of Xalan. To by-pass it, you have to use a newer version of Xalan (2.7.1 \+).
Since the JDK already embeds Xalan, you have to force it to use your version with the [Java *endorsed* mechanism|http://download.oracle.com/javase/6/docs/technotes/guides/standards/index.html].
You can find additional information about it on these web sites:
* [http://www.w3schools.com/XSL/el_param.asp]
* http://www.w3schools.com/XSL/el_param.asp [http://projects.ischool.washington.edu/tabrooks/545/ContentManagement/PassingParameters.htm]
* http://projects.ischool.washington.edu/tabrooks/545/ContentManagement/PassingParameters.htm
\\
The Petals XSLT component allows you to set XSL parameters in two different ways:
* The first one is a static definition in the jbi.xml.
** It allows you to reuse a same XSL style sheet in several services.
** Take a look at the [jbi.xml's parameters|Petals-SE-XSLT 2.4#JBI descriptor] for more information.
** Take a look at the [jbi.xml's parameters|Petals-SE-XSLT 2.4#JBI descriptor] for more information.
* The second way is by setting them at runtime, in the message properties.
** Please, understand that this is not the message payload that defines the parameter values.
** It is the properties of the incoming Petals service (called an exchange). For more details, see Exchange#setInMessageProperty( String, Object ).
** It is the properties of the incoming Petals service (called an exchange). For more details, see Exchange#setInMessageProperty( String, Object ).
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBI descriptor for the Petals' "petals-se-xslt" component (XSLT).
Originally created for the version 2.4 of the component.
-->
Originally created for the version 2.4 of the component.
-->
<jbi:jbi version="1.0"
xmlns:generatedNs="http://petals.ow2.org/components/xslt/version-2"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xslt="http://petals.ow2.org/components/xslt/version-2">
xmlns:xslt="http://petals.ow2.org/components/xslt/version-2">
<!-- Import a Service into Petals or Expose a Petals Service => use a BC. -->
<jbi:services binding-component="false">
<jbi:services binding-component="false">
<!-- Import a Service into Petals => provides a Service. -->
<jbi:provides
interface-name="generatedNs:XsltInterface"
service-name="generatedNs:Test"
endpoint-name="TestEndpoint">
service-name="generatedNs:Test"
endpoint-name="TestEndpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
<petalsCDK:wsdl>XsltService.wsdl</petalsCDK:wsdl>
<petalsCDK:wsdl>XsltService.wsdl</petalsCDK:wsdl>
<!-- Component specific elements -->
<xslt:stylesheet>transformation.xsl</xslt:stylesheet>
<!-- XSL parameters -->
<generatedNs:xsl-parameters>
<generatedNs:xsl-parameters>
Grenoble
</generatedNs:xsl-parameter>
</generatedNs:xsl-parameter>
</generatedNs:xsl-parameters>
</jbi:provides>
</jbi:services>
</jbi:services>
\\
*Configuration of a Service-Unit to expose an XSLT service into Petals ESB:*
{include:0 CDK SU Provide Configuration}
\\
{center}*Configuration of a Service Unit to provide a service (XSLT)*{center}
{table-plus}
{table-plus}
|| Parameter || Description || Default || Required ||
| stylesheet | The relative file path of the XSL style sheet in the service-unit \\ | {center}\-{center} | {center}Yes{center} |
| output-attachment-name | The attachment name to use when the *transformToMtomAttachment* operations is invoked \\ | {center}\-{center} | {center}No{center} |
| xsl-parameters | A list of *xsl-parameter* elements \\ | {center}\-{center} | {center}No{center} |
{table-plus}
{include:0 CDK SU Interceptor configuration}
{include:0 CDK SU Interceptor configuration}
\\
* The *overridable* attribute defines whether this static value can be overriden by a dynamic value (from an incoming message).
\\
{include:0 CDK SU Provide Configuration}
\\
{include:0 CDK Interceptor configuration for SU}
h2. Service-Unit content
The component can be configured through its JBI descriptor file, as shown below.
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi
version="1.0"
xmlns='http://java.sun.com/xml/ns/jbi'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:xslt="http://petals.ow2.org/components/xslt/version-2">
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:xslt="http://petals.ow2.org/components/xslt/version-2">
<component type="service-engine">
<identification>
<identification>
<description>A Xslt Service Engine</description>
</identification>
</identification>
<component-class-name description="Xslt Component class">org.ow2.petals.se.xslt.XsltSe</component-class-name>
<component-class-path><path-element/></component-class-path>
<bootstrap-class-name>org.ow2.petals.component.framework.DefaultBootstrap</bootstrap-class-name>
<bootstrap-class-path><path-element/></bootstrap-class-path>
<component-class-path><path-element/></component-class-path>
<bootstrap-class-name>org.ow2.petals.component.framework.DefaultBootstrap</bootstrap-class-name>
<bootstrap-class-path><path-element/></bootstrap-class-path>
<petalsCDK:acceptor-pool-size>3</petalsCDK:acceptor-pool-size>
<petalsCDK:processor-pool-size>10</petalsCDK:processor-pool-size>
<petalsCDK:processor-pool-size>10</petalsCDK:processor-pool-size>
\\
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.
{include:0 CDK Component Configuration Table}
\\
{include:0 CDK Component Configuration Table 2.0}
{include:0 CDK Parameter scope}
{include:0 CDK Component Interceptor configuration}
\\
{include:0 CDK Parameter scope}
{include:0 CDK Component Interceptor configuration}
\\
This component does not have any specific configuration parameter.