简体   繁体   English

C#客户端和Java服务器

[英]C# client and Java server

I have developed a retail EPOS solution in C# which runs on tills. 我已经开发了使用C#零售的EPOS解决方案,该解决方案可在耕种上运行。 I would like this to interface with a back-end Java server. 我希望它与后端Java服务器连接。 The Java server will be used for running all back-office tasks such as reports. Java服务器将用于运行所有后台任务,例如报告。

What is the best method to get a C# client and a Java server talking to each other? 使C#客户端和Java服务器相互通信的最佳方法是什么? Of course, if this were a sole Java setup, then RMI would be used. 当然,如果这是唯一的Java设置,则将使用RMI。

I have a gut feeling that a web service is best here, but I am lost to what type of web service I'd be looking for. 我有一种直觉,认为Web服务在这里是最好的,但是我迷失了要寻找的Web服务类型。

I had a crazy "bad" idea that I could put a php script on the server which the C# client could call using HTTP and Curl (or C#'s equivalent) and send arguments via GET or POST. 我有一个疯狂的“坏”主意,我可以在服务器上放置一个php脚本,C#客户端可以使用HTTP和Curl(或C#的等效项)调用该脚本,并通过GET或POST发送参数。 However this would be put a total disconnection between the java "back-end" server and C# client. 但是,这将使Java“后端”服务器和C#客户端之间完全断开连接。

Any ideas would be appreciated 任何想法,将不胜感激

Cheers 干杯

最好的方法是Web服务(SOAP),Java和dotNet提供足够的支持...

We has this same issue, and found that a Webservice was indeed the best way to go. 我们也遇到了同样的问题,并且发现Web服务确实是最好的方法。 The speed has been very satisfactory for large scale usage too. 对于大规模使用,速度也非常令人满意。

We made the service on the Java side of things, and created a Class file for the C# system from the WSDL endpoint using the Visual Studio command-line line tool "WSDL.exe". 我们在Java方面提供了服务,并使用Visual Studio命令行工具“ WSDL.exe”从WSDL端点为C#系统创建了一个Class文件。

MSDN Visual Studio WSDL Tool MSDN Visual Studio WSDL工具

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM