SoapUI API:WsdlProject 无法加载“复合”;项目
我们使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过多次挫折后,我尝试了旧的试错方法 - 创建一个空项目并尝试加载它 - 即使失败了。
记得在不同的帖子上,我知道
SoapUI
有两个 Javadoc 部分 - < strong>常规 和 Pro - 我检查了 Pro javadoc 获取线索。我立即注意到有一个名为 < code>WsdlProjectPro 可以加载项目。
在我们的代码中,我们使用了以下内容:
将其更改为:
立即解决了问题。
看来 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:
Changing it to be:
Solved the problem immediately.
It appears that the Composite project is a Pro only feature - so only the
WsdlProjectPro
can load it.