JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS XSLT Service Engine Tutorial     Java CAPS Documentation
search filter icon
search icon

Document Information

XSLT Designer: Simple Transformation Tutorial

Overview

Configuring the Tutorial Environment

Creating the XSLT Module Project

To Create a New XSLT Module Project

Creating XML Schemas

To Create the XML Schema for the Incoming Message

To Create the XML Schema for the Outgoing Message

Creating a WSDL File

To Create a WSDL File

Creating an XSLT Service

To Create an XSLT Service

To Populate the XSL Stylesheet

Creating and Deploying the Composite Application

To Create a Composite Application Project

To Add a JBI Module

To Deploy the HelloXSLTCAP Composite Application

Performing a Test Run of the XSL Transformation Service

To Create a Test Case

To Test the Application:

Creating an XSLT Service

In this step, you will create a simple request-reply XSLT service, which is a web service that receives input messages, transforms them in accordance with an XSL stylesheet, and sends them back.

To Create an XSLT Service

  1. In the Projects window, right-click the HelloXSLTransformation > Transformation Files node and choose New > XSLT Service.
  2. In the Service Type window, ensure that the Request-Reply Service radio button is selected and click Next.
  3. In the next step, enter HelloXSLTService as the service name and click Choose to select Operation for the service.
  4. In the TransformMap Service Parameters window, expand the upper node with the target namespace until you see the operation, select HelloXSLTWSDLOperation and click Next.
    image:Select Operation for the service
  5. Click Finish. The HelloXSLTService.xsl file opens in the XSLT Editor, where you can only view and edit the source code.

    Now you need to populate the XSL stylesheet with the transformation rules. The XSL stylesheet defines how to transform the input XML document. In this version of the XSLT Designer, you can only edit the source code in the Source view.

To Populate the XSL Stylesheet

  1. Open the HelloXSLTService.xsl file and type in the following code:

    <?xml version="1.0" encoding="UTF-8"?>

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.

    xmlns:ns1="http://xml.netbeans.org/schema/HelloXSLTIncoming

    xmlns:ns="http://xml.netbeans.org/schema/HelloXSLTOutgoing"

    <xsl:template match="/">

    <xsl:element name="ns:greeting">

    <xsl:value-of select="concat(&apos;Hello &apos;, /ns1:name)"/>

    </xsl:element>

    </xsl:template>

    </xsl:stylesheet>

  2. Press the Validate File button on the toolbar to ensure that the code has no errors.
  3. Right-click the HelloXSLTransformation node and choose Clean and Build from the drop-down menu to build the project. You should see the BUILD SUCCESSFUL message after building the project completes.