开发者

Communication between web services on different servers

开发者 https://www.devze.com 2022-12-25 10:23 出处:网络
I have 2 different webservices running on 2 different tomcat application servers (w/ axis2 web service engine)(Webservice A runs on Server A and Webservice B runs on Server B).

I have 2 different webservices running on 2 different tomcat application servers (w/ axis2 web service engine) (Webservice A runs on Server A and Webservice B runs on Server B).

How can web service A on Server A pass Data A (file) to Web Service B on Server B? I am new to web services and would appreciate any help in this regard. The webservices 开发者_StackOverfloware in Java.

Thanks!


Service A needs to be a client of service B. Service B should expose some method service A will consume (and pass required data using it). The process is as follows:

  1. If suitable service method doesn't exist yet in service B then add new method to service B's WSDL file.
  2. Regenerate intefaces from extended WSDL file.
  3. Create functional test for new service method .
  4. Make service A a consumer of method of new (extended) service.
  5. Create acceptance tests for service A methods using service B's method :-)
  6. Implement new service method in service B.
  7. Implement conusmer logic in service A.


Expose a "send" web-service API on B and call it from A.


There are thousends of ways, but with HTTP Protocol you can use: POST or PUT methods. However, you'll need to write application on each side...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号