[ https://issues.apache.org/jira/browse/CXF-8623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454105#comment-17454105 ]
Kevin Burnett commented on CXF-8623: ------------------------------------ [~ffang] not sure about all the full details, but we don't actually have the jar as a dependency per-se on our project. We mark it as a dependency via the pom, but it's "provided" by the OSGi target platform via the Tycho maven plugin. We also have our own XML config where we reference the XSD: {code:java} <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans classpath:META-INF/cxf/spring-beans.xsd http://cxf.apache.org/jaxrs classpath:META-INF/cxf/jaxrs.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <context:component-scan base-package="our.rest.package"/> <import resource="classpath:META-INF/cxf/cxf.xml"/> <!-- JAX-RS --> <jaxrs:server id="rest" address="/rs" basePackages="our.rest.package,com.fasterxml.jackson.jaxrs.json"/> </beans> {code} So, I suspect the error is in this file instead of in the cxf jars. Thanks for your feedback, and hopefully this helps. > XSD Not Served over HTTP > ------------------------ > > Key: CXF-8623 > URL: https://issues.apache.org/jira/browse/CXF-8623 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Reporter: Kevin Burnett > Priority: Major > > First of all, thanks for the work you do and making a tool that helps a lot > of people. I don't know if this issue is best served here, or should go to > the cxf.apache.org website managers. > Anyways, I'm loading a webservice module via OSGi and am receiving the > following error when loading the module: > org.xml.sax.SAXParseException; systemId: > [http://cxf.apache.org/schemas/jaxrs.xsd]; lineNumber: 1; columnNumber: 1; > Premature end of file. > > When I try to curl the XSD URL, I get nothing returned (however, I do get a > file returned when curling the HTTPS URL). As a comparison, when I curl the > Spring Beans XSD, > [http://www.springframework.org/schema/beans/spring-beans.xsd,] I do get back > a file. > > We just started seeing this today in our production environment, but I could > reproduce it locally when trying to start the module in OSGi. We hadn't made > any changes in our production environment other than restarting the OSGi > service. We discovered the fix was to download the JAX-RS XSD, reference it > from the class path directly, then update the schema imports in "jaxrs.xsd" > to be the following: > <xsd:import namespace="http://cxf.apache.org/configuration/beans" > schemaLocation="https://cxf.apache.org/schemas/configuration/cxf-beans.xsd"/> > <xsd:include > schemaLocation="https://cxf.apache.org/schemas/jaxrs-common.xsd"/> > > However, it would be nice to not have to make this change and allow the XSD, > though resolved to https, to still return the XML over http. -- This message was sent by Atlassian Jira (v8.20.1#820001)