Introduction
This is a part of our article that describes transport for web services through MQ. The whole article you can read here. Correct implementation of a transport allows developers to incorporate security, routing, and attachment features in their applications using this transport, without additional expenses.
Why does one need transport through MQ?
There are at least two answers to this question. The first one is a customer might want (needs) to communicate with your service through MQ (e.g. legacy application). Another answer is to provide reliable delivery of each message.
The other issue is why do we use MQ rather then MSMQ. In our particular case, the answer is: our customer wanted exactly MQ. We believe however, the same technique can be used to implement MSMQ transport.
Implementation of MQ transport
We have found that WSE 2.0: "Supports message-oriented programming model, allows implementing of peer to peer programs, or event driven applications. Web services that leverage WSE can be hosted in multiple environments including ASP.NET, standalone executables, NT Services, etc. and can communicate over alternative transports". We have decided to implement our custom transport based on MQ.
Formally, in order to implement transport through MQ, one need to provide implementation of SoapTransport
interface (which is pretty small), and then register it in WSE. However, implementation evolves due to communication with MQ, transaction support, configuration options, and other useful features.
Our implementation of MQ transport consists of the following parts:
- transport - defines means for infrastructure to transfer SOAP messages in some way between client and server
- channel - defines a channel that uses MQ to transfer particular messages
- listener - allows server to accept MQ requests
- configuration - allows binding of web services to specified channels using a configuration file
- transactions - support transactions
- performance counters - allow monitoring MQ transport activity
- installation classes - allow to expose MQ transport library as a separate installation unit or as a part of a bigger installation.
Read full description of these code parts and how to configure them in our whole article (see link above).
Conclusion
SOAP MQ Transport supports protocol agnostic conception of web services, providing device for transferring requests and responses of web services through MQ.