Communication between web services on different servers

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 are in Java.

Thanks!

Answers


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...


Need Your Help

Android parsing JSON with array in array

android json jsonobject

Help me parsing JSON. I parse this JSON without "moment" and don't know how parse with "moment".

Validate logged-in user in WordPress

wordpress authentication

I would like to know how I can prompt a user that is already logged-in to confirm their login credentials in order to validate their identity.