Мой коллега дал мне копию фиктивного сервисного проекта для SOAP UI. Я могу открыть и запустить этот фиктивный сервис на моей машине.
Он работает по адресу: http://localhost:8088/mockShipmentInformationService
WSDL предоставляется по адресу: http://localhost:8088/mockShipmentInformationService_SOAPBinding?WSDL
Используя WSDL, я добавил ссылку на сервис в проект приложения. Чтобы протестировать методы, вызывающие службу, я также добавил ссылку на службу в проект модульного тестирования.
Для обоих проектов в app.config добавляется следующее:
<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. Кроме того, мой режим безопасности установлен на "нет". Тем не менее, я продолжаю получать следующее сообщение об ошибке при попытке вызвать метод обслуживания:
The provided URI scheme 'https' is invalid; expected 'http'.
Parameter name: via
Что дает? Могут ли быть где-то определенные URL, которые наносят ущерб? Куда мне смотреть?