Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 56436 invoked from network); 28 Aug 2006 18:00:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 18:00:12 -0000 Received: (qmail 52168 invoked by uid 500); 28 Aug 2006 18:00:08 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 52122 invoked by uid 500); 28 Aug 2006 18:00:08 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 52092 invoked by uid 99); 28 Aug 2006 18:00:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 11:00:08 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E38437142E6 for ; Mon, 28 Aug 2006 17:56:22 +0000 (GMT) Message-ID: <11815848.1156787782929.JavaMail.jira@brutus> Date: Mon, 28 Aug 2006 10:56:22 -0700 (PDT) From: "Lori VanGulick (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-1087) CLONE -Problem with resolving imported schemas from WSDL11ToAxisServiceBuilder In-Reply-To: <31276988.1156781782347.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS2-1087?page=comments#action_12431027 ] Lori VanGulick commented on AXIS2-1087: --------------------------------------- This is still failing in revision 437740. Here is the structure of the wsdl and xsd: WEB-INF/wsdl/EchoService.wsdl WEB-INF/wsdl/porttype/Echo.wsdl WEB-INF/wsdl/xsd/Echo.xsd EchoService.wsdl imports "porttype/Echo.wsdl." This works fine (using a custom WSDLLocator). Echo.wsdl imports "../xsd/Echo.xsd". This fails with the following exception: Exception: org.apache.axis2.AxisFault: org.apache.ws.commons.schema.XmlSchemaException: C:\axis2\modules\kernel\target\test-classes\WEB-INF\xsd\Echo.xsd (The system cannot find the path specified.); nested exception is: java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: C:\axis2\modules\kernel\target\test-classes\WEB-INF\xsd\Echo.xsd (The system cannot find the path specified.) The problem is in WSDL11ToAxisServiceBuilder.copyExtensibleElements. Around line 1557: } else if (wsdl4jElement instanceof Schema) { Schema schema = (Schema) wsdl4jElement; // just add this schema - no need to worry about the imported // ones axisService.addSchema(getXMLSchema(schema.getElement(), wsdl4jDefinition.getDocumentBaseURI())); The baseURI passed to getXMLSchema is from the definition which cooresponds to EchoService.wsdl. What we want is the baseURI from Echo.wsdl, since that is the file that is importing the schema. I have tried fixing this by using the baseURI from the schema Element instead of from the base definition, like this: axisService.addSchema(getXMLSchema(schema.getElement(), schema.getDocumentBaseURI())); This change does work for relative URIs, like in my testcase. But I think it might introduce problems with absolute URIs. I am still looking at it. > CLONE -Problem with resolving imported schemas from WSDL11ToAxisServiceBuilder > ------------------------------------------------------------------------------ > > Key: AXIS2-1087 > URL: http://issues.apache.org/jira/browse/AXIS2-1087 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: core > Reporter: Lori VanGulick > Assigned To: Ajith Harshana Ranabahu > > When importing nested schemas with a relative path, I have noticed a problem with the base URI that the WSDL11ToAxisServiceBuilder passes to the getXMLSchema method. Considering the structure: > WEB-INF/wsdl/porttype/Echo.wsdl > and > WEB-INF/wsdl/xsd/Echo.xsd > If Echo.wsdl has an import statement like "../xsd/Echo.xsd", the schema will fail to import. The issue seems to be that the WSDL11ToAxisServiceBuilder passes the string "WEB-INF/wsdl" as the base URI. This causes the implementation of the org.apache.ws.commons.schema.resolver.URIResolver not to be able to resolve the relative location with the base URI. I wanted to point out this problem, and I am not looking for an immediate patch. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org