I just set up a Python routine to do this, but it's using the Union function which very easily locates 'donuts' by uninioning only the 1 layer and closing gaps, and then searching for a missing attribute that the 'donuts' wouldn't have. You could set up a geoprocessing service to return the polygons with donuts, but that might be more than you are looking for.
My next thought was that it would be in the 'rings' attribute of the Polygon object. There should be a different ring for the inner 'donut' so if you parse out the separate rings and look for one being contained by the other you could determine that an 'inner cavity' existed.
Thank you for your answer! I didn't find the right "rings" from v418 Polygon object, but the old version(v411 or earlier) could implement the holes.
I solved the problem with a geoprocessing service,thank you.
Not sure what the question is, but you should be able to find the interior ring by using the isClockwise(...) method.
Thank you for your answer! I found that two rings in the opposite direction can form holes.