bjornvester / xjc-gradle-plugin

A Gradle plugin for running the XJC binding compiler to generate JAXB Java source code from XSD schemas
MIT License
59 stars 10 forks source link

Fatal Premature EOF Error when loading SOAP Envelop XSD #25

Closed nc-cbm closed 2 years ago

nc-cbm commented 2 years ago

When I use the plugin to parse https://schemas.xmlsoap.org/soap/envelope/

I get the following error: Caught fatal error exception from XJC org.xml.sax.SAXParseException; systemId: http://schemas.xmlsoap.org/soap/envelope/; lineNumber: 1; columnNumber: 1; Premature end of file.

It was working before, anyone know what is going on here, or how to resolve the issue?

nc-cbm commented 2 years ago

I have resolved the issue, I will run though the diagnostic here and close, however it may be something that a small minor improvement to the plugin could resolve. I noticed that https://schemas.xmlsoap.org/soap/envelope (without the last dash) redirected to https://schemasxmlsoap.azurewebsites.net/soap/envelope/?WSDL

So I changed the import link in my XSD from https://schemas.xmlsoap.org/soap/envelope/ to https://schemasxmlsoap.azurewebsites.net/soap/envelope/?WSDL and then it worked.