Contributions
Change Signature Algorithm from groovy script
I trying to change the Signature Algorithm for Outgoing WS-Security Configurations from the groovy script. Here is my code: import com.eviware.soapui.support.XmlHolder project = testRunner.testCase.testSuite.project WssC = project.getWssContainer(); outWss = WssC.getOutgoingWssByName('outCrypto') config = outWss.getConfig() configSignature = config.getEntryList()[0].getConfiguration() holder = new XmlHolder(configSignature) holder.setNodeValue('signatureAlgorithm','http://www.w3.org/2001/04/xmldsig-more#rsa-sha256') //holder.setNodeValue('signatureAlgorithm','http://www.w3.org/2000/09/xmldsig#rsa-sha1') holder.updateProperty(true) config.getEntryList()[0].setConfiguration(holder.getXmlObject()) config.set(config) outWss.updateConfig(config) WssC.resetConfig(WssC.getConfig()) After running the code, the signature does not change. In the WS-Security Configurations window still was an old algorithm, but when I save and reload the project the algorithm was changed according to what was in the script. How to change the algorithm so that the change is immediate?370Views0likes0CommentsHow to get xml request from mockService in grovy script in TestSuite
I have groovy script in test step, and MockOperation in MockService. How to get last request in script? Or other request which i can see in Message Viewer? I can't use SOAP Mock Response in my test case. Now I check only time of last mock request: def project = testRunner.testCase.testSuite.projectdef mock = testRunner.testCase.testSuite.project.mockServices["mock"] def service = mock.getMockOperationByName("service") def req = service.getLastMockResult()464Views0likes0Comments