The following topics describe the XSLT Service Engine. About the XSLT Service Engine About the XSLT Service EngineThe XSLT SE is a Java based transformation engine that is used to convert XML documents from one data format to another. The XSLT SE makes it easier for users to configure and expose XSL style sheets as web services. Using the XSLT SE requires no special knowledge of XSL, but rather allows any XSL style sheet to be deployed as a JBI Service Unit. The XSLT Service Engine in and of itself does not perform any transformations. XSL style sheets implement a web service operation (as normally defined in a WSDL). When deployed as JBI Service Units (SUs), these SUs correspond to a service endpoint. Each endpoint is activated when the XSLT SU is deployed. In a sense, the XSLT SE is a “container” of XSL style sheets, each of which represents a service endpoint in the JBI environment. The following steps highlight the life cycle of a typical message using the XSLT SE:
XSLT SE FeaturesThe XSLT SE can support the following three Use Cases:
Request-Reply ("requestReplyService")A standard request-reply scenario. An XML message request is transformed and the result is sent back to the original consumer of the XSLT endpoint. The sequence of events include:
Invoke-Send ("filterOneWay")A standard one-way invocation. An XML message request is transformed, and the result is sent (not to the original consumer but rather) to another endpoint in the JBI environment. The sequence of events include:
Request-Invoke-Reply Chain ("filterRequestReply")A representation of the adapter pattern, this scenario applies two separate XSL transformations. This scenario is useful when there are two existing web services (having incompatible input and output) which must be integrated. The first existing service acts as a consumer to the XSLT endpoint, sending a request. This message is transformed to match the input of the second service. The second service is then invoked in an asynchronous manner. When the response from the second service arrives via the NMR, it is transformed to match the expected reply to the first (consuming) service. The sequence of events include:
Configuring the XSLT SENo special knowledge of XSL is required to configure an XSLT Service Unit. The only requirements are a WSDL configuration, an XSL style sheet, and the XSLT map configuration file. The creation of the WSDL–defining the service, port type, and creating the binding information for the service definition–is a separate step from the XSLT map configuration file. Properly configuring an XSLT SU means understanding what pieces to migrate from the WSDL into the XSLT map file. XSLT Projects contain a configuration file called xsltmap.xml. Most of the information needed to configure an XSLT Project as a JBI Service Unit is contained in a WSDL, which defines the operation an XSLT transformation is implementing. A sample configuration follows: Use Case # 1
Use Case # 2
Use Case # 3
The 'transformJBI' attribute To support multiple-part WSDL 1.1 message definitions, the JBI specification
defines an XML document format for “wrapping” WSDL 1.1
message parts. Since the XSLT Service Engine does not lend itself
to transforming multiple message parts, the XSLT SE instead supports
the transformation of the entire JBI message wrapper. To enable this
transformation, the transformJBI attribute flag must be set to It is important to note that when this attribute is set to A wrapped literal document must conform to the schema given in the listing below. default namespace jbi = "http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" start = element message { attribute version { xsd:decimal }, attribute type { xsd:QName }, attribute name { xsd:nmtoken }?, part* } part = element part { # part value ( (element* { text }) | text) } See the Java Business Integration (JBI) 1.0 specification for additional information on the normalized message context schema for wrapper document for WSDL 1.1-defined messages. The 'messageType' attribute To eliminate the need of parsing the WSDL to determine the output message definition (as it is required in a JBI message wrapper), this attribute must be specified for all non-JBI transformations. That is, if the 'transformJBI' attribute is "false", then the 'messageType' attribute MUST be specified. The value of this attribute usually takes the form: {msg-def-ns}msg-def. XSLT SE Component Limitations - Running the JBI Runtime SeparatelyDue to a dependency on the design-time XSLT project (part of the NetBeans IDE), XSLT service units used outside the NetBeans environment do not benefit from the functionality built into the XSLT project. Specifically, the generation of the SU's jbi.xml file and the creation of a distributable/deployable SU must be done manually.
|
||||||||||