新足迹

 找回密码
 注册

精华好帖回顾

· 投资房啊投资房 (34楼有”税务优惠小知识“更新) (2005-10-12) 水晶靴 · 如何坚持母乳喂养——我的点滴经验 (2008-8-21) 仰望星空
· 写给即将踏上澳洲土地的朋友们 (2)(谁设的文章长度限制,偶得贴好几次) (2004-12-20) spirit1 · 自己动手做【小笼包】 (2012-1-5) 奶油布丁
Advertisement
Advertisement
查看: 1204|回复: 0

如何动态改变webservice引用地址?求助 [复制链接]

发表于 2011-12-19 16:46 |显示全部楼层
此文章由 忽然一周 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 忽然一周 所有!转贴必须注明作者、出处和本声明,并保持内容完整
做好了一个webform的项目, 也部署到iis上了,后台主要是调用webservice来做一堆事情, 现在的问题是,我想要在页面上加一个输入框和按钮,用户在这里可以重新输入一个webservice的wsdl的网址url,点击按钮之后,希望可以使用更新的webservice。
     现在的情况是,我的webservice属性已经是dynamic的了,webservice有一个代理类,我直接更改了service.url= strNewWSDL; 调试都过了,但是一到具体执行webservice动作的代码,就直接报错跳出,是否我还有什么步骤没有做呢?

报错信息如下:
System.Web.Services.Protocols.SoapException: Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at WebApplication2.EL8SceenService.ScreenService.executeScreen(OperationContext context, String msoName) in D:\CSharp\WebApplication2TRY\WebApplication2\WebApplication2\Web References\EL8SceenService\Reference.cs:line
曳尾涂中
Advertisement
Advertisement

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部