无法从 java 读取复合项目文件,出现“意外元素:CDATA”错误。
WsdlTestCase testCase = new WsdlProject("src/test/resources/xml/SoapUI")
.getTestSuiteByName("TestSuite 1")
.getTestCaseByName("TestCase 1");
我也尝试使用 WsdlProjectPro 但收到错误
“java.lang.NoClassDefFoundError:com/eviware/soapui/impl/wsdl/WsdlProjectPro”
.
请注意:我已将 ReadyAPI_HOME/bin/ 和 READYAPI_HOME/lib 中的所有 Jar 添加到类路径中,但仍然出现此错误。有人可以帮忙吗。
使用此代码在 pom.xml 中添加 ReadyAPI_HOME jar
<plugin>
<groupId>com.googlecode.addjars-maven-plugin</groupId>
<artifactId>addjars-maven-plugin</artifactId>
<version>1.0.5</version>
<executions>
<execution>
<goals>
<goal>add-jars</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/lib</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>