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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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