![]() |
The list below comprises the topics covered in Understanding the XSLT Designer:
In this tutorial you become acquainted with the XSLT Designer included in NetBeans IDE 6.1. The XSLT Designer is used to develop, deploy and test XSL Transformation Services.
An XSL Transformation Service acts as a web service. It receives messages from an external client, transforms the messages in accordance with an XSL stylesheet, and either sends the messages back to the originator or forwards them to another web service.
In this tutorial you create a simple XSL Transformation Service that receives a message, transforms it, and sends it back to the calling web service.
This tutorial assumes that you have some basic knowledge of, or programming experience with, the NetBeans IDE.
This tutorial assumes that your system meets the requirements specified in the System Requirements section of the Netbeans IDE 6.1 Release Notes.
Before you begin, download and install the following software on your computer: http://www.netbeans.org/downloads/index.html
. Click the Download button under the All column. This option includes all the features and servers required for this tutorial.
This tutorial requires that the GlassFish V2 Application Server, which includes the JBI runtime, has been installed with NetBeans IDE 6.1. Perform the following steps to confirm that GlassFish V2 Application Server is installed with NetBeans IDE 6.1 and that the JBI runtime contains the XSLT Service Engine and Transform Shared Library required for this tutorial:
![]() |
An XSL Transformation Service is created within an XSLT Module project.
![]() |
![]() |
You will create two XML Schemas: HelloXSLTIncoming.xsd and HelloXSLTOutgoing.xsd. You use the former as the basis for the incoming message and the latter as the basis for the outgoing message.
![]() |
![]() |
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xml.netbeans.org/schema/HelloXSLTIncoming"
xmlns:tns="http://xml.netbeans.org/schema/HelloXSLTIncoming"
elementFormDefault="qualified">
<xsd:element name="name" type="xsd:string"></xsd:element>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xml.netbeans.org/schema/HelloXSLTOutgoing"
xmlns:tns="http://xml.netbeans.org/schema/HelloXSLTOutgoing"
elementFormDefault="qualified">
<xsd:element name="greeting" type="xsd:string"></xsd:element>
</xsd:schema>
![]() |
Next you create a web service description file defining the web interface of our XSL Transformation Service.
![]() |
![]() |
![]() |
An XSLT project is not directly deployable. You must first add an XSLT project as a JBI module to a Composite Application project before you can deploy the Composite Application project. Deploying the project makes the service assembly available to the application server, thus allowing its service units to be run.
![]() |
![]() |
![]() |
![]() |
Testing an XSL Transformation Service means sending a message that the Service is expecting and receiving, in this case, a reply message.
Before we can perform the testing, we must create a test case.
![]() |
<hel:name>?string?</hel:name>
line to
<hel:name>John Smith</hel:name>
The Input.xml file should be:
<soapenv:Envelope xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://xml.netbeans.org/schema/HelloXSLTIncoming">
<soapenv:Body>
<hel:name>John Smith</hel:name>
</soapenv:Body>
</soapenv:Envelope>
![]() |
![]() |
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://xml.netbeans.org/schema/HelloXSLTOutgoing">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns:greeting xmlns:ns="http://xml.netbeans.org/schema/HelloXSLTOutgoing">Hello John Smith</ns:greeting>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Notice the line
<ns:greeting xmlns:ns="http://xml.netbeans.org/schema/HelloXSLTOutgoing">Hello John Smith</ns:greeting>
The XSL Transformation Service received the name, concatenated it with the string 'Hello' and sent the reply message.
![]() |
You have successfully created, deployed and tested an XSL Transformation Service. Now that you have successfully created the Request-Reply XSL Transformation Service, continue with the Service Bridge type.
This page (revision-16) was last changed on
09-Dec-08 16:09 PM, -0800
by MMoussa.
This page was created on
05-Nov-08 15:45 PM, -0800 by SWeber.
| Version | Date | Author | Size | Changes ... |
|---|---|---|---|---|
| 16 | 09-Dec-08 16:09 PM, -0800 | MMoussa | 14091 | to previous |
| 15 | 05-Dec-08 16:06 PM, -0800 | MMoussa | 16939 | to previous | to last |
| 14 | 05-Dec-08 10:33 AM, -0800 | SWeber | 16941 | to previous | to last |
| 13 | 04-Dec-08 16:48 PM, -0800 | MMoussa | 16943 | to previous | to last |
| 12 | 04-Dec-08 16:34 PM, -0800 | MMoussa | 16465 | to previous | to last |
| 11 | 04-Dec-08 16:31 PM, -0800 | MMoussa | 16417 | to previous | to last |
| 10 | 04-Dec-08 16:25 PM, -0800 | MMoussa | 16407 | to previous | to last |
| 9 | 04-Dec-08 16:22 PM, -0800 | MMoussa | 16345 | to previous | to last |
| 8 | 04-Dec-08 16:04 PM, -0800 | MMoussa | 16281 | to previous | to last |
| 7 | 04-Dec-08 15:51 PM, -0800 | MMoussa | 16289 | to previous | to last |
| 6 | 04-Dec-08 15:16 PM, -0800 | Kevin Hopke | 211 | to previous | to last |
| 5 | 04-Dec-08 15:16 PM, -0800 | Kevin Hopke | 230 | to previous | to last |
| 4 | 06-Nov-08 14:41 PM, -0800 | SWeber | 207 | to previous | to last |
| 3 | 05-Nov-08 21:56 PM, -0800 | Kevin Hopke | 183 | to previous | to last |
| 2 | 05-Nov-08 16:37 PM, -0800 | SWeber | 207 | to previous | to last |
| 1 | 05-Nov-08 15:45 PM, -0800 | SWeber | 211 | to last |
