Skip to main content

MINA's Blog

Go Search
Home
Products and Services
MINA's Blog
Vision
  

Keystroke IT Australia > MINA's Blog > Posts > How to create an ESB.NET adaptor and handler - High level steps
How to create an ESB.NET adaptor and handler - High level steps
This is a short summary on how to use ESB.NET to expose your business services as SOA compliant XML Web Services.
 

In order to create your services to be hosted by ESB.NET, you need to perform the following high level steps.

Definition

Handler (Message/Request Handler)

Adaptor - Project(s) for related set of Handlers 

  1. Create a Service Definition - this is not currently directly used by ESB.NET, however it will be a validation option in future releases.
  2. Define the name of your service. Feel free to use namespaces etc. This should match the name of the business service required, eg. similar to a Use Case name etc.
  3. Define the data required for the service, request & response, using an XSD schema. This will be the sole definition of the data. You should aim to do this at the conceptual design phase or even the envisioning phase - i.e. as soon as a Business Analyst starts typing fields into a word document, pull them up & get them to use an XSD tool to define the data. You need only one copy of the data - from requirements to coding & implementation.
  4. Data Model - If building a standard VB.NET or C# Adaptor and handlers, use a XSD ==> class generator to generate code files from your XSD - such as XSDObjectGenerator. It's advisable to add these files into a separate project. If you're building your adaptor using a tool that does not require code generation from the XSD in order to process the data (eg. BizTalk, Linq), then you can ignore this step.
  5. Create a request & response message using XSD/XML tools such as Turbo XML, XML Spy or BizTalk etc.and wrap the result in an ESB Envelope, setting Service Parameters as per the Service Definition. Place the request file in the Management Console's Requests directory, creating a directory for your Adaptor. This will then be made available in the Management Console for submitting to the ESB Transport adaptors using the chosen transport adaptor.
  6. Adaptor - Create a new VS.NET project based on the ESB.NET project template. This is your adaptor (or part of the adaptor if you choose to spread the adaptor over multiple assemblies etc.)
  7. Service/Controller - Request Handler. Add a Request Handler using the ESB.NET class template. This is the class that will service the request coming in to the system. You will mamipulate/process the data model here as required to imiplement the business service requirements.
  8. Configure your handler(s) in the ESB.NET Pipeline. Use the Service Definition for the relevant details. You can specify more than one handler here, specify simple handler chaining, request/response in/out etc. here as well as which handler(s) get executed synchronously or asynchronously, and any handlers that need to be executed for each & every request - eg. An auditing handler or a security check (Authorization handler - which will set a flag on the ESB.NET Context telling the ESB.NET Pipeline Manager to abort further Pipeline Processing).
  9. Using the Management Console, submit the request to the ESB.NET Service bus. At this point, you can use the "view logs" functionality in the management console to view any log messages etc. You can also choose to debug the handler.
  10. You can also add your request to the list of test requests. This will allow you to do simple regression testing of your services at the press of a button. You may also decide to write test handlers to do more detailed testing of your other handlers, and add the test handlers into this list instead of or as well as your service handlers.
  11. When happy with the base functionality of your new handler, use the Microsoft ACT script to fire the request off to ESB.NET to stress test ESB.NET & your new handler. You can extend the scripts & use them for regression testing under load.

Comments

There are no comments yet for this post.