Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Can Web services facilitate communication between a message queue server and a VB app?

Can we use Web services to communicate between a message queue server (like JMS, BOSS, etc.) and a VB application? How? Will Web services be a better solution to do communication, or else any other solutions?
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

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close