简体   繁体   English

外部客户端如何存储xml文件?

[英]How can external clients store xml-files?

I am currently designing a system where I have the following problem: 我目前正在设计一个存在以下问题的系统:

I have a webapplication, running on an own Windows server. 我有一个在自己的Windows服务器上运行的Web应用程序。 And i have an external client who has to communicate with the webapplication. 而且我有一个必须与Web应用程序通信的外部客户端。 The communication will go through XML files. 通信将通过XML文件进行。 The client is making one XML-file with some data which the application has to read and process. 客户端正在制作一个XML文件,其中包含一些应用程序必须读取和处理的数据。 My problem is that I have no idea if there are best practises for this problem. 我的问题是我不知道是否有针对此问题的最佳实践。

I am thinking about the following solution for this problem: The client is sending the XML-file to a directory on the server. 我正在考虑针对此问题的以下解决方案:客户端将XML文件发送到服务器上的目录。 This directory is being watched by the application and when a new XML-file is being added, an event occurs and the application knows that there is a new file and is going to read it and process the data. 应用程序正在监视此目录,并且在添加新的XML文件时,将发生一个事件,并且应用程序知道存在新文件,并将读取该文件并处理数据。 When data processing is finished, the application will remove the XML file. 数据处理完成后,应用程序将删除XML文件。

Is this the best solution or are there other solution for this 'problem'? 这是最好的解决方案,还是针对此“问题”的其他解决方案?

If you use the solution by "The client is sending the XML-file to a directory on the server.", you do not need webapplication. 如果通过“客户端正在将XML文件发送到服务器上的目录。”使用该解决方案,则不需要Web应用程序。 It can be just any application running on a server. 它可以是服务器上运行的任何应用程序。

It has many ways to implement this with webapplication. 它有很多方法可以通过Web应用程序实现。 - if your client is nut human, you can write a page in your webapp to upload file - if your client can be an application, you can write to upload xml to your webapp (from webapp perspective, it is the same code as above). -如果您的客户不是人类,则可以在webapp中编写一个页面来上传文件-如果您的客户可以是一个应用程序,则可以编写以将xml上传到您的webapp(从webapp的角度来看,它与上面的代码相同) 。 You just need to know how to write program (for client) to connect like a browser and upload a file. 您只需要知道如何编写程序(针对客户端)就可以像浏览器一样连接并上传文件。

Any of two solutions, you have to know how to write webapplication to be able to read uploaded file. 两种解决方案中的任何一种,您都必须知道如何编写Web应用程序才能读取上载的文件。

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

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