I have a suitelet that post an xml to a php page.
It is supposed to return an xml.
I am getting back this xml and I can see it in the page.
response.write( httpResponse.getBody() );
But the getBody function is returning null.
httpResponse.getBody()
Am I doing anything wrong here?
Thanks!
var urlString = "http://...xxx.aspx"; var postXML = createPOXMLxxx(); nlapiLogExecution('DEBUG', "postXML ", postXML); var headerParams = new Array(); headerParams['Content-type'] = "text/xml; charset=UTF-8"; var httpResponse = nlapiRequestURL(urlString, postXML, headerParams, "POST"); var xmlResponse = nlapiStringToXML(httpResponse.getBody()); var strResponse = nlapiXMLToString(xmlResponse); nlapiLogExecution('DEBUG',"xmlResponse = "+xmlResponse); nlapiLogExecution('DEBUG',"strResponse = "+strResponse); nlapiLogExecution('DEBUG',"httpResponse = "+httpResponse); nlapiLogExecution('DEBUG',"error = "+httpResponse.getError()); nlapiLogExecution('DEBUG',"httpResponse code= "+httpResponse.getCode()); nlapiLogExecution('DEBUG',"httpResponse body= "+httpResponse.getBody()); //GET PRICE FROM THE RESPONSE XML var success = strResponse.indexOf("<OK>") nlapiLogExecution('DEBUG',' success = '+success); response.write( httpResponse.getBody() );