SoapUI - 包含 xsd 的 wsdl 问题

发布于 2024-11-10 03:45:26 字数 2346 浏览 0 评论 0原文

我有一个包含 xsd 的静态 wsdl。 xsd 和 wsdl 位于同一 XML 命名空间中,因此包含 xsd。

<wsdl:types>
    <xsd:schema targetNamespace="http://www.mycompany.com/idm">
        <xsd:include schemaLocation="idm-web-service.xsd"/>
    </xsd:schema>
</wsdl:types>

当我尝试创建一个使用 thsi wsdl 的soapUI 项目时,我得到......

Fri May 27 08:59:24 GMT+10:00 2011:ERROR:org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
   org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
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 org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:722)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:107)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:526)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.selectDefinitionParts(SchemaUtils.java:556)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:538)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:515)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:221)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:140)
at java.lang.Thread.run(Unknown Source)
   Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
... 14 more

如果我更改 wsdl 并将整个架构粘贴到 wsdl:types 元素中,那么soapUI 处理 wsdl 没有问题。

这是 SoapUI 3.6.1

使用“包含”模式的 WSDL 的soapUI 是否存在一些问题???

I have a static wsdl that includes an xsd. The xsd and wsdl are in the same XML namespace hence the xsd include.

<wsdl:types>
    <xsd:schema targetNamespace="http://www.mycompany.com/idm">
        <xsd:include schemaLocation="idm-web-service.xsd"/>
    </xsd:schema>
</wsdl:types>

When I try to create a soapUI project consuming thsi wsdl I get....

Fri May 27 08:59:24 GMT+10:00 2011:ERROR:org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
   org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
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 org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:722)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:107)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:526)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.selectDefinitionParts(SchemaUtils.java:556)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:538)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:515)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:221)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:140)
at java.lang.Thread.run(Unknown Source)
   Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
... 14 more

If I change the wsdl and paste the entire schema inside the wsdl:types element, then soapUI handles the wsdl no problem.

This is SoapUI 3.6.1

Is there some issue with soapUI consuming a WSDL that "includes" a schema ???

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

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

发布评论

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

评论(1

沉睡月亮 2024-11-17 03:45:26

问题是soapui 不知道在哪里可以找到架构文件。

您的模式文件位于当前目录中,因此soapui将在调用它的目录中查找...

如果您将wsdl部署到服务器,它将返回要包含的xsd文件的url,并且soapui将能够找到它....

The issue is that soapui doesn't know where to find the schema file.

Your schema file is in the current directory, so soapui will be looking in the directory from where it was invoked....

If you wsdl is deployed to a server it will return a url of the xsd file to include and soapui will be able to find it....

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