Revision 3522

View differences:

trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/WMSProtocolHandler.java
218 218
		}
219 219
		catch(Exception e)
220 220
		{
221
			// TODO something about the exceptionsssss....!!!
221
			e.printStackTrace();
222 222
		}
223 223
		
224 224
    	try
......
254 254
    {
255 255
		String req = new String();
256 256
		String host = getHost();
257
		if ((!host.endsWith("?"))&&(host.indexOf("?")==-1))			
258
			req = req + getHost() + "?REQUEST=GetCapabilities&SERVICE=WMS&";
259
		else
260
		{
261
			String symbol = (host.endsWith("&")) ? "" : "&";
262
			req = req + getHost() + symbol + "REQUEST=GetCapabilities&SERVICE=WMS&";
263
		}
257
//		if ((!host.endsWith("?"))&&(host.indexOf("?")==-1))			
258
//			req = req + getHost() + "?REQUEST=GetCapabilities&SERVICE=WMS&";
259
//		else
260
//		{
261
//			String symbol = (host.endsWith("&")) ? "" : "&";
262
//			req = req + getHost() + symbol + "REQUEST=GetCapabilities&SERVICE=WMS&";
263
//		}
264
		String symbol = (host.indexOf("?")==-1) ? "?" : "&";
265
		req = req + getHost() + symbol + "REQUEST=GetCapabilities&SERVICE=WMS&";
264 266
		req = req + "VERSION=" + getVersion();
265 267
		req += ("&EXCEPTIONS=XML");
266 268
		return req;
......
272 274
    private String buildGetFeatureInfoRequest(WMSStatus status, int x, int y)
273 275
    {
274 276
		String req = new String();
275
		if (!host.endsWith("?"))
276
			req = req + getHost() + "?REQUEST=GetFeatureInfo&SERVICE=WMS&";
277
		else
278
			req = req + getHost() + "REQUEST=GetFeatureInfo&SERVICE=WMS&";
277
//		if (!host.endsWith("?"))
278
//			req = req + getHost() + "?REQUEST=GetFeatureInfo&SERVICE=WMS&";
279
//		else
280
//			req = req + getHost() + "REQUEST=GetFeatureInfo&SERVICE=WMS&";
281
		String symbol = (host.indexOf("?")==-1) ? "?" : "&";
282
		req = req + getHost() + symbol + "REQUEST=GetFeatureInfo&SERVICE=WMS&";
279 283
		req = req + "QUERY_LAYERS="+Utilities.Vector2CS(status.getLayerNames()); 
280 284
		req = req + "&VERSION=" + getVersion() + "&";
281 285
		req = req + getPartialQuery(status);
......
292 296
     * Builds the GetMapRequest according to the OGC WMS Specifications
293 297
     */
294 298
    private String buildMapRequest(WMSStatus status)
295
    {
299
    { 
296 300
		String req = new String();
297
		if (!host.endsWith("?"))
298
			req = req + getHost() + "?REQUEST=GetMap&SERVICE=WMS&";
299
		else
300
			req = req + getHost() + "REQUEST=GetMap&SERVICE=WMS&";
301
//		if (!host.endsWith("?"))
302
//			req = req + getHost() + "?REQUEST=GetMap&SERVICE=WMS&";
303
//		else
304
//			req = req + getHost() + "REQUEST=GetMap&SERVICE=WMS&";
305
		String symbol = (host.indexOf("?")==-1) ? "?" : "&";
306
		req = req + getHost() + symbol + "REQUEST=GetMap&SERVICE=WMS&";
301 307
		req = req + "VERSION=" + getVersion() + "&";
302 308
		req = req + getPartialQuery(status);
303 309
       if (status.getExceptionFormat() != null) {

Also available in: Unified diff