InvokeURL showing Internal Exception on the URL line
Hi Everyone
trying to use InvokeURL to hit an API to create a new order in our ERP system
got all my params set up in a Map and my header set up in Map,
but its not even giving me errors in failures from the API, its telling me
So is it not even able to execute the attempt?
Heres the code, ull see alot of notes where i was trying to add more possible headers thinking it wanted more info, but in the end, the only ones active are what is required.
- // Create a map that holds the values of the new order that needs to be created
- OrderInfo = Map();
- OrderInfo.put("SALFCY","W01");
- OrderInfo.put("ZSALFCY","Corporate Warehouse");
- //i added above
- OrderInfo.put("SOHTYP","SAM");
- OrderInfo.put("STOFCY","W81");
- //i added above
- OrderInfo.put("SOHNUM","");
- OrderInfo.put("CUSORDREF","ZOHO_TEST");
- OrderInfo.put("ORDDAT","20211111");
- OrderInfo.put("CUR","USD");
- OrderInfo.put("BPCORD","CUS002");
- OrderInfo.put("ZORDACTION","3");
- OrderInfo.put("BPAADD","DS");
- OrderInfo.put("BPDNAM","Leonard Skinner III");
- OrderInfo.put("DEMDLVDAT","20211111");
- OrderInfo.put("ZCNCLDAT","20211111");
- OrderInfo.put("MDL","US-FC");
- OrderInfo.put("BPTNUM","USPS");
- OrderInfo.put("XX4S_UDF3","123");
- OrderInfo.put("XX4S_UDF1","EMAIL ADDRESS");
- OrderInfo.put("XX4S_UDF2","9092394238");
- OrderInfo.put("BPRNAM","Leonard Skinner III");
- //i added above
- OrderInfo.put("BPAADDLIG","1 wood rd");
- //i added above
- OrderInfo.put("CRY","US");
- OrderInfo.put("POSCOD","92336");
- OrderInfo.put("CTY","Fontana");
- OrderInfo.put("SAT","CA");
- OrderInfo.put("SHO","Freight amt");
- OrderInfo.put("INVDTAAMT","6.99");
- OrderInfo.put("ITMREF","EOD1-1003-CO5");
- OrderInfo.put("QTY","1");
- OrderInfo.put("GROPRI","0.99");
- //
- //make header data
- header_data = Map();
- //header_data.put("callContext","wss:CAdxCallContext");
- header_data.put("requestConfig","adxwss.trace.on=off&adxwss.beautify=true&adxwss.optreturn=XML");
- //older: adxwss.trace.on=on&adxwss.trace.size=16384&adonix.trace.on=on&adonix.trace.level=3&adonix.trace.size=8
- //newer: adxwss.trace.on=off&adxwss.beautify=true&adxwss.optreturn=XML
- //i added above
- header_data.put("codeLang","ENG");
- //changed from "ZSOHWEB"
- //header_data.put("codeUser", "XTEST");
- //header_data.put("password", "");
- //i added above
- header_data.put("soapAction","save");
- //i added above
- header_data.put("poolAlias","EDICIOT");
- header_data.put("poolId","EDICIOT");
- //i added above
- header_data.put("publicName","ZSOHWEB");
- header_data.put("Authorization","Basic eHRlc3Q6eHRlc3Q=");
- header_data.put("Content-Type","application/xml");
- //maybe change to "application/x-www-form-urlencoded"?
- // Supply the URL and parameters to the invoke URL task
- info header_data;
- info OrderInfo;
- auth_url = "URL HIDDEN";
- Export = invokeurl
- [
- url :auth_url
- type :POST
- headers:header_data
- detailed:true
- files:OrderInfo
- ];
- info Export;