I want to get data from NetSuite WebService . This is how my code looks like:
public class HomeController : Controller
{
WebServiceGenesisSoapClient service;
public HomeController()
{
var aa = WebServiceGenesisSoapClient.EndpointConfiguration.WebServiceGenesisSoap;
service = new WebServiceGenesisSoapClient(aa);
}
public async Task<IActionResult> Index()
{
WebServiceGenesisSoapClient client = new WebServiceGenesisSoapClient(aa, "http://82.71.28.125/WebServiceGenesis/WebServiceGenesis.asmx");
GetStockQuantityArrayRequest getStockQuantityArrayRequest = new GetStockQuantityArrayRequest();
var stocklist = client.GetStockQuantityArrayAsync(getStockQuantityArrayRequest).Result;
ArrayOfXElement res = stocklist.GetStockQuantityArrayResult;
}
}
Two Nodes are present in res variable. This is how first node looks like:
If datas are present in response, they are present in second node. If datas are not present, I want to get value of name attribute inside xs:sequence element of first node.