0

I am having awful problems using strong-soap in Node to connect to Netsuite.

Below are 2 Soap envelopes. The first one is created in Postman which I am using to debug and works perfectly.

The second I got by using the client.lastrequest function in strong soap to see what was actually being put together.

I know there are slight syntactical differences between the two bodies, even so I am sure the 2nd envelope contains the required elements and I know the authentication works because I have tried it with other operators.

If anyone spots anything obvious that a layman like me is missing I would be very grateful. Thank you. The logs show that the envelope never reaches Netsuite, I just get an error that says 'undefined' and nothing else happens, so it is not even leaving Node.

Postman envelope

<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:platformCore="urn:core_2022_2.platform.webservices.netsuite.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:platformMsgs="urn:messages_2022_2.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>

    </soapenv:Header>
    <soapenv:Body>
        <search xmlns="urn:messages_2022_2.platform.webservices.netsuite.com">
            <searchRecord savedSearchId="****" xsi:type="q1:CustomerSearchAdvanced" xmlns:q1="urn:relationships_2022_2.lists.webservices.netsuite.com"/>
        </search>
    </soapenv:Body>
</soapenv:Envelope>

strong soap envelope

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>

  </soap:Header>
  <soap:Body>
    <ns1:search xmlns:ns1="urn:messages_2022_2.platform.webservices.netsuite.com">
      <ns1:searchRecord savedSearchID="****" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:q1="urn:relationships_2022_2.lists.webservices.netsuite.com" xsi:type="q1:CustomerAdvancedSearch"/>
    </ns1:search>
  </soap:Body>
</soap:Envelope>

1 Answers1

0

xsiType must be 'CustomerSearchAdvanced'

Not CustomerAdvancedSearch

I had it right in the postman envelope, wrong in the strong soap.