Contributions
Encryption with "CryptoJS" in SoapUI
Hello everybody. I need to send a request in JSON to a web service that must check the authorization. In the encryption is used "CryptoJS". I have already donwloaded the library, its path is (I have attached an image with the path): C:\Program Files\SmartBear\SoapUI-5.2.1\bin\ext and it is well taken by Soap UI. But when I execute the groovy script I got this error: "groovy.lang.MissingPropertyException: No such property: CryptoJS for class: Script1" Any idea of why is it? please. That is my code (I have attached it too): import components.*; import rollups.*; def client = 'IMS'; def key = 'DWDAWAFFAFACSCPisDJSAD'; def secret = 'A93reRTUJHsCuQSHR+L3GxqOJyDmQpCgps102ciuabc='; def base64Secret = CryptoJS.enc.Hex.stringify(secret); def rawSignature = client+ key +b64BodyContent; def decoded_secret = CryptoJS.enc.Base64.parse(secret); // Generate HMAC SHA256 signature def hash = CryptoJS.HmacSHA256(rawSignature,decoded_secret); def base64hash = hash.toString(CryptoJS.enc.Base64); def auth = "amx "+ client+":"+base64hash; //testRunner.testCase.testSuite.setPropertyValue( "OdometerUnit", value ) testRunner.setPropertyValue( "authorization", auth ) Thanks a lot in advanceSolved7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.2KViews0likes2CommentsRe: Outbounde Exception the second time that I try to read an Excel with SoapUI
Hello again. Really, I would not need anything of xml, it is just the code that I found for reading datas from an Excel. Now I got this new one that is better. I need this because I should send messagesof vehicles that has some of their fields with just some allowed values, for example, odometer unit: Milles, Hours or Kilometres. Then, I would like to put all those values in an excel and take them for each message (I should send the same number of messages as possible values). Thanks you and best regards.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes1CommentRe: Outbounde Exception the second time that I try to read an Excel with SoapUI
The idea would be to take the datas from the excel in order to put it as the values of different fields for a testing of "allowed values". I'm looking for a way to do that and I found this code. Thanks in advance.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes1CommentRe: Outbounde Exception the second time that I try to read an Excel with SoapUI
Thanks for your answer. I'm trying to read the datas from an excel. I have tried with this code that I found in Internet, but it is quite strange, because when I execute it for the first time, it works fine, but the second time, I get the error and the creation of the 'getWorkbook' line. However, if I add another row or column to the excel, it works again the first time but in the second fails again. I have attached the code and the excel (97), I hope it is going to help. Thanks a lot again.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes1CommentOutbounde Exception the second time that I try to read an Excel with SoapUI
Hello everybody. I'm trying to read the datas of an excel with the objects wb = Workbook.getWorkbook(new File('C:/Users/Franciscog/Desktop/papageno1.xls')) It works fine the first time that I use, but the second time, I get this message: java.lang.ArrayIndexOutOfBound.Exception:0error at line: 12 I have to add new rows and columns to the excel in order to make it works again. Any idea of why is it? Thanks a lot in advanceSolved7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.1KViews0likes10Comments