Working with XSLT Service Engine: Part 2

Project summary: In This project, I am going to do xml to xml transformation using Service Bridge. Please Check working with XSLT Service Engine Part 1 for more details about XSLT Service engine and sample project for Request-Reply service of XSLT service Engine. In this sample project I am going to take customer information like Name , Address , Personal Data in separate node and then merge all above info in single node. Creating Sample Project Using   Service Bridge (xml to xml transformation) In Service Bridge we can apply multiple xml transformation on request xml and then send output back to source. We need to have same number of wsdl operation as number of transformation we want to do. In this project I am going to apply two xml transformations. So I need to create two wsdl as webservice operation to perform transformation. Let’s  say Request1 and response 1 – first operation Request2 and response 2 – second operation Client will send request via request 1 and response 1 will get back to client but over all process will something like this . (Client input xml)Request1–>apply xsl on input to generate request2–>  request 2àappy xsl on request 2 generate response 2–>  response 2 –> apply xsl on response2 to generate response1 –> response 1(client output xml). Create XSLT Module: Please refer to part 1 for details to create XSLT module. Create XSD for request and reply operation <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.netbeans.org/schema/CustomerDetails" xmlns:tns="http://xml.netbeans.org/schema/CustomerDetails" elementFormDefault="qualified"> <xsd:complexType name="CustomerName"> <xsd:sequence> <xsd:element name="firstName" type="xsd:string"/> <xsd:element name="lastName" type="xsd:string"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="CustomerAddress"> <xsd:sequence> <xsd:element name="HomeAddress"/> <xsd:element name="OfficeAddress"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PersonalData"> <xsd:sequence> <xsd:element name="gender" type="xsd:string"/> <xsd:element...

Working With XSLT Service Engine: Part 1

About the XSLT Service Engine The XSLT Service Engine is a Java-based transformation engine that is used to convert XML documents from one data format to another. The XSLT Service Engine makes it easier for users to configure and expose XSL style sheets as web services. Using the XSLT Service Engine 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 is not solely responsible for performing transformations. XSL style sheets implement a web service operation (as normally defined in a WSDL). When deployed as JBI service units, these service units correspond to a service endpoint. Each endpoint is activated when the XSLT service unit is deployed. In a sense, the XSLT Service Engine 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 Service Engine: The XSLT service unit is configured with service endpoint information. The service unit is deplopyed, along with the XSL style sheet, to the JBI environment. The XSLT Service Engine compiles the style sheet. A message arrives and the XSLT Service Engine searches for the service endpoint responsible for handling the message. The message is transformed using the service endpoint’s XSL style sheet. A response is sent back via the Normalized Message Router (NMR). XSLT Service Engine Features The XSLT Service Engine supports the following use cases: Request-Reply Service Request-Reply is a standard request-reply scenario. An XML message request is transformed and the result is sent back...

Working with OpenESB WLMSE

Overview Here we will attempt to create simple Application that demonstrate use of WLM Application. Before we begin, quick introduction to WLM is appropriate. WLM stands for Worklist Manager. It allows you to create Web Service Application that require human action/decision (one of pre-defined options) based upon some input data. So, in nutshell, the WLM application can be fed messages (predefined type) and exposes some API’s (can be used to build Web Interface) that allows assigned user’s to see the requests as list of tasks for some actions/decisions. The resulting choice of the user will be sent back as output message (again pre-defined type) to calling service. The service interface is defined using WSDL and the communication is Synchronous. WLM application can be best thought of means to incorporate human step in an automated process. For example, if you need to incorporate human approval step in you BPEL Process, you can achieve this using WLM Application. It also provide features such as Task Escalation, Notification etc. This is what we are going to do in this Helloworld Application. A WLM Application has three components: Please refer to Downloads for required components download Design Time You can use Netbeans (download page) with SOA Modules and create WLM Project type. Using worklist editor, you create task definition wherein the aspects about the task definition is specified. More on this later. Runtime The built project is deployed on Glassfish with JBI Runtime Environment. Project Open-ESB provides a Service Engine called sun-wlm-engine which provide runtime implementation for WLM Projects. Web Application The Users of the Task can log on to Web Console and...

OpenESB HL7 Tutorial

This document describes how to create a simple HL7 Sender and Receiver project. The HL7 Sender project polls for files on a file system containing HL7 messages and sends them over MLLP to an HL7 external using the HL7 Outbound port and then writes the acknowledgement back to the file system. The HL7 Consumer (Receiver) project connects up the HL7 interface over MLLP (port 4040) and receives the HL7 messages, converts to XML and writes the data out to a file in XML format. Click on this link to download the tutorial:...

“Unable to Locate Activated Endpoint” when reusing a common service

We have one EJB for sending email notifications. We did not use Email BC because we have to format the email and we did not want to do that in every BPEL. We have atleast 30 service assemblies using this EJB. Everytime we shutdown one of the service assemblies, this EJB stops working. We will not get email notifications. When we went through the logs we found that we are getting “Unable to locate activated endpoint” error. Usually this error occurs when the service is not deployed or not reachable. On Further investigation we were able to make out that when we shutdown any of the service assemblies which uses this EJB it affects all the others. We thought it is a bug with GlassFishESB. As a workaround, we had to restart all the service assemblies which uses this EJB. I wanted to fix this Bug. I wrote two service assemblies TestCA1 and TestCA2, and one CommonEJB. TestCA1 and TestCA2 will receive a http request, invoke the CommonEJB and return the string from CommonEJB. This is a plain echo service. For invoking this EJB from BPEL I need to have the WSDL of this EJB. So I used “Generate and Copy WSDL..” option to copy the WSDL into the BPEL folder. I was able to cleanly reproduce the problem. Everytime I shutdown TestBP1, TestBP2 was not working and vice versa. I turned the JBI logging to finest. And this is what I found when I shutdown TestCA1: [#|2012-02-14T19:33:41.322+0530|FINE|sun-appserver2.1|com.sun.jbi.messaging|_ThreadID=1015;_ThreadName=TestCA1-sun-http-binding;ClassName=com.sun.jbi.messaging.EndpointRegistry;MethodName=removeEndpoint;_RequestID=42f05924-ebc6-43ad-8a4d-539c8d910bf3;|Removed endpoint: http://test.logicoy.com/,CommonEJBService,CommonEJBPort|#] So it is clear that it is removing this endpoint from EndpointRegistry. But why does it remove this endpoint?...