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 6F17518C5F for ; Tue, 19 May 2015 15:10:04 +0000 (UTC) Received: (qmail 67598 invoked by uid 500); 19 May 2015 15:10:04 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 67565 invoked by uid 500); 19 May 2015 15:10:04 -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 67554 invoked by uid 99); 19 May 2015 15:10:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2015 15:10:04 +0000 Date: Tue, 19 May 2015 15:10:04 +0000 (UTC) From: "Jader da Silva Santos (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6413) WSDL Import SchemaLocation Error on Relative Path 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-6413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jader da Silva Santos updated CXF-6413: --------------------------------------- Description: When importing multiple levels of XSDs in a WSDL, the schemaLocation attribute produces an error in the translated URL. Folder Structure: wsdl --|------UserService.wsdl schema --------- type ------------|------user ------------|--------------user.xsd ------------|------phone ------------|-------------phone.xsd ----------xsd -------------------UserService.xsd ---------------------------------------------------------------------------------------------- UserService.wsdl ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- UserService.xsd ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- user.xsd ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- phone.xsd ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- Error: When running on started server, the schemaLocation attribute in UserService.xsd don't resolve the absolute path, causing error. WSDLGetUtils.java In 2.7.7 version of CXF library, mapUri() method resolves correctly. protected String mapUri(String base, Map smp, String loc) throws UnsupportedEncodingException { SchemaReference ref = (SchemaReference) smp.get(URLDecoder.decode(loc, "utf-8")); if (ref != null) { return new StringBuilder().append(base).append("?xsd=") .append(ref.getSchemaLocationURI().replace(" ", "%20")).toString(); } return null; } After 2.7.7 version, for example 3.1.0 version, mapUri() was changed. The "loc" parameter is changed in this line "key = new URI(xsd).resolve(loc).toString();". After that change, the imported XSD is not found on the map "SchemaReference ref = (SchemaReference)smp.get(URLDecoder.decode(key, "utf-8"));". This error is blocking WSDL first aproach development using JBoss AS and JAX-WS. was: When importing multiple levels of XSDs in a WSDL, the schemaLocation attribute produces an error in the translated URL. Folder Structure: wsdl ---------UserService.wsdl schema --------- type -------------------user ---------------------------user.xsd -------------------phone --------------------------phone.xsd ----------xsd -------------------UserService.xsd ---------------------------------------------------------------------------------------------- UserService.wsdl ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- UserService.xsd ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- user.xsd ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- phone.xsd ---------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- Error: When running on started server, the schemaLocation attribute in UserService.xsd don't resolve the absolute path, causing error. WSDLGetUtils.java In 2.7.7 version of CXF library, mapUri() method resolves correctly. protected String mapUri(String base, Map smp, String loc) throws UnsupportedEncodingException { SchemaReference ref = (SchemaReference) smp.get(URLDecoder.decode(loc, "utf-8")); if (ref != null) { return new StringBuilder().append(base).append("?xsd=") .append(ref.getSchemaLocationURI().replace(" ", "%20")).toString(); } return null; } After 2.7.7 version, for example 3.1.0 version, mapUri() was changed. The "loc" parameter is changed in this line "key = new URI(xsd).resolve(loc).toString();". After that change, the imported XSD is not found on the map "SchemaReference ref = (SchemaReference)smp.get(URLDecoder.decode(key, "utf-8"));". This error is blocking WSDL first aproach development using JBoss AS and JAX-WS. > WSDL Import SchemaLocation Error on Relative Path > ------------------------------------------------- > > Key: CXF-6413 > URL: https://issues.apache.org/jira/browse/CXF-6413 > Project: CXF > Issue Type: Bug > Components: Core > Affects Versions: 2.7.11, 2.7.13, 3.1.0 > Environment: Wildfly 8.1; Windows 7 > Reporter: Jader da Silva Santos > > When importing multiple levels of XSDs in a WSDL, the schemaLocation attribute produces an error in the translated URL. > Folder Structure: > wsdl > --|------UserService.wsdl > schema > --------- type > ------------|------user > ------------|--------------user.xsd > ------------|------phone > ------------|-------------phone.xsd > ----------xsd > -------------------UserService.xsd > ---------------------------------------------------------------------------------------------- > UserService.wsdl > ---------------------------------------------------------------------------------------------- > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://test.com.br/integration/services/user" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" > xmlns:sch="http://test.com.br/integration/schema" > name="UserServiceService" targetNamespace="http://test.com.br/integration/services/user"> > > > > > > > > > > > > > > > > > > > transport="http://schemas.xmlsoap.org/soap/http" /> > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------------------------------- > ---------------------------------------------------------------------------------------------- > UserService.xsd > ---------------------------------------------------------------------------------------------- > > xmlns:tns="http://test.com.br/integration/schema" xmlns:ns2="http://test.com.br/integration/schema/user" > elementFormDefault="unqualified" targetNamespace="http://test.com.br/integration/schema" > version="1.0"> > > > > > > > > > > > > > > > ---------------------------------------------------------------------------------------------- > ---------------------------------------------------------------------------------------------- > user.xsd > ---------------------------------------------------------------------------------------------- > > xmlns:ns1="http://test.com.br/integration/schema/phone" > targetNamespace="http://test.com.br/integration/schema/user" version="1.0"> > > > > > > > > > > ---------------------------------------------------------------------------------------------- > ---------------------------------------------------------------------------------------------- > phone.xsd > ---------------------------------------------------------------------------------------------- > > targetNamespace="http://test.com.br/integration/schema/phone" version="1.0"> > > > > > > > > > ---------------------------------------------------------------------------------------------- > Error: > When running on started server, the schemaLocation attribute in UserService.xsd don't resolve the absolute path, causing error. > WSDLGetUtils.java > In 2.7.7 version of CXF library, mapUri() method resolves correctly. > protected String mapUri(String base, Map smp, String loc) > throws UnsupportedEncodingException { > SchemaReference ref = (SchemaReference) smp.get(URLDecoder.decode(loc, "utf-8")); > if (ref != null) { > return new StringBuilder().append(base).append("?xsd=") > .append(ref.getSchemaLocationURI().replace(" ", "%20")).toString(); > } > return null; > } > After 2.7.7 version, for example 3.1.0 version, mapUri() was changed. The "loc" parameter is changed in this line "key = new URI(xsd).resolve(loc).toString();". After that change, the imported XSD is not found on the map "SchemaReference ref = (SchemaReference)smp.get(URLDecoder.decode(key, "utf-8"));". > This error is blocking WSDL first aproach development using JBoss AS and JAX-WS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)