-2

since hours I try to consume a webservice from my little C# win-test-app. I used the standard mechanism to consume the webservice ("Add Service Reference"). Then I was able to create the client with the automatically generated code. But when I call one of the methods of the webservice I get the following error message:

"The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via"

Here is the wsdl of the service:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:n1="urn:sap-com:document:sap:rfc:functions">
  <wsdl:documentation>
    <sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl"/>
  </wsdl:documentation>
  <wsp:UsingPolicy wsdl:required="true"/>
  <wsp:Policy wsu:Id="BN__ZICO_SO_CREATE">
    <wsp:ExactlyOne>
      <wsp:All>
        <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">false</sapattahnd:Enabled>
        <saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true"/>
        <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/>
        <wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
          <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
            <wsp:Policy>
              <sp:TransportToken>
                <wsp:Policy>
                  <sp:HttpsToken>
                    <wsp:Policy>
                      <sp:HttpBasicAuthentication/>
                    </wsp:Policy>
                  </sp:HttpsToken>
                </wsp:Policy>
              </sp:TransportToken>
              <sp:AlgorithmSuite>
                <wsp:Policy>
                  <sp:Basic128Rsa15/>
                </wsp:Policy>
              </sp:AlgorithmSuite>
              <sp:Layout>
                <wsp:Policy>
                  <sp:Strict/>
                </wsp:Policy>
              </sp:Layout>
            </wsp:Policy>
          </sp:TransportBinding>
        </wsp:All>
      </wsp:All>
      <wsp:All>
        <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">false</sapattahnd:Enabled>
        <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true"/>
        <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/>
        <wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
          <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
            <wsp:Policy>
              <sp:TransportToken>
                <wsp:Policy>
                  <sp:HttpsToken>
                    <wsp:Policy>
                      <sp:HttpBasicAuthentication/>
                    </wsp:Policy>
                  </sp:HttpsToken>
                </wsp:Policy>
              </sp:TransportToken>
              <sp:AlgorithmSuite>
                <wsp:Policy>
                  <sp:Basic128Rsa15/>
                </wsp:Policy>
              </sp:AlgorithmSuite>
              <sp:Layout>
                <wsp:Policy>
                  <sp:Strict/>
                </wsp:Policy>
              </sp:Layout>
            </wsp:Policy>
          </sp:TransportBinding>
        </wsp:All>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="BN__ZICO_SO_CREATE_soap12">
    <wsp:ExactlyOne>
      <wsp:All>
        <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">false</sapattahnd:Enabled>
        <saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true"/>
        <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/>
        <wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
          <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
            <wsp:Policy>
              <sp:TransportToken>
                <wsp:Policy>
                  <sp:HttpsToken>
                    <wsp:Policy>
                      <sp:HttpBasicAuthentication/>
                    </wsp:Policy>
                  </sp:HttpsToken>
                </wsp:Policy>
              </sp:TransportToken>
              <sp:AlgorithmSuite>
                <wsp:Policy>
                  <sp:Basic128Rsa15/>
                </wsp:Policy>
              </sp:AlgorithmSuite>
              <sp:Layout>
                <wsp:Policy>
                  <sp:Strict/>
                </wsp:Policy>
              </sp:Layout>
            </wsp:Policy>
          </sp:TransportBinding>
        </wsp:All>
      </wsp:All>
      <wsp:All>
        <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">false</sapattahnd:Enabled>
        <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true"/>
        <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/>
        <wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
          <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
            <wsp:Policy>
              <sp:TransportToken>
                <wsp:Policy>
                  <sp:HttpsToken>
                    <wsp:Policy>
                      <sp:HttpBasicAuthentication/>
                    </wsp:Policy>
                  </sp:HttpsToken>
                </wsp:Policy>
              </sp:TransportToken>
              <sp:AlgorithmSuite>
                <wsp:Policy>
                  <sp:Basic128Rsa15/>
                </wsp:Policy>
              </sp:AlgorithmSuite>
              <sp:Layout>
                <wsp:Policy>
                  <sp:Strict/>
                </wsp:Policy>
              </sp:Layout>
            </wsp:Policy>
          </sp:TransportBinding>
        </wsp:All>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="IF__ZICO_SO_CREATE">
    <wsp:ExactlyOne>
      <wsp:All>
        <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
          <sapsession:enableSession>false</sapsession:enableSession>
        </sapsession:Session>
        <sapcentraladmin:CentralAdministration xmlns:sapcentraladmin="http://www.sap.com/webas/700/soap/features/CentralAdministration/" wsp:Optional="true">
          <sapcentraladmin:BusinessApplicationID>005056B643B81ED4A8B050998153F728</sapcentraladmin:BusinessApplicationID>
        </sapcentraladmin:CentralAdministration>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="OP__ZicoSoCreate">
    <wsp:ExactlyOne>
      <wsp:All>
        <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
        <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
        <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
        <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsdl:types>
    <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">
      <xsd:simpleType name="char1">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="1"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char10">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="10"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char12">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="12"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char18">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="18"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char2">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="2"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char20">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="20"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char220">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="220"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="char4">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="4"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="date10">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="10"/>
          <xsd:pattern value="\d\d\d\d-\d\d-\d\d"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="numeric3">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="3"/>
          <xsd:pattern value="\d*"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="numeric6">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="6"/>
          <xsd:pattern value="\d*"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="quantum13.3">
        <xsd:restriction base="xsd:decimal">
          <xsd:totalDigits value="13"/>
          <xsd:fractionDigits value="3"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="time">
        <xsd:restriction base="xsd:time">
          <xsd:pattern value="[0-9]{2}:[0-9]{2}:[0-9]{2}"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="unit3">
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="3"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:schema>
    <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions">
      <xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/>
      <xsd:complexType name="ZicoWsSsSo">
        <xsd:sequence>
          <xsd:element name="Sdhd1" type="tns:ZicoWsSsSdhd1"/>
          <xsd:element name="Parnr" type="tns:ZicoWsSsParnrTt"/>
          <xsd:element name="Sditm" type="tns:ZicoWsSsSditmTt"/>
          <xsd:element name="Schdl" type="tns:ZicoWsSsSchdlTt"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsSdhd1">
        <xsd:sequence>
          <xsd:element name="DocType" type="n0:char4"/>
          <xsd:element name="SalesOrg" type="n0:char4"/>
          <xsd:element name="DistrChan" type="n0:char2"/>
          <xsd:element name="Division" type="n0:char2"/>
          <xsd:element name="ReqDateH" type="n0:date10"/>
          <xsd:element name="CreatedBy" type="n0:char12"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsParnr">
        <xsd:sequence>
          <xsd:element name="ItmNumber" type="n0:numeric6"/>
          <xsd:element name="PartnRole" type="n0:char2"/>
          <xsd:element name="PartnNumb" type="n0:char10"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsSchdl">
        <xsd:sequence>
          <xsd:element name="ItmNumber" type="n0:numeric6"/>
          <xsd:element name="ReqQty" type="n0:quantum13.3"/>
          <xsd:element name="ReqDate" type="n0:date10"/>
          <xsd:element name="ReqDateFrom" type="n0:date10"/>
          <xsd:element name="ReqDateTo" type="n0:date10"/>
          <xsd:element name="ReqTimeFrom" type="n0:time"/>
          <xsd:element name="ReqTimeTo" type="n0:time"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsSditm">
        <xsd:sequence>
          <xsd:element name="ItmNumber" type="n0:numeric6"/>
          <xsd:element name="Material" type="n0:char18"/>
          <xsd:element name="Plant" type="n0:char4"/>
          <xsd:element name="StoreLoc" type="n0:char4"/>
          <xsd:element name="SalesUnit" type="n0:unit3"/>
          <xsd:element name="TargetQu" type="n0:unit3"/>
          <xsd:element name="TargetQty" type="n0:quantum13.3"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsMsg">
        <xsd:sequence>
          <xsd:element name="Type" type="n0:char1"/>
          <xsd:element name="Id" type="n0:char20"/>
          <xsd:element name="Number" type="n0:numeric3"/>
          <xsd:element name="Message" type="n0:char220"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsParnrTt">
        <xsd:sequence>
          <xsd:element name="item" type="tns:ZicoWsSsParnr" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsSchdlTt">
        <xsd:sequence>
          <xsd:element name="item" type="tns:ZicoWsSsSchdl" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsSditmTt">
        <xsd:sequence>
          <xsd:element name="item" type="tns:ZicoWsSsSditm" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ZicoWsSsMsgTt">
        <xsd:sequence>
          <xsd:element name="item" type="tns:ZicoWsSsMsg" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="ZicoSoCreate">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="IsSoData" type="tns:ZicoWsSsSo"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="ZicoSoCreateResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="ESoNumber" type="n0:char10"/>
            <xsd:element name="EtMessages" type="tns:ZicoWsSsMsgTt"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="ZicoSoCreate">
    <wsdl:part name="parameters" element="tns:ZicoSoCreate"/>
  </wsdl:message>
  <wsdl:message name="ZicoSoCreateResponse">
    <wsdl:part name="parameter" element="tns:ZicoSoCreateResponse"/>
  </wsdl:message>
  <wsdl:portType name="ZICO_SO_CREATE">
    <wsp:Policy>
      <wsp:PolicyReference URI="#IF__ZICO_SO_CREATE"/>
    </wsp:Policy>
    <wsdl:operation name="ZicoSoCreate">
      <wsp:Policy>
        <wsp:PolicyReference URI="#OP__ZicoSoCreate"/>
      </wsp:Policy>
      <wsdl:input message="tns:ZicoSoCreate"/>
      <wsdl:output message="tns:ZicoSoCreateResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ZICO_SO_CREATE" type="tns:ZICO_SO_CREATE">
    <wsp:Policy>
      <wsp:PolicyReference URI="#BN__ZICO_SO_CREATE"/>
    </wsp:Policy>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="ZicoSoCreate">
      <soap:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZICO_SO_CREATE:ZicoSoCreateRequest" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ZICO_SO_CREATE_soap12" type="tns:ZICO_SO_CREATE">
    <wsp:Policy>
      <wsp:PolicyReference URI="#BN__ZICO_SO_CREATE_soap12"/>
    </wsp:Policy>
    <wsoap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="ZicoSoCreate">
      <wsoap12:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZICO_SO_CREATE:ZicoSoCreateRequest" style="document"/>
      <wsdl:input>
        <wsoap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ZICO_SO_CREATE">
    <wsdl:port name="ZICO_SO_CREATE" binding="tns:ZICO_SO_CREATE">
      <soap:address location="http://ICODCCSD01.ICODCC.local:8000/sap/bc/srt/rfc/sap/zico_so_create/200/zico_so_create/zico_so_create"/>
    </wsdl:port>
    <wsdl:port name="ZICO_SO_CREATE_soap12" binding="tns:ZICO_SO_CREATE_soap12">
      <wsoap12:address location="http://ICODCCSD01.ICODCC.local:8000/sap/bc/srt/rfc/sap/zico_so_create/200/zico_so_create/zico_so_create"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

