1

我试图通过我的 .Net 客户端应用程序中的服务引用访问服务。当我访问服务方法时,我收到以下错误:

访问服务方法时捕获的异常

System.Xml.XmlException 被捕获 Message=End element 'Body' from namespace 'http://schemas.xmlsoap.org/soap/envelope/' 预期。从命名空间中找到元素“ns:updateStatusAsReadResponse”

我的 app.config 看起来像这样:

<bindings>
  <basicHttpBinding>
      <binding name="documentproxySoap11Binding" 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>
  <customBinding>
         <binding name="documentproxySoap12Binding">
      <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
          messageVersion="Soap12" writeEncoding="utf-8">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      </textMessageEncoding>
      <security authenticationMode="MutualCertificate" >
      </security>
      <httpTransport manualAddressing="false" maxBufferPoolSize="524288"
          maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
          realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
          useDefaultWebProxy="true" />
    </binding>
  </customeBinding>
  <client>
        <endpoint address="http://xxx.documentproxyHttpSoap11Endpoint/"
             binding="basicHttpBinding" bindingConfiguration="documentproxySoap11Binding"
             contract="documentProxy.documentproxyPortType" name="documentproxyHttpSoap11Endpoint" />

  </client>
4

0 回答 0