Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 48760 invoked from network); 4 Jan 2011 09:02:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2011 09:02:09 -0000 Received: (qmail 98523 invoked by uid 500); 4 Jan 2011 09:02:08 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 98367 invoked by uid 500); 4 Jan 2011 09:02:08 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 98359 invoked by uid 99); 4 Jan 2011 09:02:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 09:02:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 09:02:07 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0491kqA000239 for ; Tue, 4 Jan 2011 09:01:47 GMT Message-ID: <9237190.129391294131706948.JavaMail.jira@thor> Date: Tue, 4 Jan 2011 04:01:46 -0500 (EST) From: "Mauro Molinari (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services 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/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977176#action_12977176 ] Mauro Molinari commented on AXIS2-3354: --------------------------------------- Hi Srinath, sorry but I can't work on this at the moment. However, in my original report and in the following comment: https://issues.apache.org/jira/browse/AXIS2-3354?focusedCommentId=12752583&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12752583 I wrote the exact steps to reproduce. Moreover, the provided patch was generated against Axis2 1.5 codebase, which I hope is not so different from the current one. Anyway, the patch is very simple: in org.apache.axis2.description.AxisService when you handle "?xsd=" URIs, use new "File(location).getName()" instead of just "location" to determine the new schema location and/or the value of the node of the outputted wsdl. There are two such lines. > Allow for sharing XSD schemas between services > ---------------------------------------------- > > Key: AXIS2-3354 > URL: https://issues.apache.org/jira/browse/AXIS2-3354 > Project: Axis2 > Issue Type: Improvement > Components: codegen > Affects Versions: 1.5, 1.3 > Reporter: Mauro Molinari > Assignee: Srinath Perera > Attachments: patch.txt > > > Suppose I have the following structure: > The WSDLs for MyService1 and MyService2 are in the following folders, respectively: > contextpath/WEB-INF/services/MyService1/META-INF/ > contextpath/WEB-INF/services/MyService2/META-INF/ > I want them to share Common.xsd: as of now, it seems that there's no way to get this to work. > If I put it here: > contextpath/WEB-INF/services/ > and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links: > MyService1?xsd=../../Common.xsd (in MyService1 WSDL) > MyService2?xsd=../../Common.xsd (in MyService2 WSDL) > The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link: > http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd > a "file not found" error is given. > Another clue is that if I try to generate a client pointing to > http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema. > By manually typing: > http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd > I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails. > So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services. > Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org