views:

33

answers:

1

Background I'm primarily a .Net developer with limited experience in Java. I have a WCF web service that needs to communicate with a 3rd party Message Queue Server in order to send and receive files. The 3rd party has provided a Java API in order to access their Message Queue Server.

I've done some research into the best way to move forward and now I'd like to get some feedback from anyone with experience with a similar situation.

After some digging I determined that one option is to create a java web service in Eclipse and host it on Glassfish. This java webservice would reference:

  1. The java api provided by the 3rd party thus allowing the 3rd party to send the xml files to us.
  2. My existing WCF service in order to pass along the xml to be processed.

So the incoming xml file would flow as follows:

3rd party -> Java WS -> WCF WS

This incoming flow is only half the equation since my WCF web service can also initiate communiation with the third party. So I need an outgoing flow as well.

  1. One option would be to reference the Java WS from my WCF service. However then the 2 web services would each be referencing each other. Is this considered a circular reference (bad practice) when 2 web services reference one another?
  2. If option 1. is considered bad practice, my other option would be to have one of the web services poll the other service.
  3. Other options?

Summary Questions 1. Any insight into the circular web reference question above? 2. Am I on the right track in general? 3. Any suggestions or personal experience you can provide?

Your insight is very much appreciated.

+1  A: 

Hi,

My first thought would be that if it's a quick RPC type call, provided you're calling a different web services for the The call back, I wouldn't be too concerned about a circular reference. Technically you're sending messages "by contract" So as a good practice put your contract definitions in a different project to your service implementation.

If the .NET processing takes a bit of time it may be worth it to use a message queue and a worker service as well.

The other consideration is to find out what MQ infrastructure they're actually using. You may be able to avoid the web services altogether as there are .NET connectors for a lot of MQ providers, like

MSMQ (obviously)

ActiveMQ http://activemq.apache.org/nms/

& WebSphere MQ http://www.redbooks.ibm.com/abstracts/sg247012.html

Just to name a few. There are also MSMQ bridges.

Doobi
Thanks for your response! Very helpful.
CletusLoomis