Statistics
| Revision:

root / trunk / extensions / extWCS / src / es / uji / lsi / wcs / XmlWcsParsing / WCSExceptionResponse.java @ 1877

History | View | Annotate | Download (1.07 KB)

1
/*
2
 * WCSExceptionResponse.java
3
 *
4
 * Created on 23 de febrero de 2005, 18:17
5
 */
6

    
7
package es.uji.lsi.wcs.XmlWcsParsing;
8
import java.io.File;
9
/**
10
 *
11
 * @author  jaume
12
 */
13
public class WCSExceptionResponse {
14
    private String text;
15
    /** Creates a new instance of WCSExceptionResponse */
16
    public WCSExceptionResponse(File file) {
17
        XMLNode node = null;
18
        try{
19
            node = new XMLNode(file);
20
            
21
            if (WCSToolkit.isWCSTab(node, "ServiceExceptionReport")){
22
                for (int i=0; i<node.getNumSubNodes(); i++){
23
                    XMLNode subnode = node.getSubNode(i);
24
                    if (WCSToolkit.isWCSTab(subnode, "ServiceException")){
25
                        text = subnode.getText();
26
                        break;
27
                    }
28
                }
29
            } else{
30
                text = "Respuesta del servidor inesperada";
31
            }
32
        } catch (Exception e){
33
            new Error("WCSExceptionResponse. error al abrir el fichero");
34
        }
35
       
36
    }
37
    
38
    public String getText(){
39
        return text;
40
    }
41
}