Search code examples
javawsdlsoapuiclassnotfoundexception

java.lang.ClassNotFoundException: com.eviware.soapui.config.InvalidSecurityScanConfig


getting java.lang.ClassNotFoundException: com.eviware.soapui.config.InvalidSecurityScanConfig at

WsdlProject project = new WsdlProject();
All necessary jars(soapui-4.0.1.0.jar,soapui-xmlbeans-1.7.jar,wsdl4j.jar) are imported though it is giving error at runtime. what can be the reason behind it?

public class SOAPInputGenerator {

public static void main(String[] args) throws Exception {

    WsdlProject project = new WsdlProject();
    WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, "http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?WSDL");
    WsdlInterface wsdl = wsdls[0];
    for (Operation operation : wsdl.getOperationList()) {
        WsdlOperation wsdlOperation = (WsdlOperation) operation;
        System.out.println("OP:"+wsdlOperation.getName());
        System.out.println("Request:");
        System.out.println(wsdlOperation.createRequest(true));
        System.out.println("Response:");
        System.out.println(wsdlOperation.createResponse(true));
    }
 }

Solution

  • According this blog, the feature is available in SoapUI 4.x release.

    It is clear that you did not have the jar file in the class path.

    In SoapUI 4.0.1, the class file, com.eviware.soapui.config.InvalidSecurityScanConfig is available in different jar file, called SOAPUI_HOME/lib/soapui-xmlbeans-4.0.1.jar.

    Here you can see:

    enter image description here

    Also not sure where did you get soapui-xmlbeans-1.7.jar file, as I could not find it in the same version which you can see in the screen shot above.

    Later version of soapui, say 4.5 onwards, the same class is part of the core jar file i.e., SOAPUI_HOME/bin/soapui-4.5.*.jar

    enter image description here

    By the way, not sure(any constraints?) for using very old version.