只需对演示NAV 2016 Web服务进行非常简单的概念验证请求即可。这是我到目前为止的内容:
代码:
using System;
using System.Net;
using mynavservice;
class Program
{
static void Main(string[] args)
{
itemcard_Service service = new itemcard_Service();
service.Credentials = new NetworkCredential("myusername", "mypassword");
itemcard item = service.Read("1000");
Console.WriteLine(item.Description);
Console.WriteLine(item.Inventory);
Console.ReadKey();
}
}
但是,当service.Read执行时,会抛出SOAP异常:
Service "CRONUS USA%2C Inc./Page/itemcard" was not found!
有什么想法能浏览到Web服务SOAP URL,成功添加对Web服务SOAP URL的引用,但是当我尝试在代码中使用它时是否抛出此未找到的错误?
感谢您的帮助!