I started with an SOI project and attempting to create an interceptor that will take the contents of a map service (layer 1) and kludge some new attributes from some other JSON I have pulled in another request.
Which sample would be closest to what I'd like to attempt?
This YouTube Video is doing what I'd like but is in Java and not C# and I'm having difficulty understanding.
I have a simple SOI.sln setup and just starting to try and fill in the correct areas.
public byte HandleRESTRequest(string Capabilities, string resourceName, string operationName,
string operationInput, string outputFormat, string requestProperties, out string responseProperties)
responseProperties = null;
_serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".HandleRESTRequest()",
200, "Request received in Sample Object Interceptor for handleRESTRequest");
* Add code to manipulate REST requests here
// Find the correct delegate to forward the request too
IRESTRequestHandler restRequestHandler = FindRequestHandlerDelegate<IRESTRequestHandler>();
if (restRequestHandler == null)
var response = restRequestHandler.HandleRESTRequest(
Capabilities, resourceName, operationName, operationInput,
outputFormat, requestProperties, out responseProperties);
//I think I need to add something here to grab the existing JSON of the mapservice and then kludge the desired attributes into it
if (operationName.Equals("query") && resourceName.Equals("layers/1"))
//access the JSON of the map service here
//access the JSON of the 3rd party rest service result
//kludge the two together on the common attribute they share
// Capabilities, resourceName, operationName, operationInput,
// outputFormat, requestProperties, out responseProperties);