+ -
当前位置:首页 → 问答吧 → 有关<SoapExtensionTypes>

有关<SoapExtensionTypes>

时间:2011-11-21

来源:互联网

我的程序是C/S的,客户端和服务器端都进行配置了,为什么服务器端能进行SOAP扩展,而客户端就不行呢?一下为客户端App.config的内容,请求指点!!!
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web >
<webServices >
<soapExtensionTypes >
<add type="ClassLibrary1.Class1,ClassLibrary1" priority="1" group="High " />
</soapExtensionTypes>
</webServices>
</system.web>
  <system.serviceModel>
  <bindings>
  <basicHttpBinding>
  <binding name="Service1Soap" closeTimeout="00:01:00" openTimeout="00:01:00"
  receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
  bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
  maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
  messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
  useDefaultWebProxy="true">
  <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
  <security mode="None">
  <transport clientCredentialType="None" proxyCredentialType="None"
  realm="" />
  <message clientCredentialType="UserName" algorithmSuite="Default" />
  </security>
  </binding>
  </basicHttpBinding>
  </bindings>
  <client>
  <endpoint address="http://localhost:8080/Service1.asmx" binding="basicHttpBinding"
  bindingConfiguration="Service1Soap" contract="ServiceReference1.Service1Soap"
  name="Service1Soap" />
  </client>
  </system.serviceModel>
</configuration>

作者: zhangxiuhoujian   发布时间: 2011-11-21

客户端的.net框架装了吗?出现什么错误?

作者: thinkingforever   发布时间: 2011-11-21

从这篇文章来看,是可以的啊。
http://blogs.infosupport.com/applying-a-soap-extension-to-a-client-proxy-without-altering-the-generated-proxy-code/

你确定ProcessMessage没有调用,还是你判断了SoapServerMessage。

最好贴下ProcessMessage的代码。

作者: findcaiyzh   发布时间: 2011-11-21