首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用WCF调用SOAP UI模拟服务:“提供的URI方案'https‘无效;应为’http‘。”

使用WCF调用SOAP UI模拟服务:“提供的URI方案'https‘无效;应为’http‘。”
EN

Stack Overflow用户
提问于 2011-08-03 16:38:32
回答 1查看 1.4K关注 0票数 0

我的一个同事给了我一个SOAP的模拟服务项目的副本。我可以在我的机器上很好地打开和运行这个模拟服务。它在以下地址运行:http://localhost:8088/mockShipmentInformationService

WSDL在以下地址提供:http://localhost:8088/mockShipmentInformationService_SOAPBinding?WSDL

使用提供的WSDL,我向应用程序项目添加了一个服务引用。为了测试调用服务的方法,我还向Unit testing项目添加了服务引用。

对于这两个项目,app.config中都添加了以下内容:

代码语言:javascript
运行
复制
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="ShipmentInformationService_SOAPBinding" 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:8088/mockShipmentInformationService_SOAPBinding"
        binding="basicHttpBinding" bindingConfiguration="ShipmentInformationService_SOAPBinding"
        contract="ShipmentInformationService.ShipmentInformationService"
        name="ShipmentInformationServicePort" />
    </client>
  </system.serviceModel>

如您所见,URL使用的是普通的http协议,而不是https。另外,我的安全模式设置为“无”。然而,在尝试调用服务方法时,我一直收到以下错误消息:

代码语言:javascript
运行
复制
 The provided URI scheme 'https' is invalid; expected 'http'.
 Parameter name: via

怎么回事?有没有可能在某个地方定义了一些正在造成严重破坏的URL?我应该去哪里找呢?

EN

Stack Overflow用户

回答已采纳

发布于 2011-08-04 21:26:19

我刚刚发现它都在app.config文件中。应用程序项目在applicationSettings部分中有一个错误的URL,并且该URL不存在于单元测试项目中。我现在至少可以调用服务了,尽管我现在有一些其他的问题。

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6923732

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档