2

WP7プロジェクトでNetSuiteWebサービスを使用しています。

これは私が使用しているリンクです(新しいバージョン): 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);

2番目のステートメントのコメントを解除すると、ランタイムエラーが発生します。

4

1 に答える 1

0

次のように、Cookie なしで試してください。

        // Instantiate the NetSuite web services
        netSuiteService = new DataCenterAwareNetSuiteService(*yourAccountNumber*);
        netSuiteService.Timeout = 1000 * 60 * 60;

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

        // Prepare login credentials for request level login
        netSuiteService.passport = new Passport()
        {
            email = yourEmail*,
            password = *yourPassword*,
            account = *yourAccountNumber*
        };

        netSuiteService.applicationInfo = appInfo;

        Prefs = new Preferences();
        netSuiteService.preferences = Prefs;
        SearchPreferences = new SearchPreferences();
        netSuiteService.searchPreferences = SearchPreferences;
        Prefs.warningAsErrorSpecified = true;
        Prefs.warningAsError = false; 
        SearchPreferences.bodyFieldsOnly = false;
于 2016-12-05T01:17:28.663 に答える