Hi Ben / Scott:

After going to all the trouble of getting the parser/encoder stuff sorted out I 
am running into problems when working in a Java EE environment. Specifically 
something in the parser code is trying to access the filesystem and failing 
security restrictions.

Ben I think this is the problem you were working on when packaging stuff up in 
jar form? In this case I do not always control the input; and would like to 
remove the file check when an XSD is looked up.  I thought I may be able to 
provide a base url; and as long as that mentioned localhost then the file 
system would not be checked?

However through painful testing (I cannot get a full stack trace) I  find I am 
actually failing just on the first line here:

       QName name = new QName("http://www.opengis.net/gml","LineString";);
       GML gml = new GML(Version.GML3); /// < -- failure occurs here!
       gml.setBaseURL(new URL("http://localhost/";));

       // code to parse the actual xml goes here

What happens inside the GML class amounts to...

        List<Schema> schemas = new ArrayList<Schema>();
        schemas.add(new XSSchema().profile()); // encoding of common java types
        Schema hack = new SchemaImpl(XS.NAMESPACE);

        AttributeTypeBuilder builder = new AttributeTypeBuilder();
        builder.setName("date");
        builder.setBinding(Date.class);
        hack.put(new NameImpl(XS.DATETIME), builder.buildType());

        schemas.add(hack);
            gmlNamespace = org.geotools.gml3.GML.NAMESPACE;
            gmlLocation = "gml/3.1.1/base/gml.xsd";
            gmlConfiguration = new org.geotools.gml3.GMLConfiguration();
            schemas.add(new org.geotools.gml3.GMLSchema().profile());

Can you see anything in there that would go off and check disk? And thus fail a 
security check?

Thus far I am trying to reproduce the security restrictions in a normal JUnit 
test case so I can debug this thing; I am afraid the server used is ZooWPS and 
not GeoServer and it does not lend itself to debugging.

Jody
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to