Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
nlapiRequestURL response body format
Hi,
I am trying to make a web service call from a suitelet. I am using the nlapiRequestURL call which is getting a valid response. My problem is that the response.getBody() result does not maintain the soap XML format. The Element values are returned in a single string. I am doing the following:
var a = {};
a['Content-Type'] = 'text/xml;charset=UTF-8';
a['Content-Length'] = soap_request.length + '';
a['Accept-Encoding'] = 'gzip,deflate';
a['SOAPAction'] = 'login';
a['Host'] = 'webservices.netsuite.com';
var soap_request = "A well formed soap request";
var response = nlapiRequestURL('https://webservices.netsuite.com/services/NetSuitePort_2009_2', soap_request, a);
0