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 "Steven E. Harris (JIRA)" <ji...@apache.org> on 2007/04/23 21:24:15 UTC

[jira] Created: (AXIS2-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
----------------------------------------------------------------------------------------------------

                 Key: AXIS2-2584
                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: deployment
    Affects Versions: nightly
         Environment: Windows XP, Apache Tomcat 6
            Reporter: Steven E. Harris


The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:

                } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
                    // trying to use the jar scheme as the base URI. I think this can be used to handle
                    // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
                    axisServiceBuilder.setBaseUri(
                            "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
                }

The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:

INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl

Note that it's complaining about the backslash after the "C:' part.

The fix is simple: build the new URI from yet another URI:

                    axisServiceBuilder.setBaseUri(
                            "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
 

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507432 ] 

Davanum Srinivas commented on AXIS2-2584:
-----------------------------------------

Fixed in latest svn 549858

thanks,
dims

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>            Assignee: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff, ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Steven E. Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492054 ] 

Steven E. Harris commented on AXIS2-2584:
-----------------------------------------

In the same file, ArchiveReader.java, just a few lines down from my original patch's target, we see the same problem:

if (serviceArchiveFile != null) {
   axisServiceBuilder.setBaseUri(
      serviceArchiveFile.getParentFile().getAbsolutePath());
}

This should also use File.toURI(), as follows:

if (serviceArchiveFile != null) {
   axisServiceBuilder.setBaseUri(
      serviceArchiveFile.getParentFile().toURI().toString());
}

This takes care of non-AAR-packaged (exploded) deployments that would otherwise fail with Windows-style paths.

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Assigned To: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Steven E. Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491075 ] 

Steven E. Harris commented on AXIS2-2584:
-----------------------------------------

One more comment on this schema resolution problem: I think this comes down to URI.resolve() not working as one would expect with "jar"-scheme URIs. The method org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity() is trying to do the right thing, taking a base URI like "jar:file://C://dir/archive.jar!/schema1.xsd" and a schema location of "schema2.xsd", which should resolve to "jar:file://C://dir/archive.jar!/schema2.xsd". Instead, it just resolves to "schema2.xsd", the "jar" URI apparently being treated as opaque and non-hierarchical.

The construction-time resolution rules laid out for Sun's JarURLConnection don't seem to apply to URI.resolve():
http://java.sun.com/javase/6/docs/api/java/net/JarURLConnection.html


> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Steven E. Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491048 ] 

Steven E. Harris commented on AXIS2-2584:
-----------------------------------------

It's worth noting that even with the fix in place, deployment fails later in WSDL20ToAxisServiceBuilder.populateService() when it tries to find the XML Schema files referenced by my WSDL file. Maybe this is fodder for a separate issue, but it looks like Woden assumes that it should use the current working directory (in this case, Tomcat's "bin" directory) to dereference schemaLocation URIs. It should really use the base URI of the WSDL file itself to find the other URIs referenced by the constituent schema files.

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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] Resolved: (AXIS2-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

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

Davanum Srinivas resolved AXIS2-2584.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.3)

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>            Assignee: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff, ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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] Assigned: (AXIS2-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

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

Deepal Jayasinghe reassigned AXIS2-2584:
----------------------------------------

    Assignee: Deepal Jayasinghe

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Assigned To: Deepal Jayasinghe
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491043 ] 

Davanum Srinivas commented on AXIS2-2584:
-----------------------------------------

deepal,

we need to fix this for 1.2 final release

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491108 ] 

Davanum Srinivas commented on AXIS2-2584:
-----------------------------------------

Steven,

we'll need your test case to recreate and fix the problem properly.

thanks,
dims

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

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

Steven E. Harris updated AXIS2-2584:
------------------------------------

    Attachment: ArchiveReader.java.diff

Patch substituting URI-based composition, rather than using getAbsolutePath().

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Steven E. Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507456 ] 

Steven E. Harris commented on AXIS2-2584:
-----------------------------------------

Thanks for following through with this one.

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>            Assignee: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff, ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

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

