I have imported WSDL and my connected service is sending request to our internal systems.
I can see on internal server log that a response is being sent back to our test NOP website.
I am unable to access data within plugin I am developing. I suspect it is because the logic continues on before response is received.
Can someone tell me the proper syntax to create a way to wait until response is received?
Here is my current code -
[HttpPost]
public ActionResult Backorder(BackorderModel model)
{
RBKOR.Ibkor_PwsClient client = new Ibkor_PwsClient();
RBKOR.ROU_INQCLKResponse rclient = new ROU_INQCLKResponse();
client.ROU_INQCLKAsync(model.CustNum);
model.TdataIn = rclient.RESULT;
model.Success="Did it "+ model.CustNum + rclient.RESULT + model.TdataIn ;
return View("~/Plugins/Widgets.AmtLion/Views/_Backorder.cshtml", model);
}
** client.ROU_INQCLKAsync(model.CustNum); is the line that sends data to our internal system.
model.TdataIn = rclient.RESULT; is what should contain the result.
When I hover over client.ROU_INQCLKAsync(model.CustNum); I get the following suggestion, just can't get it to work.
(awaitable) System.Threading.Tasks.Task<ROU_INQCLKResponse> ibkor_PwsClient.ROU_INQCLKAsync(string FIELDNAME)