WMS to Layer File wrapped into a live Geoprocessing Tool?

Discussion created by ryan.clark on Jun 12, 2012
Hi -

Using ArcObjects and C#.NET, I've written a function that, given the URL for a WMS, returns a layer file pointing at that WMS. I'm interested in exposing that functionality through a geoproccessing service on ArcGIS Server, and I'm trying to find out if that's even possible.

Ideally then, the tool would work in such a way that an AJAX request (which includes the WMS URL) could be sent to the geoprocessing service, and the response would be a layer file to download.

Does that make sense and seem feasible? Has anyone done something similar? Any suggestions how to get started wrapping existing ArcObjects into geoproccessing tools would be appreciated.