Migrate MSSOAP.SoapClient30 from VB to c #

1

The issue is that I'm migrating a project from VBA to C #, and along the way I found:

Set SoapClient = CreateObject("MSSOAP.SoapClient30") 'Objeto Web Service Soap SoapClient.ClientProperty("ServerHTTPRequest") = True

so I started to improvise something like this:

MSSOAPLib30.SoapClient30 SoapClient = new MSSOAPLib30.SoapClient30(); SoapClient.ClientProperty("ServerHTTPRequest") = true;

  

But I get an error: "Indexer property 'lSoapClient.ClientProperty' you have non-optional arguments which must be provided"

I do not know if I'm on the right track or I'm being a mess.

    
asked by Mister J 30.10.2018 в 16:45
source

1 answer

2

My mistake was in writing:

SoapClient.ClientProperty("ServerHTTPRequest") = true;

When it was:

SoapClient.ClientProperty["ServerHTTPRequest"] = true;

    
answered by 31.10.2018 в 15:36