You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Linus Kamb (JIRA)" <ji...@apache.org> on 2007/09/10 20:26:29 UTC

[jira] Created: (AXIS2-3191) Failure when WSDL imports schema that imports other schemas from relative URLs

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
            Priority: Critical


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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3191) Failure when WSDL imports schema that imports other schemas from relative URLs

Posted by "Chyi Pin Lim (JIRA)" <ji...@apache.org>.
    [ 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3191) Failure when WSDL imports schema that imports other schemas from relative URLs

Posted by "Linus Kamb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Linus Kamb updated AXIS2-3191:
------------------------------

    Attachment: ESPortalCDI.wsdl

In case it helps, I'm attaching my wsdl.



> 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
>            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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3191) Failure when WSDL imports schema that imports other schemas from relative URLs

Posted by "Martin Scholl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662463#action_12662463 ] 

Martin Scholl commented on AXIS2-3191:
--------------------------------------

We also had the very same issue. The fix seems to work, indeed. Thanks for that.

It would be great to have an officially "cleaned" version since this bug is rather old..., maybe 1.5 ....

> 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.


[jira] Commented: (AXIS2-3191) Failure when WSDL imports schema that imports other schemas from relative URLs

Posted by "Paul Mahoney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649478#action_12649478 ] 

Paul Mahoney commented on AXIS2-3191:
-------------------------------------

I had exactly the same issue and was rather relieved to find your solution... which worked perfectly. :-)
Many thanks

> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3191) Failure when WSDL imports schema that imports other schemas from relative URLs

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe updated AXIS2-3191:
-------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org