是否可以通过SOAP

时间:2018-10-17 07:54:07

标签: soap netsuite

我正在尝试通过SOAP通过位置名称列表搜索NetSuite位置记录。根据{{​​3}},搜索列“名称”具有“文本”类型而不是列表,因此我尝试改用“ getList”方法。

根据消息文档,getList模式如下:

<complexType name="GetListRequest">
    <sequence>
        <element name="baseRef" type="platformCore:BaseRef" minOccurs="1" maxOccurs="unbounded"/>
    </sequence>
</complexType>

,BaseRef文档如下:

<complexType name="BaseRef" abstract="true">
    <sequence>
        <element name="name" type="xsd:string" minOccurs="0"/>
        <!-- record name -->
    </sequence>
</complexType>

因此,我构建了SOAP正文:

    <soap:Body>
    <platformMsgs:getList xmlns:platformCore="urn:core_2016_2.platform.webservices.netsuite.com"  xmlns:listRel="urn:relationships_2016_2.lists.webservices.netsuite.com" xmlns:platformMsgs="urn:messages_2016_2.platform.webservices.netsuite.com"    xmlns:listAcct="urn:accounting_2016_2.lists.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <platformMsgs:baseRef xsi:type="platformCore:RecordRef" type="subsidiary">
            <name>some</name>
        </platformMsgs:baseRef>
    </platformMsgs:getList>
</soap:Body>

并收到错误消息:

    <soapenv:Body>
    <getListResponse xmlns="urn:messages_2016_2.platform.webservices.netsuite.com">
        <readResponseList>
            <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2016_2.platform.webservices.netsuite.com"/>
            <readResponse>
                <platformCore:status isSuccess="false" xmlns:platformCore="urn:core_2016_2.platform.webservices.netsuite.com">
                    <platformCore:statusDetail type="ERROR">
                        <platformCore:code>INVALID_KEY_OR_REF</platformCore:code>
                        <platformCore:message>The specified key is invalid.</platformCore:message>
                    </platformCore:statusDetail>
                </platformCore:status>
            </readResponse>
        </readResponseList>
    </getListResponse>
</soapenv:Body>

我想我对getList方法的使用一定有所误解,但我无法通过搜索Google或StackOverflow找到答案,非常感谢您提供任何信息和建议,谢谢!

0 个答案:

没有答案