I am trying to access the sap soap API from .NET but get an error 'Unrecognized message version.' my code
String endpointurl = "http://link/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/zhr_emp_leave_balance_chk/410/zhr_emp_leave_balance_chk/zhr_emp_leave_balance_chk?sap-client=410";
BasicHttpBinding binding = new BasicHttpBinding();
//If you need HTTP with Basic Auth for internal network or dev environments. Otherwise remove these two lines:
binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
EndpointAddress endpoint = new EndpointAddress(endpointurl);
ZHR_EMP_LEAVE_BALANCE_CHKClient wsclient = new ServiceReference1.ZHR_EMP_LEAVE_BALANCE_CHKClient(binding, endpoint);
wsclient.ClientCredentials.UserName.UserName = "user";
wsclient.ClientCredentials.UserName.Password = "password";
//Here you can use client
ServiceReference1.ZhrGetEmployeeLeaveWs re = new ZhrGetEmployeeLeaveWs();
re.IvPernr = "id";
var request = new ServiceReference1.ZhrGetEmployeeLeaveWsRequest(re);
var response = await wsclient.ZhrGetEmployeeLeaveWsAsync(re);
r = response.ZhrGetEmployeeLeaveWsResponse.EsDtls.LeaveBalance.ToString();