public interface IRESTRequestHandler
extends java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IID
Deprecated.
Internal use only
|
static int |
IID9d66a418_d54a_48ed_88bd_043a25fa9c83 |
static int |
xxDummy
Deprecated.
Internal use only
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSchema()
This method returns the resource hierarchy of a REST based SOE.
|
byte[] |
handleRESTRequest(java.lang.String capabilities,
java.lang.String resourceName,
java.lang.String operationName,
java.lang.String operationInput,
java.lang.String outputFormat,
java.lang.String requestProperties,
java.lang.String[] responseProperties)
Handles REST requests for SOE.
|
static final int IID9d66a418_d54a_48ed_88bd_043a25fa9c83
static final int xxDummy
static final java.lang.String IID
byte[] handleRESTRequest(java.lang.String capabilities, java.lang.String resourceName, java.lang.String operationName, java.lang.String operationInput, java.lang.String outputFormat, java.lang.String requestProperties, java.lang.String[] responseProperties) throws java.io.IOException, AutomationException
This method is invoked by ArcGIS Server's REST handler, which intercepts client's request (in URL form), parses it and passes it on to this method in form of parameter values.
The REST SOE developer must add logic to use these parameter values to determine which resource/operation is being requested and accordingly handle these requests and generate responses in the output format indicated by the "outputFormat" parameter. For more information on developing REST SOEs, please consult the Java ArcObjects Developer Guide.
Developer doc: Developing extensions > Server Object Extensions > SOE Web Services > REST Web Services > Developing SOE REST Web Services
Samples: Samples > Server Object Extensions section
capabilities
- The capabilities supported by the SOE. An admin can choose which
capabilities are enabled on a particular SOE (in ArcGIS Manager or ArcCatalog), based on certain criteria such as security roles.
This list of allowed capabilities is then sent to this method, at runtime, as a comma separated list. (in)resourceName
- Name of the resource being addressed. If empty, its assumed
that root resource is being addressed. (in)operationName
- Name of the operation being invoked. If empty, description of
resource is returned. (in)operationInput
- Input parameters, in form of comma separated list, to the operation specified by operationName parameter. (in)outputFormat
- OutputFormat of operation. Possible formats are JSON, HTML, AMF, etc. (in)requestProperties
- The requestProperties (in)responseProperties
- The responseProperties (out)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.java.lang.String getSchema() throws java.io.IOException, AutomationException
For an SOE that has a root resource (called "root") with one operation ("operation0"), and 2 sub-resources with one operation each ("operation1" and "operation2" respectively), the schema would look like:
{
"name": "MyRESTSOE",
"description": "My REST SOE with 3 resources and 1 operation each.",
"isCollection": false,
"operations": [
{
"name": "operation0",
"parameters": ["param01"],
"supportedOutputFormats": ["json"]
}
],
"resources": [
{
"name": "subresource1",
"description": "Sub Resource 1",
"isCollection": true,
"operations": [
{
"name": "operation1",
"parameters": ["param10", "param11"],
"supportedOutputFormats": ["json"]
}
]
},
{
"name": "subresource2",
"description": "Sub Resource 2",
"isCollection": true,
"operations": [
{
"name": "operation2",
"parameters": ["param20", "param21"],
"supportedOutputFormats": ["json"]
}
]
}
]
}
java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.