Hey Justin,

The geomatys folk are running into a problem with the geotools xml
parser which bails at the beginning of a getCapabilites document. They
ran into this testing with uDig but the error is in geotools as the
attached code shows.

The difference appears to be that the getCap doc from seagis uses an XML
schema (it's a JAXB thing) whereas Geoserver uses a DTD schema.

I realize you have various parsers in play doing lots of different
things and perhaps this is an old parser and a known problem. Could you
summarize the state of the Geotools parsers or let us know what you
think of this? 

thanks,
adrian
package MainTestPackage;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import org.geotools.data.wms.WebMapServer;
import org.geotools.ows.ServiceException;
import org.xml.sax.SAXException;

/**
 *
 * @author legal
 */
public class capabilitiesconnectTEST {

    /**
     * The main method.
     * @param args the path to file to generate.
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        URL url = null;
        try {
            url = new URL("http://sensor.geomatys.fr/ifremerWS/WS/wms?request=GetCapabilities&service=WMS&version=1.1.1";);
        } catch (MalformedURLException e) {
        //will not happen
        }

        WebMapServer wms = null;
        try {
            wms = new WebMapServer(url);
        } catch (IOException e) {
        //There was an error communicating with the server
        //For example, the server is down
        } catch (ServiceException e) {
        //The server returned a ServiceException (unusual in this case)
        } catch (SAXException e) {
        //Unable to parse the response from the server
        //For example, the capabilities it returned was not valid
        }

    }
}



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to