jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • XFire
  • XFIRE-857

Resolver resolves classpath resources incorrect

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.2.4
  • Fix Version/s: None
  • Component/s: Core
  • Labels:
    None
  • Environment:
    WinXP Java 1.5.09

Description

When I pass a WSDL URL to the XFireClientFactoryBean of the format "classpath:...../bla.wsdl" I get an error in the method makeClient() as uri.toURL() throws an IllegalArgumentException("URI is not absolute").

The Resolver resolves the file correctly to a String of the form "file:/d:/..../bla.wsdl" but when the URI object is created (in the method tryClasspath(String) of Resolver) with uri = new URI(URLEncoder.encode(decodedURL, "UTF-8")) URI does not find the scheme (I guess this should be file:/) and therefore thinks its a relative URI.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    xfire-core-1.2.6-issue857.patch
    15/Jul/09 7:47 AM
    0.8 kB
    Nils Eckert

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Nils Eckert added a comment - 06/Jul/09 8:51 AM

The problem seems to be the UTF-8 encoding in

org.codehaus.xfire.util.Resolver.tryClasspath(String)
uri = new URI(URLEncoder.encode(decodedURL, "UTF-8"));

This leads to the fact, that the URI Constructor can't extract the scheme and the URI is treated as "not absolute".

I can't understand why the urlString has to be encoded before using it for the URI Constructor.

The problem could be solved for me if remove the encoding. I will attach a patch.

Regards
Nils Eckert

Show
Nils Eckert added a comment - 06/Jul/09 8:51 AM The problem seems to be the UTF-8 encoding in
org.codehaus.xfire.util.Resolver.tryClasspath(String)
uri = new URI(URLEncoder.encode(decodedURL, "UTF-8"));
This leads to the fact, that the URI Constructor can't extract the scheme and the URI is treated as "not absolute". I can't understand why the urlString has to be encoded before using it for the URI Constructor. The problem could be solved for me if remove the encoding. I will attach a patch. Regards Nils Eckert
Hide
Permalink
Nils Eckert added a comment - 15/Jul/09 7:47 AM

This patch fixes the issue. Patch against 1.2.6 Tag.

Show
Nils Eckert added a comment - 15/Jul/09 7:47 AM This patch fixes the issue. Patch against 1.2.6 Tag.

People

  • Assignee:
    Dan Diephouse
    Reporter:
    Philippe Jacot
Vote (1)
Watch (2)

Dates

  • Created:
    26/Jan/07 7:30 AM
    Updated:
    15/Jul/09 7:47 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.