[Geoserver-devel] WMS cascading fails with an ESRI server

Thanks Andrea,

for encouragement. I did not know that I can solve it but I learned to fiddle with the headers by using Firefox and Poster. The remote WMS server there simply does not like Java as a user agent. This header yields an empty response:

User-Agent: Java/1.7.0_67

This one yields good GetCapabilities

User-Agent: foo

-Jukka-

···

Lähettäjä: andrea.aime@…403… [mailto:andrea.aime@…403…] Puolesta Andrea Aime
Lähetetty: 28. marraskuuta 2014 14:32
Vastaanottaja: Rahkonen Jukka (Tike)
Kopio: geoserver-devel@lists.sourceforge.net
Aihe: Re: [Geoserver-devel] WMS cascading fails with an ESRI server

On Fri, Nov 28, 2014 at 12:53 PM, Rahkonen Jukka (Tike) <jukka.rahkonen@…1245…> wrote:

Hi,

Captured from a gis.stackexchange question http://gis.stackexchange.com/questions/123754/problem-with-connecting-remote-wms-connection-to-geoserver, this WMS server can’t be cascaded with Geoserver.:
http://mapy.geoportal.gov.pl/wss/service/pub/guest/kompozycjaG2_TBD_WMS/MapServer/WMSServer?
The error is
Connection test failed: Content type is required for org.geotools.data.wms.response.WMSGetCapabilitiesResponse

I could not connect the service with OpenJUMP either. It gives an error
IOException: org.sax.SAXParseException; Premature end of life.

However, I can read GetCapabilities with browser and document was reported valid by a web service at xmlvalidation.com.

I studied with Fiddler what happens. Geoserver is sending the following request but gets never anything back. I could have something to do with the headers and ESRI server wants to get something more than it gets now

GET http://mapy.geoportal.gov.pl/wss/service/pub/guest/kompozycjaG2_TBD_WMS/MapServer/WMSServer?REQUEST=GetCapabilities&VERSION=1.3.0&SERVICE=WMS HTTP/1.1
Accept-Encoding: gzip
User-Agent: Java/1.7.0_67
Host: mapy.geoportal.gov.pl
Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Proxy-Connection: keep-alive

I cannot be sure, but “Accept: text/html, image/gif, image/jpeg, ; q=.2, /; q=.2" sounds like trouble, not sure what the "; q=.2” means, or the other one, but it may well be

that the server is not answering because text/xml is not matching any accepted content type?

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Fri, Nov 28, 2014 at 1:46 PM, Rahkonen Jukka (Tike) <
jukka.rahkonen@anonymised.com> wrote:

Thanks Andrea,

for encouragement. I did not know that I can solve it but I learned to
fiddle with the headers by using Firefox and Poster. The remote WMS server
there simply does not like Java as a user agent. This header yields an
empty response:

User-Agent: Java/1.7.0_67

This one yields good GetCapabilities

User-Agent: foo

I'm.... speachless :slight_smile:
Wondering if it's a general ESRI problem, or the manager of that particular
instance is feeling really funny these days...

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------