[
https://issues.apache.org/jira/browse/AXIS2-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633017#action_12633017
]
Chyi Pin Lim commented on AXIS2-3191:
-------------------------------------
This is a possible fix.
I ran into a similar problem and the following change works for me.
Index:
modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
===================================================================
---
modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
(revision 688935)
+++
modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
(working copy)
@@ -73,7 +73,7 @@
public InputSource getImportInputSource(String parentLocation, String
importLocation) {
lastImportLocation =
URI.create(parentLocation).resolve(importLocation);
- if (isAbsolute(importLocation)) {
+ if (isAbsolute(lastImportLocation.toString())) {
return super.resolveEntity(
null, importLocation, parentLocation);
} else {
Index:
modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java
===================================================================
---
modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java
(revision 688935)
+++
modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java
(working copy)
@@ -52,8 +52,9 @@
String targetNamespace,
String schemaLocation,
String baseUri) {
+ lastImportLocation = URI.create(baseUri).resolve(schemaLocation);
//no issue with
- if (isAbsolute(schemaLocation)) {
+ if (isAbsolute(lastImportLocation.toString())) {
return super.resolveEntity(
targetNamespace, schemaLocation, baseUri);
} else {
@@ -63,7 +64,6 @@
"Unsupported schema location " + schemaLocation);
}
- lastImportLocation = URI.create(baseUri).resolve(schemaLocation);
ZipInputStream zin = null;
try {
zin = new ZipInputStream(new FileInputStream(aarFile));
@@ -103,7 +103,7 @@
}
- log.info("AARFileBasedURIResolver: Unable to resolve" +
lastImportLocation);
+ log.info("AARFileBasedURIResolver: Unable to resolve " +
lastImportLocation);
return null;
}
}
> Failure when WSDL imports schema that imports other schemas from relative URLs
> ------------------------------------------------------------------------------
>
> Key: AXIS2-3191
> URL: https://issues.apache.org/jira/browse/AXIS2-3191
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.3
> Reporter: Linus Kamb
> Assignee: Amila Chinthaka Suriarachchi
> Priority: Critical
> Attachments: ESPortalCDI.wsdl
>
>
> My WSDL imports a schema from an absolute URL. That schema imports other
> external public schemas from absolute URLs. Those schemas, in turn, import
> schemas from relative URLs.
> WSDL2Java works fine.
> However at load time, the tomcat log reports:
> [INFO] AARBasedWSDLLocator: Unable to resolve
> http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd
> [INFO] Trouble processing wsdl file :WSDLException (at
> /wsdl:definitions/wsdl:types/schema/xs:schema/xsd:schema):
> faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced
> at '../../gml/3.1.1/base/geometryAggregates.xsd' relative to document base
> 'http://schemas.opengis.net/filter/1.1.0/filter.xsd'
> Furthermore, even with useOriginalwsdl set to true in services.xml, trying to
> get the service wsdl returns:
> <error>
> <description>Unable to generate WSDL 1.1 for this service</description>
> <reason>
> If you wish Axis2 to automatically generate the WSDL 1.1, then please +set
> useOriginalwsdl as false in your services.xml
> </reason>
> </error>
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]