This is a proxy service that communicates using JSON-RPC and accepts POST request JSON-data in UTF-8 encoding, not counting this text :) Also accepts standard WMS-requests with an extra param = sessionid. So this html-page is shown because you either was curios or you used an invalid sessionid in your WMS-request.
A request should look like this:
{
method: string,
params: [],
sessionid: string,
id: null
}
The method property should be one of the supported ones described below.
For this service, all methods should assume that the first element in the params property array should be a JSON object.
The sessionid property is a custom extension to JSON-RPC that validates all requests against a session database. The sessionid is a GUID string.
The id property should always be null for this service, since it's not used. But is has to be included since it's mandatory in the JSON-RPC spec. This also applies to the response.
A response should look like this:
{
result: {},
error: {},
id: null
}
The result property is null if an error has occured and vice verca. The actual contents of the result object depends on what kind of request is processed and is documented below.
All errors are reported as a response with an error object describing what went wrong, unless the server has critical errors that makes even running the the service impossible.
The error property is always a JSON-object and has the following structure:
{
errorcode: int,
errorsubcode: int,
errormessage: string,
exceptionmessage: string,
innerexceptionmessage: string
}
NOTE: The exception related properties are not mandatory for release builds of this service.
The errorcode property could be used in client code to handle specific errors in nice ways. The possible generic error codes are these:
| Name | Code | Description |
|---|---|---|
| Undefined | 0 | |
| RequestTypeNotSupported | 1 | The request wasn't a HTTP POST |
| ContentTypeNotSupported | 2 | MIME-data must be set to application/json |
| JSONRPCInvalid | 3 | The request doesn't seem to follow JSON-RPC |
| MethodUnknown | 4 | The supplied method name isn't supported |
| SessionIDUndefined | 5 | No sessionid found in request |
| SessionIDNotValid | 6 | Session id could not be validated with database |
| ResponseException | 7 | Request was valid but an error occured while processing the request |
The errorsubcode property categorises errors that might occur when proccessing a request and is defined by the method implementation. The generic error code will in this case be a "ResponseException". If the request method documentation doesn't specify any error subcodes then assume this property will be null.
The object passed as the first parameter should have the following structure:
{
PlaneringID: int
}
The PlaneringID property will be used to look up errands from SKS webservice.
The result object will have the following structure:
{
errands: [{
(field) : (value)
...
}, {
...
}]
}
The errands array contains objects with properties and for each field in the SKS webservice datatable result.
The object passed as the first parameter should have the following structure:
{
errandids: jarray (string, like "[32523,235133,56632,...]")
}
The errandids property will be used to get the corresponding geometry from a WFS server.
The result object will have the following structure:
{
errands: [{
gml: string
}, {
...
}]
}
The errands object contains properties gml
The gml string is from geoserver and can be parsed by a WFS/GML compliant parser.
The object passed as the first parameter should have the following structure:
{
personid: int
}
The personid property will be used to look up estates from SKS webservice and their geometry from a WFS server.
The result object will have the following structure:
{
estates: [{
gml: string
(field) : (value)
...
}, {
...
}]
}
The estates array contains objects with properties gml and for each field in the SKS webservice datatable result.
The gml string is from geoserver and can be parsed by a WFS/GML compliant parser.
The object passed as the first parameter should have the following structure:
{
skifteid: string
}
The skifteid property will be used to get the corresponding geometry from a WFS server.
The result object will have the following structure:
{
plannings: [{
gml: string
}, {
...
}]
}
The plannings object contains properties gml
The gml string is from geoserver and can be parsed by a WFS/GML compliant parser.
The object passed as the first parameter should have the following structure:
{
PlaneringID: int
}
The PlaneringID property will be used to look up plannings from SKS webservice.
The result object will have the following structure:
{
Plannings: [{
(field) : (value)
...
}, {
...
}]
}
The Plannings array contains objects with properties and for each field in the SKS webservice datatable result.
The object passed as the first parameter should have the following structure
{
Name: string,
NS: double,
EW: double
}
The Name string contains the prefix and name of the layer to identify in. I.e: sks:MINSKOGUTV.SKS.SKSBIOTOPSKYDD. Note that both prefix and name is case-sensitive.
The NS and EW is the point (latitude - Northing and longitude - Easting) to identify.
The result object will have the following structure:
{
features : [
[{
name: string,
value: string
},
{
...
}
],[
...
]
}]
}
The features array contains one array for each feature that is identified in the request. Each of those arrays contains name and value of the attributes of the feature.
The object passed as the first parameter should have the following structure
{
tabId:string
}
The tabId string contains the id of the tab to get content for.
The result object will have the following structure:
{
header:string,
infotext:string,
boxes:[
{
title:string,
infotext:string,
button:
{
text:string,
action:string/function
}
}
]
}
The header string is displayed over the infoboxes.
The infotext string is also displayed over the infoboxes (in fact, it is displayed over the header)
The boxes array contains configurations for the infoboxes to be displayed in the tab
A box-item contains a title string to be displayed in the panels header, an infotext string that is to be displayed inside the infobox as well a button object
The button object contains a text string to be displayed on the button and an action string/function to be executed on button-click. This string is evaluated to javascript on clientside.
The object passed as the first parameter should have the following structure:
{
sprakid: int
}
The sprakid is sent to the SKS webservice to indicate language. 1 = swedish.
The result object will have the following structure:
{
attributes: [{
(attributid): (visatext)
... (additional attributid from the SKS webservice)
}, {
...
}]
}
The attributes array contains objects where the properties corresponds to "attributid" in SKS webservice and the value is "visatext".