如何将asmx中的WSDL更改为ASP.Net? [英] How to change WSDL in asmx into ASP.Net ?

查看:141
本文介绍了如何将asmx中的WSDL更改为ASP.Net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello


Actually I have one ASMX service that return image in byte array.
That works fine with small size image but when images is too large like above 100 MB or more
that time my service client can't handle it and fired the error.
I googled and found like to put "xmime:expectedContentTypes" element property like below in WSDL
 <element name="ImageData" type="xsd:base64Binary"

           xmime:expectedContentTypes="application/octet-stream"/>

And if we needs that property then we need to change WSDL and put below tag in WSDL.
    " xmlns:xmime="http://www.w3.org/2005/05/xmlmime "

For example
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/">

to change it like

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/" "xmlns:xmime="http://www.w3.org/2005/05/xmlmime">

So Is there any mechanism to change it.

Thanks
Harshad

推荐答案

好吧,你不能自己更改WSDL。它是一个自动生成的文件,其中包含服务的代理。

此WSDL文件包含在服务器和客户端之间建立连接和执行操作所需的所有详细信息



所以你不能!!



-KR
Well, you can't change the WSDL by yourself. It is a auto-generated file, which contains the proxy of the service.
This WSDL file contains the all details that are require to establish the connection and perform operations between server and client

So you can't !!

-KR

这篇关于如何将asmx中的WSDL更改为ASP.Net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