ContributionsMost RecentMost LikesSolutionsunable to handle redirected wsdlsituation: JAXWS Webservice, deployed on WAS 7. Webservice points to packaged WSDL, thus when requesting the WSDL using: context-root/GetCustomerData?wsdl you will be redirected to : context-root/GetCustomerData/WEB-INF/wsdl/CustomerDataService.wsdl This redirect is automatically performed by WebSphere when you supply a location for your WSDL in your annotated service. Unfortunately, when using the first URL when loading a new soap project based on a WSDL, Soap UI (pro, 4.6.1) fails to load any .xsd references present in the WSDL, because it tries to resolve the xsd relative to entered url, instead of the url WebSphere redirects to. By entering the second url, it does work.Re: Script does not work in soapUI 4.5soapUI Pro 4.5.0, copyright (C) 2007-2012 smartbear.com http://www.soapui.org | http://smartbear.com Build [internal], Build Date 2012/03/26 16:19 If I execute your (robert) script in the project Save Script, I receive the following error: Fri May 11 08:10:31 CEST 2012:ERROR:An error occured [Cannot get property 'testSuite' on null object], see error log for details (Error log) Fri May 11 08:10:00 CEST 2012:ERROR:java.lang.NullPointerException: Cannot get property 'testSuite' on null object java.lang.NullPointerException: Cannot get property 'testSuite' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:156) at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at Script1.run(Script1.groovy:1) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89) at com.eviware.soapui.impl.wsdl.WsdlProject.runBeforeSaveScript(WsdlProject.java:1519) at com.eviware.soapui.impl.wsdl.WsdlProject.beforeSave(WsdlProject.java:911) at com.eviware.soapui.impl.wsdl.WsdlProjectPro.beforeSave(SourceFile:370) at com.eviware.soapui.impl.wsdl.WsdlProject.saveIn(WsdlProject.java:768) at com.eviware.soapui.impl.wsdl.WsdlProjectPro.saveIn(SourceFile:363) at com.eviware.soapui.impl.wsdl.WsdlProjectPro.save(SourceFile:438) at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectAction.perform(SaveProjectAction.java:42) at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectAction.perform(SaveProjectAction.java:28) at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:89) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Re: Complex project creates many unnecessary tmp filesJust a heads up, I also see this warning when saving non-composite projects.Re: Script does not work in soapUI 4.5it didn't help. After some testing with 4.5, it seems that every delete action results in this error. Reproduction: 1. create new project. (test) 2. add new project property (a) 3. delete property via the button that has as onmouseover "Removes the selected property from the property list" 4. check error log.Re: Project script library is not loadedand ${projectDir}\scripts? This is what we use (both for composite and non-composite projects) and it works on all systems we run soapUI on.Re: Script does not work in soapUI 4.5Thu Apr 12 13:57:22 CEST 2012:ERROR:java.lang.ArrayIndexOutOfBoundsException: -1 java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(Unknown Source) at java.util.ArrayList.remove(Unknown Source) at com.eviware.soapui.model.environment.EnvironmentImpl.removeProperty(SourceFile:320) at com.eviware.soapui.model.environment.EnvironmentImpl.removePropertyByName(SourceFile:351) at com.eviware.soapui.impl.wsdl.WsdlProjectPro$InternalTestPropertyListener.propertyRemoved(SourceFile:786) at com.eviware.soapui.impl.wsdl.support.XmlBeansPropertiesTestPropertyHolder.firePropertyRemoved(XmlBeansPropertiesTestPropertyHolder.java:136) at com.eviware.soapui.impl.wsdl.support.XmlBeansPropertiesTestPropertyHolder.removeProperty(XmlBeansPropertiesTestPropertyHolder.java:219) at com.eviware.soapui.impl.wsdl.AbstractTestPropertyHolderWsdlModelItem.removeProperty(AbstractTestPropertyHolderWsdlModelItem.java:124) at com.eviware.soapui.impl.wsdl.MutableTestPropertyHolder$removeProperty.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at Script1.removeProperties(Script1.groovy:37) ==> project.removeProperty(project.getPropertyAt(i).name); at Script1.run(Script1.groovy:27) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89) at com.eviware.soapui.impl.wsdl.WsdlProject.runBeforeSaveScript(WsdlProject.java:1519) at com.eviware.soapui.impl.wsdl.WsdlProject.beforeSave(WsdlProject.java:911) at com.eviware.soapui.impl.wsdl.WsdlProjectPro.beforeSave(SourceFile:370) at com.eviware.soapui.impl.wsdl.WsdlProject.saveIn(WsdlProject.java:768) at com.eviware.soapui.impl.wsdl.WsdlProjectPro.saveIn(SourceFile:363) at com.eviware.soapui.impl.wsdl.WsdlProjectPro.save(SourceFile:438) at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectAction.perform(SaveProjectAction.java:42) at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectAction.perform(SaveProjectAction.java:28) at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:89) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) On a side node, the log also shows the following error: Thu Apr 12 13:57:23 CEST 2012:WARN:Failed to delete temporary project file; C:\Workspace\Testen\###\soapUI\project-temp-3894800989267663626.xmlScript does not work in soapUI 4.5Hi, Since soapUI pro 3.6 we've used a groovy script in the project.save script to clean our properties from obsolete values. This script no longer works in soapUI pro 4.5 (tested in 4.0 and 3.6.1, and it works). Can you provide a solution for this problem? the script: removeProjectProperties(); for(testSuite in project.testSuites){ testSuite = project.getTestSuiteByName(testSuite.key); for(testCase in testSuite.testCases){ testCase = testSuite.getTestCaseByName(testCase.key); if(testSuite.name.startsWith("Blocks")){ //Blocks testsuites contain reusable testfunctions, all testcase properties within these testsuites can be emptied //clear testCase properties int count = testCase.getPropertyCount(); for(int i = 0; i < count; i++){ propertie = testCase.getPropertyAt(i); propertie.setValue(""); } } for(testStep in testCase.testSteps){ testStep = testCase.getTestStepByName(testStep.key); if(testStep.class.toString().equals("class com.eviware.soapui.impl.wsdl.teststeps.WsdlRunTestCaseTestStep")){ int count = testStep.getPropertyCount(); for(int i = 0; i < count; i++){ propertie = testStep.getPropertyAt(i); if(propertie.name.startsWith("out_")){ propertie.setValue(""); } } } } } } /* Remove old project properties: 1.i=0 and will remain so 2.project.getPropertyCount will return a lower value for every execution, (removeProperty) 3.Ultimately getPropertyCount will return 0, exiting the function */ void removeProjectProperties(){ for(int i = 0;i<project.getPropertyCount();i){ project.removeProperty(project.getPropertyAt(i).name); } } log.info "Project was cleared of obsolete data"; I get a java.lang.ArrayIndexOutOfBoundsExceptionRe: Default loading of properties and update definitions....project properties can be loaded as endpoints, by ${#Project#propertyname} Enter this as endpoint for a webservice (don't forget to add the property to the project). Below is a script to use at the "Load Script" on project level, it loads files from projectpath/settings. Syntax for the propertie filename = environment_tst.properties Syntax for the properties inside the file: endpoint=http://localhost:8080 import groovy.io.*; import groovy.swing.SwingBuilder; import javax.swing.*; //determine projectdir by project.getPath, because GroovyUtils.projectpath does not work at startup path = project.getPath(); log.info("path = " + path); s= System.getProperty("file.separator"); settingsPath = path+s; //settingsfiles are stored in projecpath\settings settingsPath += "settings" + s; //only works in versions > 4.0 because of SoapUI.isCommandline() if(com.eviware.soapui.SoapUI.SOAPUI_VERSION.toString().substring(0,1).toInteger() >= 4){ if(com.eviware.soapui.SoapUI.isCommandLine()){ setProperties("environment_default", settingsPath); }else{ openDialog(); } } //Method to set project properties void setProperties(name, location){ try{ //read properties file FileInputStream fstream = new FileInputStream(location + name + ".properties"); DataInputStream ins = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(ins)); String strLine; //set new properties while ((strLine = br.readLine()) != null) { attribute = strLine.split("="); project.setPropertyValue(attribute[0],attribute[1]); } ins.close(); }catch(Exception e){ log.info("No project-properties were set, could not find file for name: " + name + " and location: " + location); } } //Opens the swing dialog void openDialog(){ def swingBuilder = new SwingBuilder(); File[] listOfFiles = new File(settingsPath).listFiles(); int count, count2; def options = []; def browser = []; for (int i = 0; i < listOfFiles.length; i++) { if(listOfFiles[i].getName().contains("environment_")){ name = listOfFiles[i].getName().replace("environment_","").replace(".properties",""); options[count]=name; count++ } if(listOfFiles[i].getName().contains("browser_")){ name = listOfFiles[i].getName().replace("browser_","").replace(".properties",""); browser[count2]=name; count2++; } } def pane = swingBuilder.optionPane(message:'Environment', selectionValues:options, optionType:JOptionPane.CLOSED_OPTION); def dialog = pane.createDialog(null, 'Select an environment (' + project.name + ")"); dialog.show(); setProperties("environment_" + pane.getInputValue(), settingsPath); } Re: feedback betaHi, I don't see much of a problem, as long as you clearly log or show which environment set or endpoint was used for a testrun. The current situation is more confusing to me then it would be if if I had a environment button. regardsfeedback beta1. Help URL for enviroments tab on project is missing 2. TestSuites / testCases have a dropdown to switch environments, individual testSteps do not have this. (like the soaprequest teststep) It will be confusing for our users, i.e.: A testcase is run on the tst environment An individual testrequest is run in an attempt to reproduce and this uses the endpoint set for the specific webservice. (ont) 3. It would be nice to be able to run testSuites in debug modus. On a positive note: I'm absolutely thrilled about the environments addition, it'll save us a lot of time.