C# 中的远程过程调用

发布于 2024-12-03 23:44:22 字数 477 浏览 1 评论 0原文

我对这种工作基本上是新手。我正在 VS2010 中用 C# 编写我的应用程序。我有一个工作正常的水晶报告,它基本上填充了一些 xml 数据。该 XMl 数据来自另一台机器上用 Python 编写的其他应用程序。

该 Python 脚本生成一些数据,并将该数据放入内存流中。我基本上必须读取该内存流并编写用于填充水晶报告的 xml。所以我的主管希望我使用远程过程调用。

我从来没有做过任何远程过程调用。但据我研究和了解。我想我主要需要开发一个 Web 或 WCF 服务。我不知道该怎么办。我们计划使用http协议。

所以,这就是它应该如何工作的。我给他们我的服务的 URL,他们会调用该服务,而我的服务应该尝试读取他们放在内存流上的数据。读取数据后,我应该使用部分数据来编写我的 xml,并且该 xml 用于填充我的水晶报表。

数据的另一部分(除了用于写入 xml 的数据之外)应发送到 SQl 服务器上的数据库。这是我完整的问题定义。我需要可以帮助我解决这个问题的想法和链接。

I am basically new to this kind of work.I am programming my application in C# in VS2010.I have a crystal report that is working fine and it basically gets populated with some xml data. That XMl data is coming from other application that is written in Python on another machine.

That Python script generates some data and that data is put on the memory stream. I basically have to read that memory stream and write my xml which is used to populate my crystal report. So my supervisor wants me to use remote procedure call.

I have never done any remote procedure calling. But as I have researched and understood. I majorly have to develop a web or WCF service I guess. I don't know how should I do it. We are planning to use the http protocol.

So, this is how it is supposed to work. I give them the url of my service and they would call that service and my service should try to read the data they put on the memory stream. After reading the data I should use part of the data to write my xml and this xml is used to populate my crystal report.

The other part of the data ( other than the data used to write the xml) should be sent to a database on the SQl server. This is my complete problem definition. I need ideas and links that will help me in solving this problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤云独去闲 2024-12-10 23:44:22

正如约翰所写,如果事情紧急并且您的描述非常模糊,那么您就已经迟到了。 RPC 技术有 1001 种,选择取决于细节。但考虑到您似乎只是交换一些 xml 数据,您可能不需要完整的 RPC 实现。只需几行代码就可以用 python 编写一个 HTTP 服务器。如果它需要更稳定和日志运行,请看看twisted。然后只需使用纯 html 和 WebClient 类。这不是一个完美的解决方案,但不止一次对我来说效果很好。你还说这很紧急! ;-)

As John wrote, you're quite late if it's urgent and your description is quite vague. There are 1001 RPC techniques and the choice depends on details. But taking into account that you seem just to exchange some xml data, you probably don't need a full RPC implementation. You can write a HTTP server in python with just a few lines of code. If it needs to be a bit more stable and log running, have a look at twisted. Then just use pure html and the WebClient class. Not a perfect solution, but worked out quite well for me more than once. And you said it's urgent! ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文