[ 
http://jira.codehaus.org/browse/XFIRE-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103630
 ] 

Knut-Erik Johnsen commented on XFIRE-1021:
------------------------------------------

I just found another small fix. If the schema has relative imports that have 
relative imports, this fix is not enough. The lastimport variable needs to be 
set to the entire url of the last import, not just the name. Since the Resolver 
class has functionality to create the entire new URL, one needs to add the 
following line  below the new Resolver(...) line:

// Set the last imported value.
lastimport = resolver.getURL().toString();

The setting of lastimport above the try section can be removed. Now the 
variable has the correct value, and relative imports works like a charm :)

> ResolverWSDLLocator does not resolve schemas with relative imports
> ------------------------------------------------------------------
>
>                 Key: XFIRE-1021
>                 URL: http://jira.codehaus.org/browse/XFIRE-1021
>             Project: XFire
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.6
>         Environment: JDK1.5, Windows,
>            Reporter: Knut-Erik Johnsen
>            Assignee: Dan Diephouse
>             Fix For: 1.2.7
>
>
> The ResolverWSDLLocator does currently not honor the interface it's 
> implementing, so that resolving of relative paths in schemaimports will fail. 
> It disregards the parentLocation parameter and because of this the 
> getInputStream call will throw an exception. The code below fixes the problem
> {noformat}
> public InputSource getImportInputSource(String parentLocation, String name)
>     {
>         Resolver resolver;
>         InputSource result = null;
>         // Set the last imported value.
>         lastimport = name;
>         try
>         {
>             resolver = new Resolver(parentLocation, name);
>             InputStream is = resolver.getInputStream();
>             
>             if (is != null)
>                 result = new InputSource(resolver.getInputStream());
>         }
>         catch (IOException e)
>         {
>             LOG.warn("Source: " + name + " failed to find input source with 
> exception: ", e);
>         }
>         return result;
>     }
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to