Consuming a HTTPS Web Service in .Net 3.5 Web Project

Posted by Chris M on Stack Overflow See other posts from Stack Overflow or by Chris M
Published on 2010-05-25T10:23:23Z Indexed on 2010/05/25 10:31 UTC
Read the original article Hit count: 202

Filed under:
|
|
|

I'm trying to consume a webservice that ONLY runs on HTTPS but using the "add service" method in VS or using the WSDL to generate a code file leaves me with a web service that states its http...

  <wsdl:service name="OGServ"> 
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">XML Web Services element of OGServ Gateway</wsdl:documentation> 
    <wsdl:port name="OGServSoap" binding="tns:OGServSoap"> 
      <soap:address location="http://ogserv.domain.co.uk/ogwsrv/og.asmx" /> 
    </wsdl:port> 
    <wsdl:port name="OGServSoap12" binding="tns:OGServSoap12"> 
      <soap12:address location="http://ogserv.domain.co.uk/ogwsrv/og.asmx" /> 
    </wsdl:port> 
  </wsdl:service> 

Would this be the reason that even when I change the app.config (generated by the add-service) endpoint address to https it says it was expecting HTTP?

The error:

EC.Tests.OGGatewayLayerTest (TestFixtureSetUp):
System.ArgumentException : The provided URI scheme 'https' is invalid; expected 'http'.
Parameter name: via

© Stack Overflow or respective owner

Related posts about c#

Related posts about .net-3.5