URI
<root_uri>/webprinting[.<format>]
SuperMap iServer 启动后,Web 打印服务模块的默认 REST 服务访问 URI 为:http://<server>:8090/iserver/services/webprinting/rest/webprinting。
Supported methods
Parent resource
Child resources
Introduction
webPrinting 资源表示 Web 打印服务的入口,通过对 webprinting 资源执行 GET 请求,能够得到 SuperMap iServer Web 打印服务支持的所有接口版本资源。
Supported methods:
- GET:获取 Web 打印服务支持的所有接口版本资源。
- HEAD:检查 webPrinting resource exists, or if there is permission to access webPrinting 资源。
Supported output formats:RJSON、JSON、HTML、XML。
GIS Services Resource Hierarchy
HTTP Request Methods
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。
http://supermapiserver:8090/iserver/services/webprinting/rest/webprinting.rjson
GET 请求
获取 Web 打印服务支持的接口版本资源列表。
Response structure
对 webPrinting 资源执行 GET 请求,在响应体里是一个接口版本资源描述集,其中单个接口版本资源描述的结构如下:
| 字段 | 类型 | 说明 |
| resourceConfigID | String | 资源配置项 ID。 |
| supportedMediaTypes | String | 支持的媒体类型。 |
| path | String | 接口版本资源的访问路径。 |
| name | String | 资源的名称。 |
| resourceType | String | 资源类型。 |
Example of response
对示例 webPrinting 资源:http://supermapiserver:8090/iserver/services/webprinting/rest/webprinting.rjson,执行 GET 请求,返回 rjson 格式的资源描述如下:
[
{
"resourceConfigID": "v1",
"supportedMediaTypes": null,
"path": "http://192.168.120.40:8091/iserver/services/webprinting/rest/webprinting/v1",
"name": "v1",
"resourceType": null
}
]
HEAD 请求
Returns the same HTTP response headers as a GET request, but without the response body. This allows retrieving meta-information from the response headers without transporting the entire content. The meta-information includes the media type,字符编码,压缩编码,实体内容长度等。
A HEAD request can be used to check if webPrinting 资源是否存在,或者客户端是否有权限访问 webPrinting 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 webPrinting 资源是否支持<format>格式的表述。