New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrupted downloaded file #241
Comments
Thanks for reporting this. I can reproduce the issue. If you enable debug mode in Gradle, you can see that gradle-download-task sends a
According to this thread, other clients do not include the port in the host header (unless it is a non-default port, i.e. not 80 for HTTP and 443 for HTTPS), so gradle-download-task shouldn't do that either. I will fix this and get back to you. In the meantime you can specify the task downloadArubaPecEmailManagerWsdl(type: Download) {
src 'https://areaclienti.arubapec.it/arubapec/rpc/EmailManager?wsdl'
dest new File(buildDir, 'EmailManager.wsdl')
header "Host", "areaclienti.arubapec.it"
onlyIfModified true
} |
Thanks for the analysis and workaround. Well... you never stop learning... :-) |
I've fixed the issue and published a new version 5.1.2. Please test again. |
Version 5.1.2 works fine in this scenario, thank you very much! |
Describe the bug
When downloading a WSDL with this plugin, I get the contents of that WSDL different from the result I get if I download the file with a browser or with a simple Java script in JShell.
Consider the build script reported below and run:
gradle downloadArubaPecEmailManagerWsdl
.Then look at
build/EmailManager.wsdl
.After doing this, try to execute the following script in JShell:
Then, do a diff between the two files. There are two differences:
In particular, the file downloaded with this plugin shows an imported schema location with
http
scheme on port 443, instead ofhttps
. This makes a subsequent call to JAXB XJC fail when trying to retrieve the referred schema, because that URL is invalid.I'm pretty sure there's some flaky server-side processing here which is altering the WSDL output, however it must be due to some kind of unusual client behavior, because all my attempts to download that WSDL result in a correct
schemaLocation
being output (I even tried wget, curl, etc.).Sample build script
The text was updated successfully, but these errors were encountered: