Error consuming Web Service

4

For the month of July, a new service of the Spanish Tax Agency (AEAT) will be implemented, through which the Web Service will send information about the company's billing. The system is the SII (Immediate Information Supply).

The agency has published the test WSDL in

asked by Jaime Capilla 14.02.2017 в 08:13
source

1 answer

4

This is missing and it will work for you:

    ws.ClientCredentials.ClientCertificate.Certificate = CertificadoCorrecto
    ws.ClientCredentials.UseIdentityConfiguration = True

And this in the app.config:

<bindings>
      <basicHttpBinding>
        <binding name="siiBinding">
          <security mode="Transport">
            <transport clientCredentialType="Certificate" />
          </security>
        </binding>
      </basicHttpBinding>
      <customBinding>
        <binding name="siiBinding">
          <textMessageEncoding messageVersion="Soap11" />
          <httpsTransport />
        </binding>
       </customBinding>
    </bindings>
    
answered by 18.02.2017 / 17:19
source