I'm assuming the URLConverterImpl thing you have there is an eclipse or osgi 
specific class?   If so, then no, we cannot do that as that would add a bunch 
of additional dependencies.

Is this something you can do within your plugin and then pass the directory 
location in via the ToolContext  config entry:  ToolConstants.CFG_SCHEMA_DIR?

Dan



On Jun 7, 2013, at 8:03 AM, mlabarre <[email protected]> wrote:

> I have found the problem.
> In Eclipse environment, ClassLoader returns a URL starting with
> "bundleresource:" not a "jar:" neither "file:".
> So, addDefaultSchemas in WSDL11Validor cannot locate the schemas.
> 
> Do you think possible to add the following code in WSDL11Validator at line
> 250:
> 
>   } else if (url.toString().startsWith("bundleresource:")) {
>      URLConverter conv = new URLConverterImpl();
>      URL u =conv.toFileURL(url);
>      File directorySchemas = new File(u.getFile());
>      if (directorySchemas.isDirectory()) {
>         for (File schema : directorySchemas.listFiles()) {
>            if (schema.getPath().endsWith(".xsd")) {
>               FileInputStream fis = new FileInputStream(schema);
>                  xsdList.add(new InputSource(fis));
>               }
>            }
>        }
>     }
> 
> 
> Thanks you very much
> 
> 
> 
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/WSDL2Java-from-java-question-tp5728875p5728927.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to