prasanna p

prasanna p

  • 1.2k
  • 465
  • 96.7k

Unable to get the response from the GetDataSetResultAsync

Jul 28 2019 9:14 AM
Hi Friends,
 
 
 I am adding webservice url through connected services to the project.I am calling the service url like this.
 
BasicHttpBinding rsBinding = new BasicHttpBinding();
rsBinding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
rsBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
rsBinding.MaxReceivedMessageSize = Int32.MaxValue;
rsBinding.MaxBufferSize = Int32.MaxValue;
EndpointAddress rsEndpointAddress = new EndpointAddress("serviceurl");
soapclient = new ServiceSoapClient(rsBinding, rsEndpointAddress);
string fromdate = "2018-01-01";
string todate = "2050-12-31";
string username = "user";
string password = "password";
var result = await soapclient.GetDataSetResultAsync(fromdate, todate, username, password);
string jsonString = JsonConvert.SerializeObject(result);
var objects = JObject.Parse(jsonString);
 
when I am executing this async method.The response is null from GetDataSetResultAsync.I am not getting any data from the webservice url.
 
Please tell me the what's wrong in myy code and how to get the data from the webservice method? 
 

Answers (1)