Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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);