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 9C56218BB0 for ; Tue, 19 May 2015 14:50:00 +0000 (UTC) Received: (qmail 9651 invoked by uid 500); 19 May 2015 14:50:00 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 9618 invoked by uid 500); 19 May 2015 14:50: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 9604 invoked by uid 99); 19 May 2015 14:50:00 -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 14:50:00 +0000 Date: Tue, 19 May 2015 14:50:00 +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: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6413?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Jader da Silva Santos updated CXF-6413: --------------------------------------- Description:=20 When importing multiple levels of XSDs in a WSDL, the schemaLocation attrib= ute 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 ---------------------------------------------------------------------------= ------------------- =09 =09=09 =09=09=09 =09=09 =09 =09 =09=09 =09 =09 =09=09 =09 =09 =09=09 =09=09=09 =09=09=09 =09=09 =09 =09 =09=09 =09=09 =09=09=09 =09=09=09 =09=09=09=09 =09=09=09 =09=09=09 =09=09=09=09 =09=09=09 =09=09 =09 =09 =09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- ---------------------------------------------------------------------------= ------------------- UserService.xsd ---------------------------------------------------------------------------= ------------------- =09 =09 =09 =09 =09=09 =09=09=09 =09=09 =09 =09 =09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- ---------------------------------------------------------------------------= ------------------- user.xsd ---------------------------------------------------------------------------= ------------------- =09 =09 =09=09 =09=09=09 =09=09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- ---------------------------------------------------------------------------= ------------------- phone.xsd ---------------------------------------------------------------------------= ------------------- =09 =09=09 =09=09=09 =09=09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- Error: When running on started server, the schemaLocation attribute in UserService= .xsd don't resolve the absolute path, causing error.=20 WSDLGetUtils.java In 2.7.7 version of CXF library, mapUri() method resolves correctly. protected String mapUri(String base, Map smp, Stri= ng loc) =09=09=09throws UnsupportedEncodingException { =09=09SchemaReference ref =3D (SchemaReference) smp.get(URLDecoder.decode(l= oc, "utf-8")); =09=09if (ref !=3D null) { =09=09=09return new StringBuilder().append(base).append("?xsd=3D") =09=09=09=09=09.append(ref.getSchemaLocationURI().replace(" ", "%20")).toSt= ring(); =09=09} =09=09return null; =09} After 2.7.7 version, for example 3.1.0 version, mapUri() was changed. The "= loc" parameter is changed in this line "key =3D new URI(xsd).resolve(loc).t= oString();". After that change, the imported XSD is not found on the map "S= chemaReference ref =3D (SchemaReference)smp.get(URLDecoder.decode(key, "utf= -8"));". This error is blocking WSDL first aproach development using JBoss AS and JA= X-WS. was: When importing multiple levels of XSDs in a WSDL, the schemaLocation attrib= ute produces an error in the translated URL. Folder Structure: =E2=94=9C=E2=94=80=E2=94=80 wsdl | =E2=94=94=E2=94=80=E2=94=80 UserService.wsdl =E2=94=94=E2=94=80=E2=94=80 schema =E2=94=9C=E2=94=80=E2=94=80 type | =E2=94=9C=E2=94=80=E2=94=80 user | | =E2=94=94=E2=94=80=E2=94=80 user.xsd | =E2=94=94=E2=94=80=E2=94=80 phone | =E2=94=94=E2=94=80=E2=94=80 phone.xsd =E2=94=94=E2=94=80=E2=94=80 xsd =E2=94=94=E2=94=80=E2=94=80 UserService.xsd ---------------------------------------------------------------------------= ------------------- UserService.wsdl ---------------------------------------------------------------------------= ------------------- =09 =09=09 =09=09=09 =09=09 =09 =09 =09=09 =09 =09 =09=09 =09 =09 =09=09 =09=09=09 =09=09=09 =09=09 =09 =09 =09=09 =09=09 =09=09=09 =09=09=09 =09=09=09=09 =09=09=09 =09=09=09 =09=09=09=09 =09=09=09 =09=09 =09 =09 =09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- ---------------------------------------------------------------------------= ------------------- UserService.xsd ---------------------------------------------------------------------------= ------------------- =09 =09 =09 =09 =09=09 =09=09=09 =09=09 =09 =09 =09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- ---------------------------------------------------------------------------= ------------------- user.xsd ---------------------------------------------------------------------------= ------------------- =09 =09 =09=09 =09=09=09 =09=09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- ---------------------------------------------------------------------------= ------------------- phone.xsd ---------------------------------------------------------------------------= ------------------- =09 =09=09 =09=09=09 =09=09=09 =09=09=09 =09=09 =09 ---------------------------------------------------------------------------= ------------------- Error: When running on started server, the schemaLocation attribute in UserService= .xsd don't resolve the absolute path, causing error.=20 WSDLGetUtils.java In 2.7.7 version of CXF library, mapUri() method resolves correctly. protected String mapUri(String base, Map smp, Stri= ng loc) =09=09=09throws UnsupportedEncodingException { =09=09SchemaReference ref =3D (SchemaReference) smp.get(URLDecoder.decode(l= oc, "utf-8")); =09=09if (ref !=3D null) { =09=09=09return new StringBuilder().append(base).append("?xsd=3D") =09=09=09=09=09.append(ref.getSchemaLocationURI().replace(" ", "%20")).toSt= ring(); =09=09} =09=09return null; =09} After 2.7.7 version, for example 3.1.0 version, mapUri() was changed. The "= loc" parameter is changed in this line "key =3D new URI(xsd).resolve(loc).t= oString();". After that change, the imported XSD is not found on the map "S= chemaReference ref =3D (SchemaReference)smp.get(URLDecoder.decode(key, "utf= -8"));". This error is blocking WSDL first aproach development using JBoss AS and JA= X-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 attr= ibute 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 > -------------------------------------------------------------------------= --------------------- > > =09xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/" xmlns:tns=3D"http://te= st.com.br/integration/services/user" > =09xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1=3D"http= ://schemas.xmlsoap.org/soap/http" > =09xmlns:sch=3D"http://test.com.br/integration/schema" > =09name=3D"UserServiceService" targetNamespace=3D"http://test.com.br/inte= gration/services/user"> > =09 > =09=09 > =09=09=09 > =09=09 > =09 > =09 > =09=09 > =09 > =09 > =09=09 > =09 > =09 > =09=09 > =09=09=09 > =09=09=09 > =09=09 > =09 > =09 > =09=09 =09=09=09transport=3D"http://schemas.xmlsoap.org/soap/http" /> > =09=09 > =09=09=09 > =09=09=09 > =09=09=09=09 > =09=09=09 > =09=09=09 > =09=09=09=09 > =09=09=09 > =09=09 > =09 > =09 > =09=09 > =09=09=09 > =09=09 > =09 > > -------------------------------------------------------------------------= --------------------- > -------------------------------------------------------------------------= --------------------- > UserService.xsd > -------------------------------------------------------------------------= --------------------- > > =09xmlns:tns=3D"http://test.com.br/integration/schema" xmlns:ns2=3D"http:= //test.com.br/integration/schema/user" > =09elementFormDefault=3D"unqualified" targetNamespace=3D"http://test.com.= br/integration/schema" > =09version=3D"1.0"> > =09 > =09 > =09 > =09 > =09=09 > =09=09=09 > =09=09 > =09 > =09 > =09=09 > =09=09=09 > =09=09 > =09 > > -------------------------------------------------------------------------= --------------------- > -------------------------------------------------------------------------= --------------------- > user.xsd > -------------------------------------------------------------------------= --------------------- > > =09xmlns:ns1=3D"http://test.com.br/integration/schema/phone" > =09targetNamespace=3D"http://test.com.br/integration/schema/user" version= =3D"1.0"> > =09 > =09 > =09=09 > =09=09=09 > =09=09=09 > =09=09=09 > =09=09 > =09 > > -------------------------------------------------------------------------= --------------------- > -------------------------------------------------------------------------= --------------------- > phone.xsd > -------------------------------------------------------------------------= --------------------- > > =09targetNamespace=3D"http://test.com.br/integration/schema/phone" versio= n=3D"1.0"> > =09 > =09=09 > =09=09=09 > =09=09=09 > =09=09=09 > =09=09 > =09 > > -------------------------------------------------------------------------= --------------------- > Error: > When running on started server, the schemaLocation attribute in UserServi= ce.xsd don't resolve the absolute path, causing error.=20 > WSDLGetUtils.java > In 2.7.7 version of CXF library, mapUri() method resolves correctly. > protected String mapUri(String base, Map smp, St= ring loc) > =09=09=09throws UnsupportedEncodingException { > =09=09SchemaReference ref =3D (SchemaReference) smp.get(URLDecoder.decode= (loc, "utf-8")); > =09=09if (ref !=3D null) { > =09=09=09return new StringBuilder().append(base).append("?xsd=3D") > =09=09=09=09=09.append(ref.getSchemaLocationURI().replace(" ", "%20")).to= String(); > =09=09} > =09=09return null; > =09} > After 2.7.7 version, for example 3.1.0 version, mapUri() was changed. The= "loc" parameter is changed in this line "key =3D new URI(xsd).resolve(loc)= .toString();". After that change, the imported XSD is not found on the map = "SchemaReference ref =3D (SchemaReference)smp.get(URLDecoder.decode(key, "u= tf-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)