php - 网络套件错误 :You are not requesting the correct data center for your company"

标签 php netsuite

我使用的是 Netsuite PHPToolkit 2014_1 版。

$nsendpoint = "2014_1";
$nshost = "https://webservices.netsuite.com";

今天我在通过 webservice 登录时收到此错误

You are not requesting the correct data center for your company ! Please correct the host in the URL.

这是我的回答

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>
                soapenv:Server.userException
            </faultcode>
            <faultstring>
                You are not requesting the correct data center for your company ! Please correct the host in the URL.
            </faultstring>
            <detail>
                <platformFaults:unexpectedErrorFault xmlns:platformFaults="urn:faults_2014_1.platform.webservices.netsuite.com">
                    <platformFaults:code>
                        USER_ERROR
                    </platformFaults:code>
                    <platformFaults:message>
                        You are not requesting the correct data center for your company ! Please correct the host in the URL.
                    </platformFaults:message>
                </platformFaults:unexpectedErrorFault>
                <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">
                    partners-java10010.bos.netledger.com
                </ns1:hostname>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

它之前运行良好。

最佳答案

如今,每个客户的 NetSuite 数据中心 URL 都不同。

配置 NSconfig.php 后,运行以下脚本来识别端点 URL。示例来自PHPToolkit_2018_2的samples文件夹,

require_once 'PHPToolkit/NetSuiteService.php';

$service = new NetSuiteService();
$service->useRequestLevelCredentials(false);

$params = new GetDataCenterUrlsRequest();
$params->account = NS_ACCOUNT;
$response = $service->getDataCenterUrls($params);
$webservicesDomain = $response->getDataCenterUrlsResult->dataCenterUrls->webservicesDomain;
print "url: $webservicesDomain";

一旦您获得了 URL,您就可以将其输入到您的配置中。

关于php - 网络套件错误 :You are not requesting the correct data center for your company",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25683169/

相关文章:

javascript - 使用 jQuery 的 NetSuite ReSTLet

php - SagePay 如何与 PayPal Express Checkout 配合使用?

php - 我可以在应用程序文件夹的index.php中设置active_group吗?

Visual Studio 代码中的 PHP 8

php - 从扩展类调用其对象时出现 PDO rowCount() 错误

javascript - 调用自定义对象时返回 undefined variable ,否则很好

version-control - 如何从生产环境(仅)刷新 NetSuite 沙箱代码?

Netsuite 保存的搜索提取前六个字符

php - 是否可以将数据回显到文本框中或将这些数据保存在 MySQL 上?

netsuite - 从消息记录查询附件