I'm probably missing something completely obvious, but has anyone successfully used ColdFusion to make calls to the web service? I'm writing a demo app, and have tried to no avail to maintain a session. For example, all of my attempts to call the get method fail with:
com.netledger.dto.v1_3.faults.InvalidSessionFault: Your connection has timed out. Please log in again.
Actual login info in the passport object has been changed, of course.
<cfscript> cfcutil = createobject("component","cfide.components.util"); ws = CreateObject("webservice", "https://webservices.netsuite.com/wsdl/v1_3_1/netsuite.wsdl"); ws.setMaintainSession(true); ws.setTimeout(1000 * 60 * 60 * 2); passport = structNew(); passport.email = "email@hellothere.com"; passport.password = "1234passwww"; passport.account = "123455"; ws.login(passport); // Create the array for cookies to send back in subsequent requests to the remote server. sessionCookies = CreateObject("java", "java.util.Vector"); call = ws._getCall(); messageContext = call.getMessageContext(); returnedCookies = messageContext.getProperty("Cookie"); // copy all of the cookies returned from the remote server to the cookies to be sent in subsequent web service method calls for (i=1; i lte ArrayLen(returnedCookies); i=i+1) { sessionCookies.add(returnedCookies[i]); } ws._setProperty("Cookie", sessionCookies); RecordType = CreateObject("java", "com.netsuite.webservices.platform.core_1_3.types.RecordType"); RecordRef = CreateObject("java", "com.netsuite.webservices.platform.core_1_3.RecordRef"); RecordRef.setInternalId("14"); RecordRef.setType(RecordType["employee"]); ws.get(RecordRef); </cfscript>