And here's the code that was generated in my app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="ZICO_SO_CREATE">
          <!--    WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:soap:functions:mc-style':    -->
          <!--    <wsdl:binding name='ZICO_SO_CREATE'>    -->
          <!--        <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">..</sapattahnd:Enabled>    -->
          <mtomMessageEncoding messageVersion="Soap11WSAddressing10" />
          <httpsTransport authenticationScheme="Basic" />
        </binding>
        <binding name="ZICO_SO_CREATE_soap12">
          <!--    WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:soap:functions:mc-style':    -->
          <!--    <wsdl:binding name='ZICO_SO_CREATE_soap12'>    -->
          <!--        <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">..</sapattahnd:Enabled>    -->
          <mtomMessageEncoding />
          <httpsTransport authenticationScheme="Basic" />
        </binding>
      </customBinding>
    </bindings>
    <client>
      <endpoint address="http://ICODCCSD01.ICODCC.local:8000/sap/bc/srt/rfc/sap/zico_so_create/200/zico_so_create/zico_so_create" binding="customBinding" bindingConfiguration="ZICO_SO_CREATE" contract="ZICO_SO_CREATE" name="ZICO_SO_CREATE" />
      <endpoint address="http://ICODCCSD01.ICODCC.local:8000/sap/bc/srt/rfc/sap/zico_so_create/200/zico_so_create/zico_so_create" binding="customBinding" bindingConfiguration="ZICO_SO_CREATE_soap12" contract="ZICO_SO_CREATE" name="ZICO_SO_CREATE_soap12" />
    </client>
  </system.serviceModel>
