Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
Netsuite SOAP Webservice is returning -length of input buffer is smaller than amount requested error
When attempting to call a SOAP web service from oracle PLSQL and return the result in a XML Type variable
the following error occurs.
ERROR
-----------------------
ORA-22921: length of input buffer is smaller than amount requested
STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Use code below:
DBMS_OUTPUT.put_line('l_vendor_envelope =' || l_envelope);
BEGIN
l_xml := APEX_WEB_SERVICE.make_request(
p_url => 'https://'||x_netsuite_account||'.suitetalk.api.netsuite.com/services/NetSuitePort_2020_1',
p_action => 'search',
p_envelope => l_envelope
);
EXCEPTION WHEN OTHERS THEN
x_status := 'E';