zoukankan      html  css  js  c++  java
  • web service传递stream二进制对象的解决方法

    Web Service是一种跨平台的分布式解决方案,使用标准XML格式的SOAP消息传递信息,统一了不同平台的通讯协议,便于我们实现异构系统的交互;但使用统一的XML格式带来的问题就是此协议只支持基本的数据类型, 或包装了基本数据类型的简单对象,我们无法在.net中使用web service直接传递.net对象或二进制流,只有把对象或二进制流序列化为字符传才可以在web service中传递。下面介绍2种使用web service方式传递Stream对象的方法,希望给各位一些解决此类问题的思路:

    方法1:

    Code

    方法2:

    使用Microsoft的WSE(Web Services Enhancements)扩展web service:

    "WSE 3.0 supports the Message Transmission Optimization Mechanism (MTOM) specification for transmitting large amounts of data to and from Web services."

    Address:  http://msdn.microsoft.com/zh-cn/library/aa528822(en-us).aspx

    Title:    How to: Enable a Web Service to Send and Receive Large Amounts of Data

  • 相关阅读:
    CSS基础知识点
    HTML回顾
    stringbuffer与stringbuilder与String
    事务的概念与使用
    大数据处理对象CLOG BLOG
    小却常用的小知识点和技巧
    视图
    移位运算符
    规范化与范式
    聚集索引和非聚集索引
  • 原文地址:https://www.cnblogs.com/andy65007/p/1609584.html
Copyright © 2011-2022 走看看