</configuration>

And here is my C# Code:

   try
   {
    ZICO_SO_CREATEClient client = new ZICO_SO_CREATEClient("ZICO_SO_CREATE_soap12");
    client.ClientCredentials.UserName.UserName = "myuser";
    client.ClientCredentials.UserName.Password = "mypassword";
    client.ClientCredentials.HttpDigest.ClientCredential.UserName = "myuser";
    client.ClientCredentials.HttpDigest.ClientCredential.Password = "mypassword";
    ZicoSoCreate zico = new ZicoSoCreate();
    zico.IsSoData = new ZicoWsSsSo();
    zico.IsSoData.Sdhd1 = new ZicoWsSsSdhd1();
    zico.IsSoData.Sdhd1.DocType = "OTA";
    ZicoWsSsParnr[] parNr = new ZicoWsSsParnr[1];
    parNr[0] = new ZicoWsSsParnr();
    parNr[0].ItmNumber = "123456";
    zico.IsSoData.Parnr = parNr;
    ZicoWsSsSditm[] values = new ZicoWsSsSditm[4];
    // Unleaded
    AddZicoWsSsSditmValue(values, 0, "110", "500");
    // PremiumUnleaded
    AddZicoWsSsSditmValue(values, 1, "210", "600");
    // Diesel
    AddZicoWsSsSditmValue(values, 2, "310", "700");
    // PremiumDiesel
    AddZicoWsSsSditmValue(values, 3, "410", "800");
    zico.IsSoData.Sditm = values;
    ZicoSoCreateResponse response = client.ZicoSoCreate(zico);
    string result = "";
    foreach (ZicoWsSsMsg msg in response.EtMessages)
    {
     result += msg.Id + ":" + msg.Message + ":" + msg.Number + ":" + msg.Type + "#";
    }
    MessageBox.Show(result);
   }
   catch (Exception ex)
   {
    MessageBox.Show(ex.Message);
   }

As you can see the web service requires a username/password authentication. Any help or suggestions are welcome. Kind regards Bernd

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
  • 1
    Did you try changing the end point address in your app config file to use HTTPS? The error clearly states it is looking for HTTPS which is just an encrypted channel the error states nothing about User name and password being incorrect or missing eve. I would suggest that you try on HTTPS first. – Namphibian Feb 19 '15 at 00:05

2 Answers2

0

Change to httpTransport instead of httpsTransport

kma1975
  • 7
  • 3
0

Change the TransportBinding WS-SecurityPolicy from v1.2 to v1.3

TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"...

to

TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"...