I'm trying to pull data about an inventory item. I have a PHP netsuite toolkit (https://github.com/iloveitaly/netsuite-kohana) using 2011.1 and I'm trying to use another toolkit to grab the same exact data.
The other toolkit (ruby netsuite gem) uses a more recent version of web services 2011.2. The SOAP calls made by the different toolkits are almost exactly the same:
PHPToolkit:
<?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:core_2011_1.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:messages_2011_1.platform.webservices.netsuite.com"> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com"> <Header> <passport actor="http://schemas.xmlsoap.org/soap/actor/next"> <email>email@domain.com</email> <password>password</password> <account>account_id</account> <role internalId="role_id" xsi:type="RecordRef"/> </passport> </Header> <Body> <get> <baseRef internalId="610" type="inventoryItem" xsi:type="RecordRef"/> </get> </Body> </Envelope>
Ruby Gem: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com"> <env:Header> <platformMsgs:passport> <platformCore:email>email@domain.com</platformCore:email> <platformCore:password>password</platformCore:password> <platformCore:account>account_id</platformCore:account> <platformCore:role internalId="role_id" xsi:type="platformCore:RecordRef"/> </platformMsgs:passport> </env:Header> <env:Body> <platformMsgs:get> <platformMsgs:baseRef xsi:type="platformCore:RecordRef" internalId="610" type="inventoryItem"/> </platformMsgs:get> </env:Body> </env:Envelope>
The 2011.1 PHP generated XML grabs the data fine. The 2011.2 ruby generated data fails with the following error: <?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:Header> <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com"> <platformMsgs:nsId>WEBSERVICES_738944_030820121932985021399826875_e5b8a86aea158</platformMsgs:nsId> </platformMsgs:documentInfo> </soapenv:Header> <soapenv:Body> <getResponse xmlns="urn:messages_2011_2.platform.webservices.netsuite.com"> <readResponse> <platformCore:status xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com" isSuccess="false"> <platformCore:statusDetail type="ERROR"> <platformCore:code>UNEXPECTED_ERROR</platformCore:code> <platformCore:message>An unexpected error occurred. Error ID: gzkdtzgukv6lc451l6v8</platformCore:message> </platformCore:statusDetail> </platformCore:status> </readResponse> </getResponse> </soapenv:Body> </soapenv:Envelope>
The strange this is, if I randomly pick inventory IDs from the ruby one some of the requests are successful. I've seen this unexpected issue before on the PHP side and it ended up being related to permissions. It doesn't make sense that the unexpected error is related to permissions this time around, unless the 2011.2 update changed the way permissions were handled, because both clients are using the same login.Any ideas? Is this a bug?