简体   繁体   English

客户端服务器Java应用程序:使用SOAP和AXIS2发送大文件

[英]Client server java application: send large file using SOAP and AXIS2

I have to send a millions of data over the network using Soap Web Services (java2wsdl) between java client/server. 我必须使用Java客户端/服务器之间的Soap Web Services(java2wsdl)通过网络发送数百万个数据。 So I tried to serialize objects into a file and then send it to server. 因此,我尝试将对象序列化为文件,然后将其发送到服务器。

But the problem is that serialization generates a very large file that causes memory problems in java application. 但是问题是序列化会生成一个很大的文件,从而导致java应用程序中的内存问题。

Since the file is very big I tried to split this file into small ones. 由于文件很大,因此我尝试将此文件拆分为小文件。 The problem is that I must send n files between the client and the server, which will consume a lot of time while the objectif is to optimize the processing time. 问题是我必须在客户端和服务器之间发送n个文件,这将消耗大量时间,而objectif是为了优化处理时间。

Do you have any suggestions to optimize the processing time and ensuring no "out of memory"? 您对优化处理时间并确保没有“内存不足”有什么建议吗?

Web services arent designed primarily as a large file transfer mechanism. Web服务主要设计为大型文件传输机制。 For that specific file transfer protocols will do a better job, like dealing with partial recovery, error recovery etc. 为此,特定的文件传输协议将做得更好,例如处理部分恢复,错误恢复等。

Try this solution 试试这个解决方案

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

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