svn-gvsig-desktop / tmp / trunk / servidor / WorkSpace_Servidor / ows-parsers / src / org / tigris / frogs / parser / ows / impl1_0_0 / OWSTest.java @ 26481
History | View | Annotate | Download (1.68 KB)
1 |
package org.tigris.frogs.parser.ows.impl1_0_0; |
---|---|
2 |
|
3 |
import java.io.*; |
4 |
|
5 |
import javax.xml.bind.JAXBElement; |
6 |
|
7 |
public class OWSTest { |
8 |
|
9 |
/**
|
10 |
* Main Unit SLDTest wihout be invked by the FROGS Framework
|
11 |
*/
|
12 |
public static void main(String[] args) { |
13 |
System.out.println("OWS 1.0.0 Loader..."); |
14 |
|
15 |
try {
|
16 |
OWSXmlParser cswParser = new OWSXmlParser();
|
17 |
|
18 |
String filename = "Exception_1_0_0.xml"; |
19 |
System.out.println("Loading " + filename ); |
20 |
net.schema.ows.impl1_0_0.ExceptionReport reportError = |
21 |
(net.schema.ows.impl1_0_0.ExceptionReport)cswParser.load(new File(filename).toURL()); |
22 |
if ( reportError != null ) { |
23 |
System.out.println("Version:" + reportError.getVersion() ); |
24 |
System.out.println("Language:" + reportError.getLanguage() ); |
25 |
System.out.println("Count errors:" + reportError.getException().size() ); |
26 |
} |
27 |
System.out.println("Problem? " + cswParser.getDocumentErrors().toString()); |
28 |
|
29 |
|
30 |
} |
31 |
// Throw Error
|
32 |
catch (Throwable ex) { |
33 |
ex.printStackTrace(); |
34 |
} |
35 |
finally {
|
36 |
System.out.println("Done."); |
37 |
} |
38 |
|
39 |
System.out.println("Generator"); |
40 |
try {
|
41 |
|
42 |
// ready to produce XML
|
43 |
OWSXmlParser newsdParser = new OWSXmlParser();
|
44 |
//System.out.println("XML generated:\n" + newsdParser.serialize(execResp,org.tigris.frogs.commons.Constants.Charsets.getUTF_8()) + "\n");
|
45 |
|
46 |
} |
47 |
// Throw Error
|
48 |
catch (Throwable ex) { |
49 |
ex.printStackTrace(); |
50 |
} |
51 |
finally {
|
52 |
System.out.println("Done."); |
53 |
} |
54 |
|
55 |
} |
56 |
|
57 |
} |