简体   繁体   中英

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));
    }
 }

use jar soapui-4.6.1.jar instead of soapui-4.0.1.0. you can download it from https://sourceforge.net/projects/soapui/

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:

在此处输入图片说明

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 ie, SOAPUI_HOME/bin/soapui-4.5.*.jar

在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM