SoapUI API:WsdlProject 无法加载“复合”;项目

发布于 2024-11-07 15:50:24 字数 1299 浏览 2 评论 0原文

我们使用 SoapUI 的 API 在构建过程中运行自动测试。 我尝试将我们的项目更改为复合项目(这意味着它不是单个 XML 文件,而是带有子目录的目录)每个测试用例的目录)。从那时起,我在尝试加载项目时收到此错误:

Error at line 1, column 1
   org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
   at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
   at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276)
   at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
   at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
   at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(Unknown Source)
   at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:297)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:212)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:179)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:174)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:159)

这是我用来导致此异常的代码(摘录):

SoapUI.setSoapUICore(new StandaloneSoapUICore(true));
WsdlProject project = new WsdlProject(pathToProjectRoot);

有没有人经历过它并知道如何解决它?我在 Eviware 的论坛中没有找到任何关于此的说明。

We are using SoapUI's APIs for running automatic tests during our build.
I tried changing our project to be a composite project ( meaning it is not a single XML file but a Directory with a Sub-Directory per Test Case). Ever since that I'm receiving this error when trying to load the project:

Error at line 1, column 1
   org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
   at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
   at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276)
   at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
   at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
   at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(Unknown Source)
   at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:297)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:212)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:179)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:174)
   at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:159)

This is the code I use to cause this exception (excerpt):

SoapUI.setSoapUICore(new StandaloneSoapUICore(true));
WsdlProject project = new WsdlProject(pathToProjectRoot);

Has anyone experienced it and knows how to solve it? I did not find any indication about this in Eviware's forum.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

毁虫ゝ 2024-11-14 15:50:24

经过多次挫折后,我尝试了旧的试错方法 - 创建一个空项目并尝试加载它 - 即使失败了。

记得在不同的帖子上,我知道 SoapUI 有两个 Javadoc 部分 - < strong>常规Pro - 我检查了 Pro javadoc 获取线索。

我立即注意到有一个名为 < code>WsdlProjectPro 可以加载项目。
在我们的代码中,我们使用了以下内容:

project = new WsdlProject(pathToSoapUiProject);

将其更改为:

project = new WsdlProjectPro(pathToSoapUiProject);

立即解决了问题。

看来 Composite 项目是 Pro 独有的功能 - 因此只有 WsdlProjectPro 可以加载它。

After much frustration I tried the old trial and error approach - creating an empty project and trying to load it - even that failed.

After remembering that on a different post I got to know that SoapUI has two Javadoc sections - Regular and Pro - I checked the Pro javadoc for clues.

I immediately noticed that there is a class named WsdlProjectPro that can load a project.
In our code, we used the following:

project = new WsdlProject(pathToSoapUiProject);

Changing it to be:

project = new WsdlProjectPro(pathToSoapUiProject);

Solved the problem immediately.

It appears that the Composite project is a Pro only feature - so only the WsdlProjectPro can load it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文