2015-12-18 56 views
1
<?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:// ....”没有可以接受消息的终端节点

错误“没有终点在听” https://test.myservice.com/rally_generic_ws.do?SOAP“是可以接受的消息这通常是由不正确的地址或SOAP行动造成的”。 可能是这个错误的原因。我被阻止了,请引导我。

下期

在做我的web.config一定的变化,当我添加HTTPS作为WCF测试客户端服务引用后,我得到下面的错误。 无法从https://server-uat:8090/service.svc获取元数据。 如果这是您有权访问的Windows(R)Communication Foundation服务,请检查您是否已在指定地址启用元数据发布。 有关启用元数据发布的帮助,请参阅http://go.microsoft.com/fwlink/?LinkId=65455上的MSDN文档。 WS-元数据交换错误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)不Found.HTTP GET URI错误:https://server-uat:8090/service.svc

在URL https://server-uat:8090/service.svc文稿没有从各已知类型识别为已知的文档type.The错误消息可以帮助你解决该问题: -

从“https://server-uat:8090/service.svc”报告是“的文档格式不能被识别(内容类型文本/ html;字符集= UTF-8').'.- 远程名称不能被解析:'**********' - 来自'WSDL文档'的报告是'文档格式不被识别(内容类型是'text/html; charset = UTF-8')。'- 'XML Schema'的报告是'The document格式不被识别(内容类型是'text/html;字符集= UTF-8 ')。'。

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

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

+0

它可以在web配置端点中使用http而不是https吗? – Cerveser

+0

在客户端点地址我已经提供了外部wsdl网址(https://test.myservicenow.com/rally_generic_ws.do?SOAP),我正在评估以获得所需的输出。由于网址在https中,因此我有使用https在浏览器中运行url,所以它不应该是http.the url是通过代理和密码进行安全保护的。所以我在我的web服务代码中传递了所需的代理和密码。 –

回答

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文件中此客户端端点没有听它服务

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

现在我在这里做一个重要的假设 - >阅读你的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,这应该能正常运行的另一个服务端点。如果没有,那么你应该确保任何服务是为了履行合同确实具有该端点。

希望这有助于

+0

让我得出这样的结论:“您希望我在服务标签内添加一个端点。并且我必须确保我指定的合同应该满足Web服务的要求。”如果我错了,请正确填写我的问题? –

+0

是的。当然,这是假设你有满足该合同的服务。 – slorello

相关问题