我在我的 WP7 项目中使用 NetSuite 网络服务。
这是我使用的链接(较新版本): https ://webservices.na1.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl
这在我的 C# 控制台应用程序中运行良好,但在 WP7 中却不行。
在 WP7 中,它成功登录,但是在添加任何内容(员工、客户、时间表……)时,我收到以下错误:
"Your connection has timed out. Please log in again"
更新:
这是我的控制台代码:
NetSuiteService service = new NetSuiteService();
service.CookieContainer = new CookieContainer();
Passport passport = new Passport();
passport.account = "TSTDRVxxxxxx";
passport.email = "hamzeh.soboh@para-solutions.com";
RecordRef role = new RecordRef();
role.internalId = "3";
passport.role = role;
passport.password = "passxxxx";
Status status = service.login(passport).status;
以下是我的 WP7 代码:
NetSuitePortTypeClient service = new NetSuitePortTypeClient();
// service.CookieContainer = new CookieContainer();
Passport passport = new Passport();
passport.account = "TSTDRVxxxxxx";
passport.email = "hamzeh.soboh@para-solutions.com";
RecordRef role = new RecordRef();
role.internalId = "3";
passport.role = role;
passport.password = "passxxxx";
service.loginAsync(passport);
取消注释第二条语句会导致运行时错误。