0

I am creating client for soap service on .Net Core. Code was generated from wsdl https://testfinance.post.ee/finance/erp/erpServices.wsdl

Code which should send request

var client = new ErpDataExchangeClient(
                ErpDataExchangeClientBase.EndpointConfiguration.ErpDataExchangeSoap11);

var eInvoiceRequest = new EInvoiceRequest()
{
        authPhrase = "10****:rskzsbkqdlmlmaeoyhmzeyttacozypxbbwqudna***********",
                E_Invoice = GetEinvoice()
};

 var result = client.EInvoiceAsync(eInvoiceRequest).Result;

GetEinvoice() - returns XMl document

On runtime I get an exception:

System.InvalidOperationException: 'Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it.'

Service should be fine. This is a big company API.

Nothing was changed, used only automatically generated code. What should I do to be able make API calls for this SOAP service

Filburt
  • 17,626
  • 12
  • 64
  • 115
dm k
  • 111
  • 3
  • 9
  • [This documentation](https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/duplex-services) may point you in the right direction. – Scott Hannen Jul 02 '19 at 14:10
  • Yes, there described point with wsDualHttpBinding, it could be usefull, but service endpoit is HTTPS. wsDualHttpBinding works only with HTTP – dm k Jul 02 '19 at 17:45
  • How did you generate the client code? As this [WCF Features in .Net Core 2.0](https://github.com/dotnet/wcf/blob/master/release-notes/SupportedFeatures-v2.0.0.md), duplex binding is not supported. – Edward Jul 03 '19 at 05:53
  • Project is Net Core 2.2. Generated as Connected Services-> Microsoft WCF Web Service Reference Provider -> Uri -> Finish – dm k Jul 03 '19 at 07:57

0 Answers0