简体   繁体   English

在XOP中使用MTOM的优势

[英]Advantages of using MTOM with XOP

I wonder what are the main benefits of using a WS with MTOM. 我想知道将WS与MTOM一起使用的主要好处是什么。 (without streaming the attachment) (不流式传输附件)

I understand that the payload will not contain the binary data which will be part of MIME 我了解有效负载不会包含将成为MIME一部分的二进制数据

"When you use MTOM/XOP to optimize a SOAP message, the XOP processing serializes it into a MIME Multipart/Related message. The XOP processing extracts the base64Binary data from the SOAP message and packages it as separate binary attachments within the MIME message, in a similar manner to e-mail attachments" “当您使用MTOM / XOP优化SOAP消息时,XOP处理会将其序列化为MIME Multipart / Related消息。XOP处理从SOAP消息中提取base64Binary数据,并将其打包为MIME消息中的单独二进制附件。与电子邮件附件类似的方式”

SO the payload will probably smaller (but not much ) then base64 format 因此,有效负载可能会比base64格式小(但不会太大)

BUT without using streaming attachment i see little advantage... the payload will end up in memory anyway as soap is deserialized. 但是,如果不使用流媒体附件,我几乎看不到任何优势...反之,由于肥皂反序列化,有效载荷最终将最终存储在内存中。

So if the SOAP has to contain a big PDF file which i have to store it ... with pure MTOM there will be not so much benefit if i will not use streaming attachment cause multiple users in the same time might crash the server with OOME... 因此,如果SOAP必须包含一个我必须存储的大PDF文件...使用纯MTOM,如果我不使用流附件,将不会有太多好处,因为多个用户同时使用OOME可能会使服务器崩溃...

Am i wrong ? 我错了吗 ?

There are several reasons for using MTOM instead: 使用MTOM的原因有很多:

  • MTOM has good interoperability. MTOM具有良好的互操作性。 The MTOM is a W3C recommendation , that is endorsed by Microsoft, IBM, Oracle, and so on. MTOM是W3C的推荐 ,并得到Microsoft,IBM,Oracle等的认可。

  • MTOM attachments can be processed by the Web services functionalities as needed. Web服务功能可以根据需要处理MTOM附件。 The temporary Base64 representation of the attachments allows the SOAP engine to use them for generating a message signature, performing encryption, and so on. 附件的临时Base64表示形式允许SOAP引擎将其用于生成消息签名,执行加密等。

  • MTOM has no impact on development. MTOM对开发没有影响。 There is no special API for handling the SOAP attachments. 没有用于处理SOAP附件的特殊API。

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

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