soapUI - issue with wsdl that includes xsd

落爺英雄遲暮 提交于 2020-12-30 08:27:25

问题


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 ???


回答1:


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....



来源:https://stackoverflow.com/questions/6146267/soapui-issue-with-wsdl-that-includes-xsd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!