Forum Discussion

dave1963's avatar
15 years ago

Error with wsdl that uses schema include

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 3.6.1 project that consumes this 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 XML schema inside the wsdl:types element, then soapUI handles the wsdl no problem.

Should this work IS soapUI meant to handle a wsdl with the xsd schema in a separate file but on the same directory as the wsdl ??

1 Reply

  • Hello,

    <xsd:include schemaLocation="idm-web-service.xsd"/>

    is a problem. You can not specify like this path to schema, this should be URI. From point of application this not means in same directory.
    Maybe it should be, and will be once you deploy ws :

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

    I mostly see like this.

    Hope this helps,
    robert