Comparing Microsoft BizTalk Server and WebSphere Message Broker
Microsoft® BizTalk® Server and IBM® WebSphere® Message Broker are ESB products with comparable functionality, but quite different implementation and internal architecture. This article bridges the conceptual gap between the two products in order to facilitate migration between them. The article provides a common ESB pattern, and shows you how to implement it on Microsoft BizTalk Server 2010 (hereafter called BizTalk) and on WebSphere Message Broker V8 (hereafter called Message Broker).
BizTalk is a connectivity and integration solution that facilitates integration between disparate applications and solutions using more than 25 multi-platform adapters. In addition to this integration functionality, BizTalk provides messaging, business activity monitoring, and a rules engine.
Message Broker overview
Message Broker is a comprehensive ESB that delivers a full range of integration capabilities, including content-based message routing and transformation, message enrichment, message logging, and a wide range of message distribution options and protocols to improve the flexibility and performance of services in an SOA. It can integrate a wide variety of applications, networks, and device types using a platform-independent ESB that serves as an ideal SOA platform. Message Broker was introduced about 10 years ago and now has several hundred enterprise-scale implementations in customer shops.
Message Broker uses the WebSphere MQ messaging infrastructure, and has built-in graphical mapping and support for diverse programming languages and environments, including Java, ESQL, and XSL, for customization and other extended functionality. Message Broker helps reduce development costs by separating integration logic from applications, and it provides administration and systems management functionality.
A company has a Customer Complaint Management application that enables customers to report complaints. This legacy application obtains complaint data from a file, processes it, and sends feedback to the customer The company wants to implement a web service interface to enable customers to submit complaints through web clients. The web service interface should receive the complaint using SOAP/HTTP transport protocol, and save the complaint data to a file in a preconfigured location where it can be processed, and then respond back to the customer.
Implementing on BizTalk
BizTalk provides several ways to expose an existing WSDL as a web service. The solution described in this article consists of:
- Two-way Receive Port – Receives the message
- Receive Location – Strips the SOAP envelope and routes the message to the message box
- Orchestration – Receives the message, sends it to the File Send port, transforms it, creates a response, and returns it to the caller
- File Send Port
The first step is to create the orchestration using the WSDL. After deployment, you create the bindings and send ports.
- Open Visual Studio.
- Create a new solution and an empty BizTalk project:
- Right-click on the newly created project and click Add generated item.
- Select Consume WCF service. Even though you are going to consume the WCF service, use the generated artifacts to define the web service request and response.
- A BizTalk WCF Consuming Wizard opens. Click Next.
- Select Metadata files (WSDL and XSD) and then click Next:
- Click Add, browse to the WSDL on your local hard drive, and then click Next:
- Change the namespace and click Import:
Within the newly created project, you should find artifacts generated from the imported WSDL. What is important are the definitions of the web service request and response messages, as well as the ports. You will use the definitions to create the orchestration logical ports.
- Right-click on the project and select Add new item.
- Select BizTalk orchestration:
- On the newly created orchestration, right-click on the port surface, select New configured port, and then click Next.
- Change the name of the port to SubmitComplaint and then click Next.
- Select Use an existing port type, select the generated port type, and then click Next:
- For Port direction of communication, select I'll be receiving a request and sending a response. For Port binding, select Specify later:
- Click Next and then Finish. You should see the logical port created as shown below:
- Create the Logical Send Port: right-click on the port surface and select New configured port, and then click Next.
- Select a Port Name, such as SendRequest, and then click Next.
- Select Create new port type, enter a name for the port type, select One-way for the Communication pattern, and then click Next:
- Select I'll always be sending messages on this port and leave Port binding as Specify later:
Developing the business logic
Now you are ready to start developing the business logic in the orchestration. This article will not detail how to create the orchestration shapes, but will show what the orchestration should consist of. This table shows the orchestration shapes with the type and function of each shape:
|Receive||Logical representation of a Receive Port within the orchestration.|
|Send||Sends a copy of the request message to the Logical Send Port.|
|Construct and Transform||Construct Message constructs the response message that will be returned to the caller. Within Construct Message, create a Transform Shape with a map to construct the response message.|
|Send||Sends newly constructed message back to caller.|
The full orchestration should look like the image below. Click here to enlarge the image.
Build the project and make sure there are no errors. The next step is to expose the orchestration as a WCF service:
- Open the BizTalk WCF Service Publishing Wizard and then click Next.
- Select the transport type -- for this example, use WCF-WSHttp. For "Create BizTalk receive locations in the following application," select BizTalk Application 1:
- Click Next.
- Select Publish BizTalk orchestrations as WCF service and then click Next:
- Browse to the compiled orchestration .dll file and then click Next:
- Select the port that will be exposed and enter the namespace as written in the WSDL file:
- Select the location of the service:
- Click Next and then click Create.
A Receive Location and Receive Port should be created on the BizTalk server. The final series of steps binds the orchestration to the Receive Port and creates a Send Port to write the file that will be bound to the logical Send Port of the orchestration.
Binding the orchestration
- After signing the project, deploy the orchestration using Visual Studio.
- Right-click on Send port and select Static one-way send port.
- Enter a name for the port and select FILE as the type:
- Click Configure and select the destination folder:
- Locate the orchestration and click Bindings. Bind the logical Receive Port to the generated Receive Port as well as the logical Send Port to the newly created Send Port:
- Start the orchestration as well as all Send Ports and Receive Ports.
The service is now ready for testing, which you can do using any web service consumer tool. This example uses SOAPUI.
Implementing on Message Broker
- Open WebSphere Message Broker toolkit, right click in the Broker development window, and then select New => Application:
- A new window opens for you to enter the Application name. This example uses RegisterComplaintApp:
- Model the web service WSDL interface to be used for the exposed service. In the newly created application, click the twisty next to Application Component, then right-click and select New => Message Model:
- Select the first option, SOAP XML:
- Since you already have a WSDL file, select the fifth option as shown below:
- Click Select file from outside workspace and browse to the location where you saved the service WSDL file:
- Click Next and then click Finish to completely create a new model for your WSDL file:
- The WSDL is imported and a new model is created as shown below:
- Create a new message flow to implement the required service: Right-click and select New => Message flow. A dialog window opens as shown below. For Message flow name, enter RegisterComplaint and click Finish.
- Open the newly created message flow, which will open with an empty canvas. Locate the WSDL interface you imported before and drag it to the empty canvas. A dialog window opens as shown below, to enable you select the creation option. You need to expose the flow as web service, so select the first option. In case the WSDL contains multiple operations, you can select which operations you need to support.
- The next step lets you select which types of nodes to use. Message Broker offers two types of nodes -- SOAP and HTTP -- and both can be used to interact with web services. In general, use SOAP nodes when working with SOAP-based web services. Mark the SOAP nodes and then click Finish:
- The toolkit generates the implementation skeleton and one extra subflow to filter for the specified operation. In a later step, you need to add more nodes to implement the service and any required business logic:
- The main flow canvases have the following extra Message Broker nodes to implement the web service:
- Trace node -- Captures errors
- Flow Order node -- Enforces order of operations, forcing first path to be processed first and second one second.
- File Output node -- Saves message into a file as configured for later processing by the legacy application.
- Mapping node -- Enables graphical mapping from the input message to the output message.
- Here are the final flow and the mapping node mapping details:
The flow is now ready, with no need to write any extra code. Message Broker supports several methods of message transformation, including the Mapping node, ESQL code, Java, XSL and more. Choose one based on the complexity of the mapping and the developer skills available.
Deploying and testing the service
- Right-click the application name and select Deploy. A dialog window opens to let you select the target broker and target execution group, as shown below:
- The service is now ready for testing. You can use any web service consumer to test it. This example uses the soapUI tool.
- WebSphere Message Broker resources
- WebSphere Message Broker V8 information center
A single Web portal to all WebSphere Message Broker V8 documentation, with conceptual, task, and reference information on installing, configuring, and using your WebSphere Message Broker environment.
- WebSphere Message Broker developer resources page
Technical resources to help you use WebSphere Message Broker for connectivity, universal data transformation, and enterprise-level integration of disparate services, applications, and platforms to power your SOA.
- WebSphere Message Broker product page
Product descriptions, product news, training information, support information, and more.
- Download free trial version of WebSphere Message Broker
WebSphere Message Broker is an ESB built for universal connectivity and transformation in heterogeneous IT environments. It distributes information and data generated by business events in real time to people, applications, and devices throughout your extended enterprise and beyond.
- WebSphere Message Broker documentation library
WebSphere Message Broker specifications and manuals.
- WebSphere Message Broker forum
Get answers to technical questions and share your expertise with other WebSphere Message Broker users.
- WebSphere Message Broker support page
A searchable database of support problems and their solutions, plus downloads, fixes, and problem tracking.
- IBM Training course: WebSphere Message Broker V8 Development
This course from IBM Training shows you how to use the components of the WebSphere Message Broker development and runtime environments to develop and troubleshoot message flows that use ESQL, Java, and PHP to transform messages.
- Youtube tutorial: Integrating Microsoft .NET code in a WebSphere Message Broker V8 message flow
This five-minute youtube tutorial shows you how simple it is to use WebSphere Message Broker V8 to build a message flow that includes Microsoft .NET code. Microsoft Visual Studio is used to build .NET code in C#, which is then integrated into a message flow using Message Broker and an HTTP RESTful interface.
- WebSphere Message Broker V8 information center
- WebSphere resources
- developerWorks WebSphere developer resources
Technical information and resources for developers who use WebSphere products. developerWorks WebSphere provides product downloads, how-to information, support resources, and a free technical library of more than 2000 technical articles, tutorials, best practices, IBM Redbooks, and online product manuals.
- developerWorks WebSphere application integration developer resources
How-to articles, downloads, tutorials, education, product info, and other resources to help you build WebSphere application integration and business integration solutions.
- Most popular WebSphere trial downloads
No-charge trial downloads for key WebSphere products.
- WebSphere forums
Product-specific forums where you can get answers to your technical questions and share your expertise with other WebSphere users.
- WebSphere on-demand demos
Download and watch these self-running demos, and learn how WebSphere products and technologies can help your company respond to the rapidly changing and increasingly complex business environment.
- WebSphere-related articles on developerWorks
Over 3000 edited and categorized articles on WebSphere and related technologies by top practitioners and consultants inside and outside IBM. Search for what you need.
- developerWorks WebSphere weekly newsletter
The developerWorks newsletter gives you the latest articles and information only on those topics that interest you. In addition to WebSphere, you can select from Java, Linux, Open source, Rational, SOA, Web services, and other topics. Subscribe now and design your custom mailing.
- WebSphere-related books from IBM Press
Convenient online ordering through Barnes & Noble.
- WebSphere-related events
Conferences, trade shows, Webcasts, and other events around the world of interest to WebSphere developers.
- developerWorks WebSphere developer resources
- developerWorks resources
- Trial downloads for IBM software products
No-charge trial downloads for selected IBM® DB2®, Lotus®, Rational®, Tivoli®, and WebSphere® products.
- developerWorks business process management developer resources
BPM how-to articles, downloads, tutorials, education, product info, and other resources to help you model, assemble, deploy, and manage business processes.
- developerWorks blogs
Join a conversation with developerWorks users and authors, and IBM editors and developers.
- developerWorks tech briefings
Free technical sessions by IBM experts to accelerate your learning curve and help you succeed in your most challenging software projects. Sessions range from one-hour virtual briefings to half-day and full-day live sessions in cities worldwide.
- developerWorks podcasts
Listen to interesting and offbeat interviews and discussions with software innovators.
- developerWorks on Twitter
Check out recent Twitter messages and URLs.
- IBM Education Assistant
A collection of multimedia educational modules that will help you better understand IBM software products and use them more effectively to meet your business requirements.
- Trial downloads for IBM software products