0

我正在尝试使用 SuiteTalk 来检索客户记录。

我从这里下载了 v2016.1 WSDL:http: //www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml

我使用 mv 包来构建 WSDL 并生成 jar 文件。

我在 Eclipse 中创建了一个项目并添加了 jar 文件。我正在使用 Java。

这是我的代码片段。我被困在这里,不知道如何继续。看起来我缺少另一个 jar 文件?像 NetSuiteService?

RecordRef role = new RecordRef();
role.setInternalId("3");
role.setType(RecordType.contact);
Passport passport = new Passport();
passport.setEmail("me@test.com");
passport.setPassword("mypassword");
passport.setRole(role);
passport.setAccount("123456");

请帮我。我需要做什么?

4

2 回答 2

0

我使用.net,我认为您需要初始化服务以指示与您对应的数据中心,它或多或少是这样的:

    // Instantiate the NetSuite web services
    Service = new Aggregates.DataCenterAwareNetSuiteService(_account);
    Service.Timeout = 1000 * 60 * 60;

    var appInfo = new ApplicationInfo();
    //App info from application netsuite
    appInfo.applicationId = cuenta.ApplicationInfo;

    // Prepare login credentials for request level login
    Service.passport = new Passport()
    {
        email = _email,
        password = _password,
        account = _account
    };

    Service.applicationInfo = appInfo;
于 2016-11-30T21:34:26.547 回答
0

我不熟悉 Java 绑定,但您似乎缺少数据中心 URL 配置。

我建议使用ruby​​ bindings。它们是社区支持的,并且有一些不错的示例代码演示了各种常用功能。

于 2016-07-16T21:18:38.093 回答