Revision 28430 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteClient/wfs/WFSClient.java
WFSClient.java | ||
---|---|---|
107 | 107 |
} |
108 | 108 |
} |
109 | 109 |
|
110 |
public WFSClient(String host, String version) { |
|
110 |
public WFSClient(String host, String version) throws IOException {
|
|
111 | 111 |
setHost(host); |
112 | 112 |
|
113 |
handler = WFSProtocolHandlerFactory.createVersionDriver(version); |
|
113 |
if (version == null){ |
|
114 |
try { |
|
115 |
handler = WFSProtocolHandlerFactory.negotiate(host); |
|
116 |
} catch(ConnectException conE) { |
|
117 |
conE.printStackTrace(); |
|
118 |
throw conE; |
|
119 |
} catch(IOException ioE) { |
|
120 |
ioE.printStackTrace(); |
|
121 |
throw ioE; |
|
122 |
} catch(Exception e) { |
|
123 |
e.printStackTrace(); |
|
124 |
} |
|
125 |
}else{ |
|
126 |
handler = WFSProtocolHandlerFactory.createVersionDriver(version); |
|
127 |
} |
|
114 | 128 |
|
115 | 129 |
if (handler == null){ |
116 | 130 |
throw new UnsupportedOperationException("Unsupported version"); |
Also available in: Unified diff