I am trying to communicate with an external SOAP web service from a .NET Core 2.0 application. I have got the WSDL and XSD files for the service, and used these as input to svcutil.exe for generating code from the command line. This works OK as long as I use the insecure versions of the received WSDL files (only to be used for testing purposes), but when I use the generated code from the WSS versions of the WSDL files, I get compilation errors on some operation contract attributes, e.g.:
[System.ServiceModel.OperationContractAttribute(ProtectionLevel=System.Net.Security.ProtectionLevel.Sign, Action="CollectedData", ReplyAction="*")]
(...)
<ReturnType> MethodToBeCalledFromMyCode (<RequestDataType> request);
Seems like ProtectionLevel is not part of the OperationContractAttribute in the .NET Core WCF-client.
Does anyone know how to overcome this (or do it the correct way for .NET Core)? Or if this is on the roadmap for being implemented for next version of .NET Core?
I realize that this might be something platform dependent (since it in turn is related to accessing certificates from a certificate store for signing messages etc.), so I am open for alternative solutions.
For now, I am getting around the problem by using .NET Framework and run the WCF code on a Virtual Machine with the needed certificates installed in the local store there. But the majority of our codebase is C# .NET Core, running in Linux Containers in a Kubernetes cluster, so this workaround is creating some headache for us, as it does not fit well with the rest of the deployment and infrastructure maintenance.
Any suggestions will be appreciated.