[GIS] Problem with connecting remote WMS connection to GeoServer

geoserverwms

In my geoserver admin panel I try to connect new stores – remote WMS connection:

http://mapy.geoportal.gov.pl/wss/service/pub/guest/kompozycjaG2_TBD_WMS/MapServer/WMSServer?service=wms&version=1.3.0&request=GetCapabilities

and when I try to save this store, displays errors:

Connection test failed: Content type is required for org.geotools.data.wms.response.WMSGetCapabilitiesResponse

Does anybody knows what could be reason?

Best Answer

Your problem seems to be investigated on the GeoServer developer mailing list in this thread

Summary

Cascading WMS from the Polish geoportal is failing because the server does not accept Java as a User-Agent in the http headers.

I recommend to contact the administrators of the geoportal because this behavior it preventing the use of the WMS service with all Java based clients which are configured to send the jre version as User-Agent. IMHO it is a normal and right thing to do. It is hard to believe that blocking clients that way by http User-Agent headers from a national INSPIRE view service is intentional.