在“https:// ....”上没有可以接受消息的端点

时间:2015-12-18 20:12:47

标签: web-services wcf soap web-config iis-6

<?xml version="1.0" ?>
<configuration>
<connectionStrings>
<add name="SqlServerConnectionString" connectionString=""/>
<add name="OracleConnectionString" connectionString="user id=DBGDEV;password=123;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=****.r..****)(PORT=1584))(CONNECT_DATA=(SERVICE_NAME=****)))" />
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true">
</compilation>
</system.web>
<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="serviceBehavior">         
       <serviceMetadata httpsGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="httpEndpointBehavour">
      <webHttp/>
    </behavior>
  </endpointBehaviors>
</behaviors>
<services>
  <service name="Implementation.AccountService" behaviorConfiguration="serviceBehavior">
    <endpoint address="" binding="webHttpBinding" contract="Contract.IAccountService" behaviorConfiguration="httpEndpointBehavour"bindingConfiguration="webHttpBinding" />
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
  </service>
</services>
  <bindings>
  <basicHttpBinding>
    <binding name="WCFsoap" 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">
       <security mode="Transport">
        <transport clientCredentialType="Basic" proxyCredentialType="Basic"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
    <binding name="WCFsoap1" 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">
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default"/>
      </security>
    </binding>
  </basicHttpBinding>
  <webHttpBinding>
    <binding name="webHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>
  </webHttpBinding>
</bindings>
<client>
  <endpoint address="https://test.myservice.com/rally_generic_ws.do?SOAP"
           binding="basicHttpBinding" bindingConfiguration="WCFsoap"
           contract="serviceName.WCFsoap" name="WCFsoap" />
</client>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
</handlers>
</system.webServer>
<system.codedom>    
</system.codedom>
<runtime>    
</runtime>
</configuration>

上面的代码是Service web.config。

错误“没有端点侦听”https://test.myservice.com/rally_generic_ws.do?SOAP“可以接受消息这通常是由不正确的地址或SOAP操作引起的”。 这可能是造成这种错误的原因。我因此被封锁了。请指导我。

下一期

在我的web.config中进行某些更改后,当我在wcf测试客户端中添加https作为服务引用时,我得到以下错误。 无法从https://server-uat:8090/service.svc获取元数据。 如果这是您有权访问的Windows(R)Communication Foundation服务,请检查您是否已在指定地址启用元数据发布。 有关启用元数据发布的帮助,请参阅http://go.microsoft.com/fwlink/?LinkId=65455上的MSDN文档。 WS-Metadata Exchange错误URI:https://server-uat:8090/service.svc 元数据包含无法解析的引用:“http://192.168.0.15:8090/service.svc” 在https://test.myservice.com/rally_generic_ws.do?SOAP没有收听端点 那可以接受这个消息。这通常是由错误的地址或SOAP操作引起的。

有关详细信息,请参阅内部异常(如果有) 远程服务器返回错误:(404)Not Found.HTTP GET错误URI:https://server-uat:8090/service.svc

网址https://server-uat:8090/service.svc上的文档未被识别为已知文档类型。每种已知类型的错误消息可帮助您解决问题: -

来自“https://server-uat:8090/service.svc”的报告是“无法识别文档格式(内容类型为'text / html; charset = UTF-8')。'.- 无法解析远程名称:'**********' - 来自'WSDL Document'的报告是'文件格式无法识别(内容类型为'text / html; charset = UTF-8) “).'.- 来自“XML Schema”的报告是“文档格式无法识别(内容类型为'text / html; charset = UTF-8')。'。

当我尝试将服务添加到wcf测试客户端时,这是我得到的错误。这个错误的原因是什么。如何摆脱这个错误。

据我所知,我猜客户端无法在服务器中找到请求的操作。我需要更改web.config吗?

1 个答案:

答案 0 :(得分:1)

客户端的端点与服务的端点不匹配

    <client>
    <endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_ImyService"
        contract="IEventLoggerService" name="WebHttpBinding_ImyService" />
    </client>
<service name="Implementation.EventLoggerService" behaviorConfiguration="serviceBehavior">
    <endpoint address="" binding="webHttpBinding" contract="Contract.IAccountService" behaviorConfiguration="httpEndpointBehavour"bindingConfiguration="webHttpBinding" />
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>

如果您查看服务的地址,他们显然不会与您的客户正在收听的地址相匹配。另外,没有服务满足IEventLoggerService合同。

您是否可能缺少服务端点?

编辑:

您遇到的问题是您的web.config文件中的此客户端端点没有监听它的服务<​​/ p>

<client>
  <endpoint address="https://test.myservice.com/rally_generic_ws.do?SOAP"
       binding="basicHttpBinding" bindingConfiguration="WCFsoap"
       contract="serviceName.WCFsoap" name="WCFsoap" />
</client>

现在我在这里做一个很大的假设 - &gt;正在阅读您的web.config文件的服务是该服务的生产者和使用者。假设,我建议在web.config文件中添加另一个嵌套在服务标签中的服务端点

<endpoint address = "https://test.myservicenowmyservice.com/rally_generic_ws.do?SOAP" 
contract = "serviceName.WCFSoap"  binding = "BasicHttpBinding" name ="WCFsoap"
bindingConfiguration ="WCFsoap"/>

现在,如果您的服务是为了履行serviceName.WCFSoap合同,那么这应该可以正常工作。如果没有,那么你应该确保任何服务意味着实现该合同实际上具有该端点。

希望这有帮助