Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1744D175DB for ; Wed, 6 May 2015 14:47:00 +0000 (UTC) Received: (qmail 44408 invoked by uid 500); 6 May 2015 14:47:00 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 44383 invoked by uid 500); 6 May 2015 14:47:00 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 44371 invoked by uid 99); 6 May 2015 14:46:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 14:46:59 +0000 Date: Wed, 6 May 2015 14:46:59 +0000 (UTC) From: "Tomas Hofman (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6392) Chema imports are not handled correctly in generated WSDL and XSD files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tomas Hofman updated CXF-6392: ------------------------------ Description: 1) XSD files cannot be accessed by URLs that should be enabled by XML catalog rules. 2) Under some circumstances, schema location attributes in elements are not rewritten to "?xsd=location" form *Situation:* - We have following rule in jax-ws-catalog.xml: {code} {code} - We have WSDL file importing an XSD file, which in turn is including another XSD file, all located in /wsdl/ directory on classpath: {code} /wsdl/service.wsdl /wsdl/schemata/schema.xsd /wsdl/schemata/included_schema.xsd {code} - WSDL file contains import like this, with *relative path*: {code} {code} - schema.xsd file contains following include, again with relative path: {code} {code} *Problem 1:* XSD file cannot be accessed by URL http://localhost:PORT/SoapContext/SoapPort?xsd=http://apache.org/hello_world/types2/schema.xsd, which is supposed to be working due to rewriteSystem rule. It can only be accessed with relative path URL: "?xsd=schemata/schema.xsd". This (meaning the first URL http://localhost:PORT/SoapContext/SoapPort?xsd=http://apache.org/hello_world/types2/schema.xsd) starts working when import in WSDL file is modified to use full URL instead of relative path: {code} {code} *Problem 2:* When schema.xsd is accessed by request using full url like "?xsd=http://apache.org/hello_world/types2/schema.xsd", instead of relative url, schemaLocation attribute in and elements in that file are not rewritten into "?xsd=..." form, so those schemaLocations cannot be followed by client. I'm attaching also a PR with a test case demonstrating described behaviour, and proposed fix. was: 1) XSD files cannot be accessed by URLs that should be enabled by XML catalog rules. 2) Under some circumstances, schema location attributes in elements are not rewritten to "?xsd=location" form *Situation:* - We have following rule in jax-ws-catalog.xml: {code} {code} - We have WSDL file importing an XSD file, which in turn is including another XSD file, all located in /wsdl/ directory on classpath: {code} /wsdl/service.wsdl /wsdl/schemata/schema.xsd /wsdl/schemata/included_schema.xsd {code} - WSDL file contains import like this, with *relative path*: {code} {code} - schema.xsd file contains following include, again with relative path: {code} {code} *Problem 1:* XSD file cannot be accessed by URL http://localhost:PORT/SoapContext/SoapPort?xsd=http://apache.org/hello_world/types2/schema.xsd, which is supposed to be working due to rewriteSystem rule. It can only be accessed with relative path URL: "?xsd=schemata/schema.xsd". This starts working when import in WSDL file is modified to use full URL instead of relative path: {code} {code} *Problem 2:* When schema.xsd is accessed by request using full url like "?xsd=http://apache.org/hello_world/types2/schema.xsd", instead of relative url, schemaLocation attribute in and elements in that file are not rewritten into "?xsd=..." form, so those schemaLocations cannot be followed by client. I'm attaching also a PR with a test case demonstrating described behaviour, and proposed fix. Summary: Chema imports are not handled correctly in generated WSDL and XSD files (was: Chema imports are still not handled correctly in generated WSDL and XSD files) > Chema imports are not handled correctly in generated WSDL and XSD files > ----------------------------------------------------------------------- > > Key: CXF-6392 > URL: https://issues.apache.org/jira/browse/CXF-6392 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Reporter: Tomas Hofman > > 1) XSD files cannot be accessed by URLs that should be enabled by XML catalog rules. > 2) Under some circumstances, schema location attributes in elements are not rewritten to "?xsd=location" form > *Situation:* > - We have following rule in jax-ws-catalog.xml: > {code} > > {code} > - We have WSDL file importing an XSD file, which in turn is including another XSD file, all located in /wsdl/ directory on classpath: > {code} > /wsdl/service.wsdl > /wsdl/schemata/schema.xsd > /wsdl/schemata/included_schema.xsd > {code} > - WSDL file contains import like this, with *relative path*: > {code} > schemaLocation="schemata/schema.xsd"/> > {code} > - schema.xsd file contains following include, again with relative path: > {code} > > {code} > *Problem 1:* > XSD file cannot be accessed by URL http://localhost:PORT/SoapContext/SoapPort?xsd=http://apache.org/hello_world/types2/schema.xsd, which is supposed to be working due to rewriteSystem rule. > It can only be accessed with relative path URL: "?xsd=schemata/schema.xsd". > This (meaning the first URL http://localhost:PORT/SoapContext/SoapPort?xsd=http://apache.org/hello_world/types2/schema.xsd) starts working when import in WSDL file is modified to use full URL instead of relative path: > {code} > schemaLocation="http://apache.org/hello_world/types2/schema.xsd"/> > {code} > *Problem 2:* > When schema.xsd is accessed by request using full url like "?xsd=http://apache.org/hello_world/types2/schema.xsd", instead of relative url, schemaLocation attribute in and elements in that file are not rewritten into "?xsd=..." form, so those schemaLocations cannot be followed by client. > I'm attaching also a PR with a test case demonstrating described behaviour, and proposed fix. -- This message was sent by Atlassian JIRA (v6.3.4#6332)