Hi, can you share the entire java file that you used? Also, what version of the soapui jar are you using? I am trying to solve this exact same problem but there is no ProjectConfig.unsetLastOpened() method. I have tried the following two artifacts to no avail:
<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>4.6.1</version>
</dependency>
and
<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.0.0</version>
</dependency>
I am not sure what I am missing. Here is what I have so far:
package soapui.listeners.project;
import com.eviware.soapui.config.ProjectConfig;
import com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem;
import com.eviware.soapui.model.project.Project;
import com.eviware.soapui.model.support.ProjectListenerAdapter;
public class MyProjectListener extends ProjectListenerAdapter
{
@Override
public void beforeSave(Project project){
ProjectConfig pc = ((AbstractWsdlModelItem<ProjectConfig>) project).getConfig();
pc.unsetLastOpened(); //Compiler Error: "Method unsetLastOpened() is undefined for type..."
}
}
My first attempt at a listener for SoapUI so any help here would be greatly appreciated.
Thanks,
Jerry