Glen Daniels updated AXIS2-2584:
--------------------------------

    Fix Version/s: 1.3

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>            Assignee: Keith Godwin Chapman
>             Fix For: 1.3
>
>         Attachments: ArchiveReader.java.diff, ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

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

Steven E. Harris updated AXIS2-2584:
------------------------------------

    Attachment: ArchiveReader.java.diff

Amended patch to cover non-AAR-packaged (exploded) deployment cases as well.

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Assigned To: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff, ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Steven E. Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491340 ] 

Steven E. Harris commented on AXIS2-2584:
-----------------------------------------

Keith, yes, the problem arises with at least two levels of importing: my WSDL imports one XML Schema file, which in turn imports three other XML Schema files.

Per my comment about the JAR URIs above, I'm not sure we can blame the ws-commons's DefaultURIResolver. It's trying to do the right thing; I think the problem lies with the JRE's treatment of JAR-scheme URIs being opaque, and not doing anything with URI.resolve() other than returning the given relative URI back as the resolved URI.

I found this discussion about a special URI class used in the Eclipse project's EMF:

http://www.brandonwerner.com/2007/04/19/eclipse-modeling-framework-examination-and-that-mean-websphere-error/
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.emf.doc/references/javadoc/org/eclipse/emf/common/util/URI.html

Check out the paragraph that starts as follows:

"The other enhancement provides support for the almost-hierarchical form used for files within archives, such as the JAR scheme, defined for the Java Platform in the documentation for JarURLConnection."

Eclipse introduced a whole new class to deal -- at least in part -- with this archive URI resolution problem.

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Assigned To: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Steven E. Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491057 ] 

Steven E. Harris commented on AXIS2-2584:
-----------------------------------------

Sorry, it's not Woden at fault, but something downstream:

org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema()

I can see in the debugger that it has a baseUri pointing to one schema file inside my AAR/JAR file, and it's trying to resolve another schema file referenced by the first, and for some reason it's not doing the URI resolution properly.

I don't have source available for this file (yet), so that's the most detail I can give for now.

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491143 ] 

Keith Godwin Chapman commented on AXIS2-2584:
---------------------------------------------

Hi Steven,

I I applied the patch you had given. Thanks for that.

Yes I did come across the same issue with regard to loading the schemas through woden (apparently it didnt work for two levels of importing and it did work for one level of importing). Fixing this is something to do with woden, so we wont be able to get it into the 1.2 release. I'll file a JIRA with them. 

The problem you had was it with two levels of importing too? (Cause it works for one level of importing).

Thanks,
Keith

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Assigned To: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

-- 
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] Assigned: (AXIS2-2584) AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)

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

Deepal Jayasinghe reassigned AXIS2-2584:
----------------------------------------

    Assignee: Keith Godwin Chapman  (was: Deepal Jayasinghe)

> AAR deployment fails with a WSDL 2 document due to spaces in path to AAR file (interpreted as a URI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2584
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2584
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: nightly
>         Environment: Windows XP, Apache Tomcat 6
>            Reporter: Steven E. Harris
>         Assigned To: Keith Godwin Chapman
>         Attachments: ArchiveReader.java.diff
>
>
> The class org.apache.axis2.deployment.repository.util.ArchiveReader attempts to construct a JAR-based URI in its processWSDLFile() method:
>                 } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
>                     // trying to use the jar scheme as the base URI. I think this can be used to handle
>                     // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
>                     axisServiceBuilder.setBaseUri(
>                             "jar:file://" + serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
>                 }
> The call to "serviceArchiveFile.getAbsolutePath()" creates a path string with embedded spaces and backslashes (on Windows). The java.net.URI constructor rejects such a path, emitting an error such as:
> INFO: Trouble processing wsdl file :Illegal character in opaque part at index 13: jar:file://C:\Program Files\\apache-tomcat-6.0.10\webapps\axis2\WEB-INF\services\my.service.aar!/META-INF/myservice.wsdl
> Note that it's complaining about the backslash after the "C:' part.
> The fix is simple: build the new URI from yet another URI:
>                     axisServiceBuilder.setBaseUri(
>                             "jar:" + serviceArchiveFile.toURI() + "!/" + baseURI);
>  

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