C# Netsuite Suitetalk服务引用在ASP.NET和Visual Studio中不起作用
我无法让VisualStudio(VS)识别Netsuite示例代码或其他文章中的方法。我正在附加我的VS屏幕的截图()。代码主要来自本手册第24页 我已将WSDL作为服务引用导入VS中。这是错的吗?我看到一篇帖子()说服务引用和web引用之间有区别。Netsuite文档确实说要导入一个web引用,但VS似乎没有任何与该术语相关的内容 VS正在识别一些方法,如RecordRef,但它不识别对NetSuite服务或Passport的调用,正如您在屏幕截图上看到的那样,因为这些术语带有下划线。因为Netsuite服务引用有一个有效的名称空间,所以我假设我不需要在“using netsuiteServiceReference.com.Netsuite.webservices;”行中添加一个名称空间,但是我这样做了,因为文档中这么说 我的理解是VS应该识别任何有效的函数调用。我哪里做错了 在下面的代码中,我粗体显示了VS强调的语法错误(将其放在**中)C# Netsuite Suitetalk服务引用在ASP.NET和Visual Studio中不起作用,c#,asp.net,visual-studio-2013,netsuite,C#,Asp.net,Visual Studio 2013,Netsuite,我无法让VisualStudio(VS)识别Netsuite示例代码或其他文章中的方法。我正在附加我的VS屏幕的截图()。代码主要来自本手册第24页 我已将WSDL作为服务引用导入VS中。这是错的吗?我看到一篇帖子()说服务引用和web引用之间有区别。Netsuite文档确实说要导入一个web引用,但VS似乎没有任何与该术语相关的内容 VS正在识别一些方法,如RecordRef,但它不识别对NetSuite服务或Passport的调用,正如您在屏幕截图上看到的那样,因为这些术语带有下划线。因为N
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using **netsuiteServiceReference.com**.netsuite.webservices;
namespace WebApplication5
{
namespace netsuiteServiceReference
{
**NetSuiteService** service = new **NetSuiteService**();
service.CookieContainer = new **CookieContainer**();
//invoke the login operation
Passport passport = new **Passport**();
passport.account = "TSTDRV96";
passport.email = "username@netsuite.com";
RecordRef record = new **RecordRef**();
role.id = "3";
passport.record = record;
passport.password = "mypassword";
Status status = service.login( passport ).status;
}
public partial class ThursdayTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
您可以从SuiteTalk示例应用程序开始,该应用程序可以在以下位置找到:
这在Visual Studio中可以正常加载。听起来像是您创建了一个服务引用。您必须创建一个Web引用
欢迎来到堆栈溢出!请将您的问题包含为文本的实际代码,以及您的项目的服务参考,以代替屏幕截图。此外,指向Netsuite文档的链接已断开。感谢您为未来的搜索者改进这个问题!