3

我在控制台应用程序中使用以下代码:

NetSuiteService service = new NetSuiteService();

Passport passport = new Passport();
passport.account = "TSTDRV976513";
passport.email = "hamzeh.soboh@para-solutions.com";
passport.password = "*******";

RecordRef role = new RecordRef();
role.internalId = "3";
passport.role = role;

Status status = service.login(passport).status;

我收到以下错误:

    The request failed with the error message:

    <html><head><title>302 Moved Temporarily</title></head>
    --
    --
    </html>

我错过了什么吗?

4

2 回答 2

5

快速修复将 URL 更改为 webservices.na1.netsuite.com

永久修复 http://dreamxtream.wordpress.com/2012/11/23/new-data-centers-for-netsuite-accounts/

于 2013-03-05T09:20:42.173 回答
0

如上所述更改 URL 确实有效,或者您可以只允许您的服务代理跟踪重定向,NetSuite 会自动将您带到正确的 URL:

NetSuiteService service = new NetSuiteService();
service.AllowAutoRedirects = true;

似乎为我工作。

于 2015-04-17T16:41:16.180 回答