You can use Web services to integrate Visual Basic with messaging queuing middleware. Some of the key advantages of using Web services is that it's relatively easy to do, and once you've done the integration, it can be reused by other applications, built in other languages, running on other platforms. One of the primary disadvantages of using Web services is that it's not the most efficient or fastest performing method available.
You would need to create a SOAP/MOM adapter application. Let's assume that your message queue server is a JMS implementation. You would need to write an application that can talk both SOAP and JMS. You would write this adapter in Java using both the JMS API and a SOAP implementation for Java. Your VB application would use SOAP (e.g., MS SOAP Toolkit, PocketSOAP, etc. ) to talk to the adapter. The adapter would use JMS (e.g., SonicMQ, WebSphere MQ, etc.) to read and write to the JMS queue. You could either write a generic adapter or a specific adapter.
The generic adapter would expose a SOAP interface with methods such as getMessage and putMessage, and you would have to specify the queue name as a parameter (essentially duplicating the JMS API in SOAP). When you send a SOAP message to this adapter, it takes the message and places it on the specified queue. A generic adapter could support communication with any MOM application, but the client would need to use standard MOM semantics, and the client would probably need to be responsible for constructing the message by hand. The message would need to be in the form expected by the MOM application (not necessarily in XML -- you might want to use SOAP with Attachments and send the payload as an attachment).
A specific adapter can talk to only specific MOM applications. It could expose SOAP interfaces such as submitOrder or getQuote or whatever you want it to do. It could also be a SOAP client, waiting for messages to appear on a specific queue, and when they do, sending them to the VB application automatically. A specific adapter would look and feel like a SOAP application to the VB application. The VB application can simply invoke methods on objects, and the SOAP Toolkit would take responsibility for constructing the appropriate SOAP messages. When the adapter receives the SOAP message, it converts the XML message into the format expected by the MOM application.
You can deploy this adapter either co-resident with the MOM server (in which case you communicate across the wire using SOAP), or co-resident with the VB application (in which case you communicate across the wire using MOM). The second option requires that you deploy the MOM software on the client machine, but it gives you reliable message delivery. If you're thinking of using the second option, though, then I think I'd probably recommend that you build a COM/MOM adapter rather than a SOAP/MOM adapter.
A number of SOAP platforms for Java, such as BEA WebLogic WorkShop, Cape Clear Cape Connect, and Systinet WASP, provide a generic JMS adapter and/or tools to help you build specific adapters. You might also want to take a look at SonicXQ, which is a message broker that inherently supports Web services.
Dig Deeper on Topics Archive
Related Q&A from Anne Thomas Manes
Anne Thomas Manes explains the differences between open source clients and open source implementations. Continue Reading
Anne Thomas Manes discusses the best way to go about creating an enterprise data dictionary and why the systems works well. Continue Reading
Anne Thomas Manes explains the difference between 'hard' real time and 'live' real time systems. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.