Well one way to do it is via REST, Representational State Transfer.
This approach is platform independent and built upon the HTTP protocol.
Learn REST: A Tutorial[
^]
You implement one service on the server side, and then you adapt your clients to the protocol.
You can easily find examples for how to implement the client side for different environments.
This is one way out of many to solve your problem.