I have an SOE applied to a MapServer that works just fine and has been for a while. There is a custom RestOperation created for it inside of the CreateRestSchema() call that sets up the handler and calls into our logic.

Now we have created an SOI that should handle the the typical export, identify, etc operations to make some modifications to the operationInput inside of the HandleRESTRequest method. This also works just fine.

The problem is that when we apply both the SOE and the SOI the SOE is never reached. I've put code inside of the SOE's HandleRESTRequest to tell it to not do any processing when the request is supposed to go to the SOE, but unfortunately that doesn't seem to help.

I assume there is something that I need to do get the CreateSchema() call in the SOI to pull info from the SOE or somehow pass the request into the SOE, but I haven't found any documentation indicating how that is done.

Any thoughts? My SOI is basically a copy of any of the Esri sample SOIs with a little bit of logic in the HandleRestRequest, so no need to post that code. And since it never gets into the SOE, I'm also not posting that code. (Plus, I'm not allowed to.)

  • SOE and SOI attach at different points. I doubt you can both to work together. BTW: You really do need to provide code to get help with it, but it should be so stripped down that there would be no problem releasing it. – Vince Aug 18 '18 at 2:00
  • I was able to get it to work together and will post an answer explaining how. – Jeff Machamer Aug 19 '18 at 18:56

I did finally get it to work and it was my mistake. In this sample: https://github.com/Esri/arcobjects-sdk-community-samples/blob/master/Net/Server/ServerLayerAccessSOI/CSharp/NetLayerAccessSOI/NetLayerAccessSOI.cs

You can see that they always get a new instance of the handler:

IRESTRequestHandler restRequestHandler = _restServiceSOI.FindRequestHandlerDelegate<IRESTRequestHandler>();

I don't recall why, but we were caching this object during the Init() call. Once we stopped caching it, the FindRequestHandlerDelegate changed which request handler was used based on the context of the request and enabled our SOE to get called after the SOI was finished processing request.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.