3

The following WPS request successfully styles a png when the png is served over http.

<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
    <ows:Identifier>ras:StyleCoverage</ows:Identifier>
    <wps:DataInputs>
        <wps:Input>
            <ows:Identifier>coverage</ows:Identifier>
            <wps:Reference mimeType="image/${fileFormat}" xlink:href="${process.env.PROTOCOL}://${process.env.SERVICES_HOST}:${process.env.PORT}/${filename}" method="GET"/>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>style</ows:Identifier>
            <wps:Reference mimeType="text/xml; subtype=sld/1.1.1" xlink:href="${process.env.PROTOCOL}://${process.env.GEOSERVER_HOST}/geoserver/wms?request=GetStyles&amp;layers=${layerName}&amp;service=wms&amp;version=1.1.1" method="GET"/>
        </wps:Input>
    </wps:DataInputs>
    <wps:ResponseForm>
        <wps:RawDataOutput mimeType="image/${fileFormat}">
            <ows:Identifier>result</ows:Identifier>
        </wps:RawDataOutput>
    </wps:ResponseForm>
</wps:Execute>

However when I change the png to be served over https (${process.env.PROTOCOL} === https) I get the following response from geoserver:

<ows:ExceptionText>Failed to retrieve value for input coverage
    sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    unable to find valid certification path to requested target</ows:ExceptionText></ows:Exception></ows:ExceptionReport></wps:ProcessFailed></wps:Status></wps:ExecuteResponse>

Any ideas if https is supported as a process input? I don't see it listed here.

  • @Mapperz I'm already successfully able to load a wms request over https from geoserver. I'm only now getting this issue when trying to use https inside a wps:reference of a wps request. – apricity Dec 13 '17 at 19:05
2

The error reports Java could not validate the SSL certificate: "unable to find valid certification path to requested target"

This can be due to a variety of issues, the most common one being self signed certificates, or certificates issued by a authority that the Java runtime does not recognize. Options to try out (did not try them myself, cannot vouch for them):

Hope this helps

  • I had been working on getting ssl working in tomcat which didn't fix the problem. Then I tried the instructions in your second bullet which worked. Do you know if correct ssl config in tomcat makes any difference to geoserver or if it only cares about the java keystore? – apricity Dec 14 '17 at 19:07
  • I believe only the second matters, SSL in Tomcat is for allowing other apps to connnect to Tomcat via SSL – Andrea Aime Dec 15 '17 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.