You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Joanne Kubischta (Created) (JIRA)" <ji...@apache.org> on 2012/04/02 18:37:23 UTC
[jira] [Created] (CXF-4220) After loading XSDs from links in WADL,
JAX-RS get all for all resources fail with 400
After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
-------------------------------------------------------------------------------------
Key: CXF-4220
URL: https://issues.apache.org/jira/browse/CXF-4220
Project: CXF
Issue Type: Bug
Affects Versions: 2.5.2
Environment: Linux
Reporter: Joanne Kubischta
We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
@Override
protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
{
super.setSchemasLocations(bean, servletConfig);
// Set the WADL document location
if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
{
bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
}
}
In the web.xml of the user resource, the XSDs are referenced as follows -
<init-param>
<param-name>jaxrs.schemaLocations</param-name>
<param-value>
classpath:schemas/xml.xsd
classpath:schemas/atom.xsd
classpath:schemas/user.xsd
classpath:schemas/user-role.xsd
</param-value>
</init-param>
In the wadl file, the grammar section is as follows -
<grammars>
<include href="xml.xsd" />
<include href="atom.xsd" />
<include href="user.xsd" />
<include href="user-role.xsd" />
</grammars>
Here are the steps to reproduce the error -
1. Verify get all and get a single resource work for all resources including user.
2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
<grammars>
<include href="https://server:8443/api/rest/users//xml.xsd" />
<include href="https://server:8443/api/rest/users//atom.xsd" />
<include href="https://server:8443/api/rest/users//user.xsd" />
<include href="https://server:8443/api/rest/users//user-role.xsd" />
</grammars>
3. Repeat step 1. Result is good.
4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
5. Repeat step 1. Result is good.
6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
Below is an excerpt of how schema is referenced in the XSD -
<xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
<xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
7. Do a get all request using https://server:8443/api/rest/users and get the following error -
400: Bad Request
org.xml.sax.SAXParseException: Premature end of file.
8. Do a get all request to other resources and get the same 400.
9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4220) After loading XSDs from links in
WADL, JAX-RS get all for all resources fail with 400
Posted by "Sergey Beryozkin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245096#comment-13245096 ]
Sergey Beryozkin commented on CXF-4220:
---------------------------------------
r1308794 in 2.5.3-SNAPSHOT should fix it. Please verify.
The problem seemed to do with WADLGenerator creating bogus references for empty schemaLocations, now there are just ignored.
I also added a "jaxrs.docLocation" servlet parameter for you to avoid overriding the CXF servlet
> After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
> -------------------------------------------------------------------------------------
>
> Key: CXF-4220
> URL: https://issues.apache.org/jira/browse/CXF-4220
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.5.2
> Environment: Linux
> Reporter: Joanne Kubischta
> Assignee: Sergey Beryozkin
> Fix For: 2.5.3, 2.6
>
>
> We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
> @Override
> protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
> {
> super.setSchemasLocations(bean, servletConfig);
>
> // Set the WADL document location
> if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
> {
> bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
> }
> }
> In the web.xml of the user resource, the XSDs are referenced as follows -
> <init-param>
> <param-name>jaxrs.schemaLocations</param-name>
> <param-value>
> classpath:schemas/xml.xsd
> classpath:schemas/atom.xsd
> classpath:schemas/user.xsd
> classpath:schemas/user-role.xsd
> </param-value>
> </init-param>
> In the wadl file, the grammar section is as follows -
> <grammars>
> <include href="xml.xsd" />
> <include href="atom.xsd" />
> <include href="user.xsd" />
> <include href="user-role.xsd" />
> </grammars>
> Here are the steps to reproduce the error -
> 1. Verify get all and get a single resource work for all resources including user.
> 2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
> <grammars>
> <include href="https://server:8443/api/rest/users//xml.xsd" />
> <include href="https://server:8443/api/rest/users//atom.xsd" />
> <include href="https://server:8443/api/rest/users//user.xsd" />
> <include href="https://server:8443/api/rest/users//user-role.xsd" />
> </grammars>
> 3. Repeat step 1. Result is good.
> 4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
> 5. Repeat step 1. Result is good.
> 6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
> Below is an excerpt of how schema is referenced in the XSD -
> <xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
> <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
> 7. Do a get all request using https://server:8443/api/rest/users and get the following error -
> 400: Bad Request
> org.xml.sax.SAXParseException: Premature end of file.
> 8. Do a get all request to other resources and get the same 400.
> 9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CXF-4220) After loading XSDs from links in WADL,
JAX-RS get all for all resources fail with 400
Posted by "Joanne Kubischta (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joanne Kubischta closed CXF-4220.
---------------------------------
Resolution: Fixed
Verified problems are fixed.
> After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
> -------------------------------------------------------------------------------------
>
> Key: CXF-4220
> URL: https://issues.apache.org/jira/browse/CXF-4220
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.5.2
> Environment: Linux
> Reporter: Joanne Kubischta
> Assignee: Sergey Beryozkin
> Fix For: 2.5.3, 2.6
>
>
> We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
> @Override
> protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
> {
> super.setSchemasLocations(bean, servletConfig);
>
> // Set the WADL document location
> if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
> {
> bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
> }
> }
> In the web.xml of the user resource, the XSDs are referenced as follows -
> <init-param>
> <param-name>jaxrs.schemaLocations</param-name>
> <param-value>
> classpath:schemas/xml.xsd
> classpath:schemas/atom.xsd
> classpath:schemas/user.xsd
> classpath:schemas/user-role.xsd
> </param-value>
> </init-param>
> In the wadl file, the grammar section is as follows -
> <grammars>
> <include href="xml.xsd" />
> <include href="atom.xsd" />
> <include href="user.xsd" />
> <include href="user-role.xsd" />
> </grammars>
> Here are the steps to reproduce the error -
> 1. Verify get all and get a single resource work for all resources including user.
> 2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
> <grammars>
> <include href="https://server:8443/api/rest/users//xml.xsd" />
> <include href="https://server:8443/api/rest/users//atom.xsd" />
> <include href="https://server:8443/api/rest/users//user.xsd" />
> <include href="https://server:8443/api/rest/users//user-role.xsd" />
> </grammars>
> 3. Repeat step 1. Result is good.
> 4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
> 5. Repeat step 1. Result is good.
> 6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
> Below is an excerpt of how schema is referenced in the XSD -
> <xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
> <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
> 7. Do a get all request using https://server:8443/api/rest/users and get the following error -
> 400: Bad Request
> org.xml.sax.SAXParseException: Premature end of file.
> 8. Do a get all request to other resources and get the same 400.
> 9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4220) After loading XSDs from links in
WADL, JAX-RS get all for all resources fail with 400
Posted by "Joanne Kubischta (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246434#comment-13246434 ]
Joanne Kubischta commented on CXF-4220:
---------------------------------------
Thank you. I am eager to test the fix.
But I don't see this defect in the release notes in the latest build at http://repository.apache.org/snapshots/org/apache/cxf/apache-cxf/2.5.3-SNAPSHOT/apache-cxf-2.5.3-20120403.080549-37.zip
Also the timestamp of the latest build Tue Apr 03 09:15:57 UTC 2012 is ealier than your checkin.
> After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
> -------------------------------------------------------------------------------------
>
> Key: CXF-4220
> URL: https://issues.apache.org/jira/browse/CXF-4220
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.5.2
> Environment: Linux
> Reporter: Joanne Kubischta
> Assignee: Sergey Beryozkin
> Fix For: 2.5.3, 2.6
>
>
> We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
> @Override
> protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
> {
> super.setSchemasLocations(bean, servletConfig);
>
> // Set the WADL document location
> if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
> {
> bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
> }
> }
> In the web.xml of the user resource, the XSDs are referenced as follows -
> <init-param>
> <param-name>jaxrs.schemaLocations</param-name>
> <param-value>
> classpath:schemas/xml.xsd
> classpath:schemas/atom.xsd
> classpath:schemas/user.xsd
> classpath:schemas/user-role.xsd
> </param-value>
> </init-param>
> In the wadl file, the grammar section is as follows -
> <grammars>
> <include href="xml.xsd" />
> <include href="atom.xsd" />
> <include href="user.xsd" />
> <include href="user-role.xsd" />
> </grammars>
> Here are the steps to reproduce the error -
> 1. Verify get all and get a single resource work for all resources including user.
> 2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
> <grammars>
> <include href="https://server:8443/api/rest/users//xml.xsd" />
> <include href="https://server:8443/api/rest/users//atom.xsd" />
> <include href="https://server:8443/api/rest/users//user.xsd" />
> <include href="https://server:8443/api/rest/users//user-role.xsd" />
> </grammars>
> 3. Repeat step 1. Result is good.
> 4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
> 5. Repeat step 1. Result is good.
> 6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
> Below is an excerpt of how schema is referenced in the XSD -
> <xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
> <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
> 7. Do a get all request using https://server:8443/api/rest/users and get the following error -
> 400: Bad Request
> org.xml.sax.SAXParseException: Premature end of file.
> 8. Do a get all request to other resources and get the same 400.
> 9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4220) After loading XSDs from links in
WADL, JAX-RS get all for all resources fail with 400
Posted by "Sergey Beryozkin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246611#comment-13246611 ]
Sergey Beryozkin commented on CXF-4220:
---------------------------------------
The release notes will be updated in time for the release, after this JIRA gets resolved.
I've restarted the CXF-2.5-deploy at Jenkins
> After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
> -------------------------------------------------------------------------------------
>
> Key: CXF-4220
> URL: https://issues.apache.org/jira/browse/CXF-4220
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.5.2
> Environment: Linux
> Reporter: Joanne Kubischta
> Assignee: Sergey Beryozkin
> Fix For: 2.5.3, 2.6
>
>
> We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
> @Override
> protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
> {
> super.setSchemasLocations(bean, servletConfig);
>
> // Set the WADL document location
> if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
> {
> bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
> }
> }
> In the web.xml of the user resource, the XSDs are referenced as follows -
> <init-param>
> <param-name>jaxrs.schemaLocations</param-name>
> <param-value>
> classpath:schemas/xml.xsd
> classpath:schemas/atom.xsd
> classpath:schemas/user.xsd
> classpath:schemas/user-role.xsd
> </param-value>
> </init-param>
> In the wadl file, the grammar section is as follows -
> <grammars>
> <include href="xml.xsd" />
> <include href="atom.xsd" />
> <include href="user.xsd" />
> <include href="user-role.xsd" />
> </grammars>
> Here are the steps to reproduce the error -
> 1. Verify get all and get a single resource work for all resources including user.
> 2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
> <grammars>
> <include href="https://server:8443/api/rest/users//xml.xsd" />
> <include href="https://server:8443/api/rest/users//atom.xsd" />
> <include href="https://server:8443/api/rest/users//user.xsd" />
> <include href="https://server:8443/api/rest/users//user-role.xsd" />
> </grammars>
> 3. Repeat step 1. Result is good.
> 4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
> 5. Repeat step 1. Result is good.
> 6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
> Below is an excerpt of how schema is referenced in the XSD -
> <xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
> <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
> 7. Do a get all request using https://server:8443/api/rest/users and get the following error -
> 400: Bad Request
> org.xml.sax.SAXParseException: Premature end of file.
> 8. Do a get all request to other resources and get the same 400.
> 9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CXF-4220) After loading XSDs from
links in WADL, JAX-RS get all for all resources fail with 400
Posted by "Sergey Beryozkin (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245096#comment-13245096 ]
Sergey Beryozkin edited comment on CXF-4220 at 4/3/12 10:00 AM:
----------------------------------------------------------------
r1308794 in 2.5.3-SNAPSHOT should fix it. Please verify.
The problem seemed to do with WADLGenerator creating bogus references for empty schemaLocations, now the empty references are ignored.
I also added a "jaxrs.docLocation" servlet parameter for you to avoid overriding the CXF servlet
was (Author: sergey_beryozkin):
r1308794 in 2.5.3-SNAPSHOT should fix it. Please verify.
The problem seemed to do with WADLGenerator creating bogus references for empty schemaLocations, now there are just ignored.
I also added a "jaxrs.docLocation" servlet parameter for you to avoid overriding the CXF servlet
> After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
> -------------------------------------------------------------------------------------
>
> Key: CXF-4220
> URL: https://issues.apache.org/jira/browse/CXF-4220
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.5.2
> Environment: Linux
> Reporter: Joanne Kubischta
> Assignee: Sergey Beryozkin
> Fix For: 2.5.3, 2.6
>
>
> We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
> @Override
> protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
> {
> super.setSchemasLocations(bean, servletConfig);
>
> // Set the WADL document location
> if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
> {
> bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
> }
> }
> In the web.xml of the user resource, the XSDs are referenced as follows -
> <init-param>
> <param-name>jaxrs.schemaLocations</param-name>
> <param-value>
> classpath:schemas/xml.xsd
> classpath:schemas/atom.xsd
> classpath:schemas/user.xsd
> classpath:schemas/user-role.xsd
> </param-value>
> </init-param>
> In the wadl file, the grammar section is as follows -
> <grammars>
> <include href="xml.xsd" />
> <include href="atom.xsd" />
> <include href="user.xsd" />
> <include href="user-role.xsd" />
> </grammars>
> Here are the steps to reproduce the error -
> 1. Verify get all and get a single resource work for all resources including user.
> 2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
> <grammars>
> <include href="https://server:8443/api/rest/users//xml.xsd" />
> <include href="https://server:8443/api/rest/users//atom.xsd" />
> <include href="https://server:8443/api/rest/users//user.xsd" />
> <include href="https://server:8443/api/rest/users//user-role.xsd" />
> </grammars>
> 3. Repeat step 1. Result is good.
> 4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
> 5. Repeat step 1. Result is good.
> 6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
> Below is an excerpt of how schema is referenced in the XSD -
> <xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
> <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
> 7. Do a get all request using https://server:8443/api/rest/users and get the following error -
> 400: Bad Request
> org.xml.sax.SAXParseException: Premature end of file.
> 8. Do a get all request to other resources and get the same 400.
> 9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CXF-4220) After loading XSDs from links in WADL,
JAX-RS get all for all resources fail with 400
Posted by "Sergey Beryozkin (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin updated CXF-4220:
----------------------------------
Fix Version/s: 2.6
2.5.3
Assignee: Sergey Beryozkin
> After loading XSDs from links in WADL, JAX-RS get all for all resources fail with 400
> -------------------------------------------------------------------------------------
>
> Key: CXF-4220
> URL: https://issues.apache.org/jira/browse/CXF-4220
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.5.2
> Environment: Linux
> Reporter: Joanne Kubischta
> Assignee: Sergey Beryozkin
> Fix For: 2.5.3, 2.6
>
>
> We use a CustomCXFNonSpringJaxrsServlet with one overriding method in order to use our hand written WADL.
> @Override
> protected void setSchemasLocations(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
> {
> super.setSchemasLocations(bean, servletConfig);
>
> // Set the WADL document location
> if(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION) != null)
> {
> bean.setDocLocation(servletConfig.getInitParameter(JAXRSUtils.DOC_LOCATION));
> }
> }
> In the web.xml of the user resource, the XSDs are referenced as follows -
> <init-param>
> <param-name>jaxrs.schemaLocations</param-name>
> <param-value>
> classpath:schemas/xml.xsd
> classpath:schemas/atom.xsd
> classpath:schemas/user.xsd
> classpath:schemas/user-role.xsd
> </param-value>
> </init-param>
> In the wadl file, the grammar section is as follows -
> <grammars>
> <include href="xml.xsd" />
> <include href="atom.xsd" />
> <include href="user.xsd" />
> <include href="user-role.xsd" />
> </grammars>
> Here are the steps to reproduce the error -
> 1. Verify get all and get a single resource work for all resources including user.
> 2. Access user wadl from https://server:port/api/rest/users?_wadl successfully but the grammar section is changed to -
> <grammars>
> <include href="https://server:8443/api/rest/users//xml.xsd" />
> <include href="https://server:8443/api/rest/users//atom.xsd" />
> <include href="https://server:8443/api/rest/users//user.xsd" />
> <include href="https://server:8443/api/rest/users//user-role.xsd" />
> </grammars>
> 3. Repeat step 1. Result is good.
> 4. Click the first link and view xml.xsd from a browser. Note xml.xsd is availale from the internet and does not have a schemaLocation tag.
> 5. Repeat step 1. Result is good.
> 6. Click the link to atom.xsd or any of rest of the links and the XSD loads correctly. Note all those XSDs are only available in the classpath of user.war.
> Below is an excerpt of how schema is referenced in the XSD -
> <xs:import namespace="urn:api:rest:user-role" schemaLocation="https://server:8443/api/rest/users//" />
> <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="https://server:8443/api/rest/users//" />
> 7. Do a get all request using https://server:8443/api/rest/users and get the following error -
> 400: Bad Request
> org.xml.sax.SAXParseException: Premature end of file.
> 8. Do a get all request to other resources and get the same 400.
> 9. Restart JBoss and problem goes away.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira