好吧,我知道如果我创建 /My/predefined/URL/?request=GetCapabilities 我会找到哪种服务类型,但是有没有更快的方法,比如 GetServiceType?
实际上,请求未知服务类型的 GetCapabilities 响应是无效的,因此如果您可以这样做,那么您的服务必须以某种方式预设服务参数。
要确定您的服务是否是 WMS,您需要:
/My/predefined/URL/?request=GetCapabilities&service=WMS&
要确定您的服务是否是 WFS,您需要:
/My/predefined/URL/?request=GetCapabilities&service=WFS&
要确定您的服务是否是 WCS,您需要:
/My/predefined/URL/?request=GetCapabilities&service=WCS&
SOS、CSW、WPS、WMTS 相同...
如果服务属于指定类型,您将收到 GetCapabilities 响应,否则您将收到如下异常:
<?xml version='1.0' encoding="UTF-8" ?>
<ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wcs/1.0.0/OGC-exception.xsd">
<ServiceException code="InvalidParameterValue" locator="request">msWCSDispatch(): WCS server error. WCS request not enabled. Check wcs/ows_enable_request settings.
</ServiceException>
</ServiceExceptionReport>
请注意,服务端点完全有可能/My/predefined/URL/?
拥有多种可用的服务类型。