问题
I am a student and working on developing a Java Application that would serve as a "Translation Layer" between one application's web service calls to another application's JMX API. Both the applications reside on 2 different systems in the same network.
So, essentially, it involves a deliverable program that converts one application's web services call into the other application's service calls in JMX.
Since, I've had no experience with this kind of application development, I had the following questions:
What could be the usual approach of structuring my program? I have previous experience in core java development. And, I am hoping that should suffice to understand and use JMX and Web services APIs.
What skills might be needed? I am thinking web services, threading, collections, etc.
From what I understand, there will be one Java tar on the system where the application with JMX API is present (No part needed on the system with web service calls). Is that the right assumption to make?
Is there a sample application or tutorial online that I can refer to get an idea on how to proceed?
Any thoughts/ideas are much appreciated.
回答1:
If I understand you correctly, you want to build a SOAP/JMX Proxy. This means it will receive SOAP requests and translate them to JMX, forwarding the translated request and then do the inverse to return the response.
The proxy is a well known design pattern which you can use to base your design on. This particular case corresponds to a Remote Proxy.
回答2:
Define your web services interface in WSDL. (The easiest way is to start off designing the rough XML you want to send in Notepad or XML-spy and then entering stuff in a WSDL editor.)
Depending on what tools you are using you may or may not actually feed the WSDL into your client/server app but it is a useful design reference point when manually coding too.
The web services container should manage threading for you. Put a limit on it.
The MBean API is designed to make it as easy as possible to call on to JMX.
If the client is also Java it should interoperate no problems.
BUT if you need to have another type of client (particularly .NET client) read this:
http://www.infoq.com/articles/REST-INTEROP
(You may be better off going with REST and abandoning WSDL-based Web Services.)
来源:https://stackoverflow.com/questions/2010083/ideas-on-how-to-approach-a-project-involving-integration-of-apis