Hi,
I continue this discussion http://sourceforge.net/p/geoserver/mailman/message/32853923/
I have made a test service for reproducing the error at https://karttakuva-testi.mmmtike.fi/cgi-bin/mmm_julkinen_wms?service=wms&version=1.3.0&request=getcapabilities
username/passwd: foobar/foo
I apologize that the site has a self-signed sertificate that must be added to the jre keystore but I tried to be helpful by attaching the certificate chain.
Cascading of this server fails because for resolving the schema of GetCapabilities response Geoserver (or Geotools) must make a new request and this time it forgets to include the basic auth username and password which leads to “401 Unauthorized”. I believe that this happens with all Mapservers if they are secured with basic auth and WMS 1.3.0 should be used. Cascading as WMS 1.1.1 works because then the GetCapabilities does not contain the GetSchemaExtension part.
Some log follows.
26 Feb 11:20:43 WARN [xml.resolver] - Unexpected response “401 Unauthorized”
while downloading https://karttakuva-testi.mmmtike.fi/cgi-bin/mmm_julkinen_wms?service=WMS&version=1.3.0&request=GetSchemaExtension
at org.geotools.xml.resolver.SchemaResolver.resolve(SchemaResolver.java:207)
at org.geotools.xml.SchemaFactory.resolveSchema(SchemaFactory.java:372)
at org.geotools.xml.SchemaFactory.getRealInstance(SchemaFactory.java:323)
at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java:309)
at org.geotools.xml.handlers.ElementHandlerFactory.startPrefixMapping(ElementHandlerFactory.java:88)
at org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:371)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:134)
at org.geotools.data.wms.response.WMSGetCapabilitiesResponse.(WMSGetCapabilitiesResponse.java:58)
at org.geotools.data.wms.WMS1_0_0$GetCapsRequest.createResponse(WMS1_0_0.java:234)
at org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:427)
at org.geotools.data.wms.WebMapServer.issueRequest(WebMapServer.java:419)
at org.geotools.data.ows.AbstractOpenWebService.negotiateVersion(AbstractOpenWebService.java:260)
at org.geotools.data.ows.AbstractOpenWebService.(AbstractOpenWebService.java:110)
at org.geotools.data.wms.WebMapServer.(WebMapServer.java:382)
at fi.nls.test.GtParser.main(GtParser.java:42)
-Jukka Rahkonen-
(attachments)
karttakuva-testi.mmmtike.fi.txt (1.43 KB)
TikeTESTIRootCA2009.txt (1.79 KB)
TikeTESTIServerCA2011.txt (1.81 KB)