Select to view content in your preferred language

How to customize SOE Operation uritemplate?

1963
2
09-06-2011 12:01 AM
wangzhifang
Frequent Contributor
Hi everyone,
As far as I learned, SOE can be thought is composed of Resources and Operations.
Resources, as read only properties, has the following uri format:
.../exts/mysoe/myresource/subresource1/subsubresource2

while Operations, as methods, has the following uri format:
.../exts/mysoe/myoperation?param1=xxx&param2=xxx

My question is, is it possible to write a SOE Operation which has a Resource like uri? Such as:
.../exts/mysoe/myoperation/param1value/param2value

I know it's possible to use UriTemplate to change uri template of a REST service in .NET Framework. Is there something like UriTemplate in SOE too?

Now I want to write a SOE, which is planed to serve ArcGIS API for Javascript/Flex/Silverlight, as an ArcGISTiledMapServiceLayer. Because the request of a tile image must be "....MapServer/Tile/level/row/column", I have to write an SOE Operation which has three parameters, level, row and column. So the uri of the SOE Operation has to be like this:
.../exts/mysoe/outputtileoperation/level/row/column

Specifically to "...MapServer/Tile/x/x/x", is the Tile an REST Operation or lots of sub Resources?

I know there's other way to achieve this, like write custom layer in client api, but for some reasons I need this to be done in SOE.

Any suggestion will be appreciate
0 Kudos
2 Replies
RichardWatson
Deactivated User
As you know, the SOE extension machine is not terribly flexible.

One alternative you have is to provide a proxy.  You can send your request to the proxy in any form that it understands and have it forward the request, rewriting it as needed, to your SOE.

A great example of this is what we do in 9.3.1.  In 9.3.1 you cannot extend the SOE using REST but we do.  How do we do it?  What we do is to send the REST request to the proxy which performs a SOAP call and then returns the results.  This gives us the same REST interface in 9.3.1 and 10.0.
0 Kudos
wangzhifang
Frequent Contributor
As you know, the SOE extension machine is not terribly flexible.

One alternative you have is to provide a proxy.  You can send your request to the proxy in any form that it understands and have it forward the request, rewriting it as needed, to your SOE.

A great example of this is what we do in 9.3.1.  In 9.3.1 you cannot extend the SOE using REST but we do.  How do we do it?  What we do is to send the REST request to the proxy which performs a SOAP call and then returns the results.  This gives us the same REST interface in 9.3.1 and 10.0.

Hi rlwatson, thanks for your reply.
I've been aware it's possible to use a proxy in web server to redirect request to one soe operation in my situation. However, the additional proxy breaks the convenient structure of soe...
I wish the uri template of a soe operation can be customized to suite our needs.
0 Kudos