-
Notifications
You must be signed in to change notification settings - Fork 86
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
Change in w3.org XML schema files locations to https means cannot compile ONVIF WSDL via Apache CXF #381
Comments
I ran into a similar issue with gSOAP's This seems to be an Apache CXF problem that should be addressed there. |
Hi @steven93921 , I believe that the "root" cause is actually with www.w3.org in doing the re-direct from well known http to https, but is it a question of what the the "easiest" way to resolve out of:
I raised (4) here as I thought this is path of least resistence and should have no impact on any consumers, as schemaLocation directive already allow for clear separation of name space from URI (location). Suspect that I will just need to raise issue across all 4 possible solutions and see how things pan out. Right now I am having to workaround this by doing download/patch which make generation of Java code convoluted and fragile (as patching is prone to failure on change and doing a "sed" as alternate is potentially dangerous. EDIT: Issue has already been raised on CXF (in 2022...) : https://issues.apache.org/jira/browse/CXF-8760?jql=text%20~%20%22www.w3.org%20redirect%22 , nothing happening quickly over there ;-) |
Close as related PR has been approved |
Issue
Many of the included XML Schema files used within ONVIF WSDL definition have moved from http to https locations.
The result is that when trying to compile into Java code using Apache CXF 3.x & 4.x there is redirection from http to https location which result in Apache Xerces XML Parser failing with "premature-end-file" error:
Workaround is to copy ONVIF and related schema files to disk and patch these to load from file system rather than directly from source.
Can ONVIF specification be updated to use https locations directly to avoid re-direct failures ?
There are two different failure scenarios:
So need to review the various XML schema files and update to https for one that are no longer served as http
Diagnosis
To test source of error I created the following trivial Java program to parse the XML file: https://github.com/zebity/onvif-relay/blob/main/onvif-cxf-relay/src/test/java/test_xerces/TestXerces.java
When run with:
Other files with redirection issues include:
The text was updated successfully, but these errors were encountered: