title: Problems consuming a SAP WebService within C#
body: <p>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:</p>
  
  <p>"The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via"</p>
  
  <p>Here is the wsdl of the service:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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"&gt;
    &lt;wsdl:documentation&gt;
      &lt;sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl"/&gt;
    &lt;/wsdl:documentation&gt;
    &lt;wsp:UsingPolicy wsdl:required="true"/&gt;
    &lt;wsp:Policy wsu:Id="BN__ZICO_SO_CREATE"&gt;
      &lt;wsp:ExactlyOne&gt;
        &lt;wsp:All&gt;
          &lt;sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/"&gt;false&lt;/sapattahnd:Enabled&gt;
          &lt;saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true"/&gt;
          &lt;wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/&gt;
          &lt;wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&gt;
            &lt;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"&gt;
              &lt;wsp:Policy&gt;
                &lt;sp:TransportToken&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:HttpsToken&gt;
                      &lt;wsp:Policy&gt;
                        &lt;sp:HttpBasicAuthentication/&gt;
                      &lt;/wsp:Policy&gt;
                    &lt;/sp:HttpsToken&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:TransportToken&gt;
                &lt;sp:AlgorithmSuite&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Basic128Rsa15/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:AlgorithmSuite&gt;
                &lt;sp:Layout&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Strict/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:Layout&gt;
              &lt;/wsp:Policy&gt;
            &lt;/sp:TransportBinding&gt;
          &lt;/wsp:All&gt;
        &lt;/wsp:All&gt;
        &lt;wsp:All&gt;
          &lt;sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/"&gt;false&lt;/sapattahnd:Enabled&gt;
          &lt;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"/&gt;
          &lt;wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/&gt;
          &lt;wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&gt;
            &lt;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"&gt;
              &lt;wsp:Policy&gt;
                &lt;sp:TransportToken&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:HttpsToken&gt;
                      &lt;wsp:Policy&gt;
                        &lt;sp:HttpBasicAuthentication/&gt;
                      &lt;/wsp:Policy&gt;
                    &lt;/sp:HttpsToken&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:TransportToken&gt;
                &lt;sp:AlgorithmSuite&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Basic128Rsa15/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:AlgorithmSuite&gt;
                &lt;sp:Layout&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Strict/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:Layout&gt;
              &lt;/wsp:Policy&gt;
            &lt;/sp:TransportBinding&gt;
          &lt;/wsp:All&gt;
        &lt;/wsp:All&gt;
      &lt;/wsp:ExactlyOne&gt;
    &lt;/wsp:Policy&gt;
    &lt;wsp:Policy wsu:Id="BN__ZICO_SO_CREATE_soap12"&gt;
      &lt;wsp:ExactlyOne&gt;
        &lt;wsp:All&gt;
          &lt;sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/"&gt;false&lt;/sapattahnd:Enabled&gt;
          &lt;saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true"/&gt;
          &lt;wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/&gt;
          &lt;wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&gt;
            &lt;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"&gt;
              &lt;wsp:Policy&gt;
                &lt;sp:TransportToken&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:HttpsToken&gt;
                      &lt;wsp:Policy&gt;
                        &lt;sp:HttpBasicAuthentication/&gt;
                      &lt;/wsp:Policy&gt;
                    &lt;/sp:HttpsToken&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:TransportToken&gt;
                &lt;sp:AlgorithmSuite&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Basic128Rsa15/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:AlgorithmSuite&gt;
                &lt;sp:Layout&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Strict/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:Layout&gt;
              &lt;/wsp:Policy&gt;
            &lt;/sp:TransportBinding&gt;
          &lt;/wsp:All&gt;
        &lt;/wsp:All&gt;
        &lt;wsp:All&gt;
          &lt;sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/"&gt;false&lt;/sapattahnd:Enabled&gt;
          &lt;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"/&gt;
          &lt;wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true"/&gt;
          &lt;wsp:All xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&gt;
            &lt;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"&gt;
              &lt;wsp:Policy&gt;
                &lt;sp:TransportToken&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:HttpsToken&gt;
                      &lt;wsp:Policy&gt;
                        &lt;sp:HttpBasicAuthentication/&gt;
                      &lt;/wsp:Policy&gt;
                    &lt;/sp:HttpsToken&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:TransportToken&gt;
                &lt;sp:AlgorithmSuite&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Basic128Rsa15/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:AlgorithmSuite&gt;
                &lt;sp:Layout&gt;
                  &lt;wsp:Policy&gt;
                    &lt;sp:Strict/&gt;
                  &lt;/wsp:Policy&gt;
                &lt;/sp:Layout&gt;
              &lt;/wsp:Policy&gt;
            &lt;/sp:TransportBinding&gt;
          &lt;/wsp:All&gt;
        &lt;/wsp:All&gt;
      &lt;/wsp:ExactlyOne&gt;
    &lt;/wsp:Policy&gt;
    &lt;wsp:Policy wsu:Id="IF__ZICO_SO_CREATE"&gt;
      &lt;wsp:ExactlyOne&gt;
        &lt;wsp:All&gt;
          &lt;sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/"&gt;
            &lt;sapsession:enableSession&gt;false&lt;/sapsession:enableSession&gt;
          &lt;/sapsession:Session&gt;
          &lt;sapcentraladmin:CentralAdministration xmlns:sapcentraladmin="http://www.sap.com/webas/700/soap/features/CentralAdministration/" wsp:Optional="true"&gt;
            &lt;sapcentraladmin:BusinessApplicationID&gt;005056B643B81ED4A8B050998153F728&lt;/sapcentraladmin:BusinessApplicationID&gt;
          &lt;/sapcentraladmin:CentralAdministration&gt;
        &lt;/wsp:All&gt;
      &lt;/wsp:ExactlyOne&gt;
    &lt;/wsp:Policy&gt;
    &lt;wsp:Policy wsu:Id="OP__ZicoSoCreate"&gt;
      &lt;wsp:ExactlyOne&gt;
        &lt;wsp:All&gt;
          &lt;saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/"&gt;no&lt;/saptrhnw05:required&gt;
          &lt;sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/"&gt;false&lt;/sapcomhnd:enableCommit&gt;
          &lt;sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/"&gt;true&lt;/sapblock:enableBlocking&gt;
          &lt;saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/"&gt;false&lt;/saprmnw05:enableWSRM&gt;
        &lt;/wsp:All&gt;
      &lt;/wsp:ExactlyOne&gt;
    &lt;/wsp:Policy&gt;
    &lt;wsdl:types&gt;
      &lt;xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions"&gt;
        &lt;xsd:simpleType name="char1"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="1"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char10"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="10"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char12"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="12"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char18"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="18"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char2"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="2"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char20"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="20"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char220"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="220"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="char4"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="4"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="date10"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="10"/&gt;
            &lt;xsd:pattern value="\d\d\d\d-\d\d-\d\d"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="numeric3"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="3"/&gt;
            &lt;xsd:pattern value="\d*"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="numeric6"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="6"/&gt;
            &lt;xsd:pattern value="\d*"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="quantum13.3"&gt;
          &lt;xsd:restriction base="xsd:decimal"&gt;
            &lt;xsd:totalDigits value="13"/&gt;
            &lt;xsd:fractionDigits value="3"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="time"&gt;
          &lt;xsd:restriction base="xsd:time"&gt;
            &lt;xsd:pattern value="[0-9]{2}:[0-9]{2}:[0-9]{2}"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType name="unit3"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:maxLength value="3"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
      &lt;/xsd:schema&gt;
      &lt;xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions"&gt;
        &lt;xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/&gt;
        &lt;xsd:complexType name="ZicoWsSsSo"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="Sdhd1" type="tns:ZicoWsSsSdhd1"/&gt;
            &lt;xsd:element name="Parnr" type="tns:ZicoWsSsParnrTt"/&gt;
            &lt;xsd:element name="Sditm" type="tns:ZicoWsSsSditmTt"/&gt;
            &lt;xsd:element name="Schdl" type="tns:ZicoWsSsSchdlTt"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsSdhd1"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="DocType" type="n0:char4"/&gt;
            &lt;xsd:element name="SalesOrg" type="n0:char4"/&gt;
            &lt;xsd:element name="DistrChan" type="n0:char2"/&gt;
            &lt;xsd:element name="Division" type="n0:char2"/&gt;
            &lt;xsd:element name="ReqDateH" type="n0:date10"/&gt;
            &lt;xsd:element name="CreatedBy" type="n0:char12"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsParnr"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="ItmNumber" type="n0:numeric6"/&gt;
            &lt;xsd:element name="PartnRole" type="n0:char2"/&gt;
            &lt;xsd:element name="PartnNumb" type="n0:char10"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsSchdl"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="ItmNumber" type="n0:numeric6"/&gt;
            &lt;xsd:element name="ReqQty" type="n0:quantum13.3"/&gt;
            &lt;xsd:element name="ReqDate" type="n0:date10"/&gt;
            &lt;xsd:element name="ReqDateFrom" type="n0:date10"/&gt;
            &lt;xsd:element name="ReqDateTo" type="n0:date10"/&gt;
            &lt;xsd:element name="ReqTimeFrom" type="n0:time"/&gt;
            &lt;xsd:element name="ReqTimeTo" type="n0:time"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsSditm"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="ItmNumber" type="n0:numeric6"/&gt;
            &lt;xsd:element name="Material" type="n0:char18"/&gt;
            &lt;xsd:element name="Plant" type="n0:char4"/&gt;
            &lt;xsd:element name="StoreLoc" type="n0:char4"/&gt;
            &lt;xsd:element name="SalesUnit" type="n0:unit3"/&gt;
            &lt;xsd:element name="TargetQu" type="n0:unit3"/&gt;
            &lt;xsd:element name="TargetQty" type="n0:quantum13.3"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsMsg"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="Type" type="n0:char1"/&gt;
            &lt;xsd:element name="Id" type="n0:char20"/&gt;
            &lt;xsd:element name="Number" type="n0:numeric3"/&gt;
            &lt;xsd:element name="Message" type="n0:char220"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsParnrTt"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="item" type="tns:ZicoWsSsParnr" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsSchdlTt"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="item" type="tns:ZicoWsSsSchdl" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsSditmTt"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="item" type="tns:ZicoWsSsSditm" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:complexType name="ZicoWsSsMsgTt"&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element name="item" type="tns:ZicoWsSsMsg" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:element name="ZicoSoCreate"&gt;
          &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="IsSoData" type="tns:ZicoWsSsSo"/&gt;
            &lt;/xsd:sequence&gt;
          &lt;/xsd:complexType&gt;
        &lt;/xsd:element&gt;
        &lt;xsd:element name="ZicoSoCreateResponse"&gt;
          &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="ESoNumber" type="n0:char10"/&gt;
              &lt;xsd:element name="EtMessages" type="tns:ZicoWsSsMsgTt"/&gt;
            &lt;/xsd:sequence&gt;
          &lt;/xsd:complexType&gt;
        &lt;/xsd:element&gt;
      &lt;/xsd:schema&gt;
    &lt;/wsdl:types&gt;
    &lt;wsdl:message name="ZicoSoCreate"&gt;
      &lt;wsdl:part name="parameters" element="tns:ZicoSoCreate"/&gt;
    &lt;/wsdl:message&gt;
    &lt;wsdl:message name="ZicoSoCreateResponse"&gt;
      &lt;wsdl:part name="parameter" element="tns:ZicoSoCreateResponse"/&gt;
    &lt;/wsdl:message&gt;
    &lt;wsdl:portType name="ZICO_SO_CREATE"&gt;
      &lt;wsp:Policy&gt;
        &lt;wsp:PolicyReference URI="#IF__ZICO_SO_CREATE"/&gt;
      &lt;/wsp:Policy&gt;
      &lt;wsdl:operation name="ZicoSoCreate"&gt;
        &lt;wsp:Policy&gt;
          &lt;wsp:PolicyReference URI="#OP__ZicoSoCreate"/&gt;
        &lt;/wsp:Policy&gt;
        &lt;wsdl:input message="tns:ZicoSoCreate"/&gt;
        &lt;wsdl:output message="tns:ZicoSoCreateResponse"/&gt;
      &lt;/wsdl:operation&gt;
    &lt;/wsdl:portType&gt;
    &lt;wsdl:binding name="ZICO_SO_CREATE" type="tns:ZICO_SO_CREATE"&gt;
      &lt;wsp:Policy&gt;
        &lt;wsp:PolicyReference URI="#BN__ZICO_SO_CREATE"/&gt;
      &lt;/wsp:Policy&gt;
      &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&gt;
      &lt;wsdl:operation name="ZicoSoCreate"&gt;
        &lt;soap:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZICO_SO_CREATE:ZicoSoCreateRequest" style="document"/&gt;
        &lt;wsdl:input&gt;
          &lt;soap:body use="literal"/&gt;
        &lt;/wsdl:input&gt;
        &lt;wsdl:output&gt;
          &lt;soap:body use="literal"/&gt;
        &lt;/wsdl:output&gt;
      &lt;/wsdl:operation&gt;
    &lt;/wsdl:binding&gt;
    &lt;wsdl:binding name="ZICO_SO_CREATE_soap12" type="tns:ZICO_SO_CREATE"&gt;
      &lt;wsp:Policy&gt;
        &lt;wsp:PolicyReference URI="#BN__ZICO_SO_CREATE_soap12"/&gt;
      &lt;/wsp:Policy&gt;
      &lt;wsoap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&gt;
      &lt;wsdl:operation name="ZicoSoCreate"&gt;
        &lt;wsoap12:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZICO_SO_CREATE:ZicoSoCreateRequest" style="document"/&gt;
        &lt;wsdl:input&gt;
          &lt;wsoap12:body use="literal"/&gt;
        &lt;/wsdl:input&gt;
        &lt;wsdl:output&gt;
          &lt;wsoap12:body use="literal"/&gt;
        &lt;/wsdl:output&gt;
      &lt;/wsdl:operation&gt;
    &lt;/wsdl:binding&gt;
    &lt;wsdl:service name="ZICO_SO_CREATE"&gt;
      &lt;wsdl:port name="ZICO_SO_CREATE" binding="tns:ZICO_SO_CREATE"&gt;
        &lt;soap:address location="http://ICODCCSD01.ICODCC.local:8000/sap/bc/srt/rfc/sap/zico_so_create/200/zico_so_create/zico_so_create"/&gt;
      &lt;/wsdl:port&gt;
      &lt;wsdl:port name="ZICO_SO_CREATE_soap12" binding="tns:ZICO_SO_CREATE_soap12"&gt;
        &lt;wsoap12:address location="http://ICODCCSD01.ICODCC.local:8000/sap/bc/srt/rfc/sap/zico_so_create/200/zico_so_create/zico_so_create"/&gt;
      &lt;/wsdl:port&gt;
    &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And here's the code that was generated in my app.config:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;customBinding&gt;
          &lt;binding name="ZICO_SO_CREATE"&gt;
            &lt;!--    WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:soap:functions:mc-style':    --&gt;
            &lt;!--    &lt;wsdl:binding name='ZICO_SO_CREATE'&gt;    --&gt;
            &lt;!--        &lt;sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/"&gt;..&lt;/sapattahnd:Enabled&gt;    --&gt;
            &lt;mtomMessageEncoding messageVersion="Soap11WSAddressing10" /&gt;
            &lt;httpsTransport authenticationScheme="Basic" /&gt;
          &lt;/binding&gt;
          &lt;binding name="ZICO_SO_CREATE_soap12"&gt;
            &lt;!--    WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:soap:functions:mc-style':    --&gt;
            &lt;!--    &lt;wsdl:binding name='ZICO_SO_CREATE_soap12'&gt;    --&gt;
            &lt;!--        &lt;sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/"&gt;..&lt;/sapattahnd:Enabled&gt;    --&gt;
            &lt;mtomMessageEncoding /&gt;
            &lt;httpsTransport authenticationScheme="Basic" /&gt;
          &lt;/binding&gt;
        &lt;/customBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;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" /&gt;
        &lt;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" /&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And here is my C# Code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><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);
     }</code></pre>
  </div>
  </div>
  </p>
  
  <p>As you can see the web service requires a username/password authentication.
  Any help or suggestions are welcome.
  Kind regards
  Bernd</p>