Vish recently wrote about calling AGS SOEs via SOAP instead of DCOM. He doesn’t mention that AGS doesn’t make you use SOAP, nor XML for that matter. This low-tech JSON-RPC invoker shows the proof-of-concept:
public string HandleStringRequest(string Capabilities, string request){
MethodCall mc = JavaScriptConvert.DeserializeObject<MethodCall>(request);
object result = this.GetType().GetMethod(mc.name).Invoke(this, mc.parameters);
return JavaScriptConvert.SerializeObject(result);
}
public string test(string str1, string str2){
return str1 + str2;
}
class MethodCall{
public string name;
public object[] parameters;
}
Here’s an action shot…

November 26, 2008 at 6:18 pm |
[...] previously shown using reflection to allow loosely-coupled method invocation in ArcGIS Server Object Extensions, but reflection is wicked slow. I knew that people were writing ORM binding using IL op-codes, [...]
April 8, 2009 at 5:38 am |
Hi,
Great post.
What is the better way to handle internet resource at the SOE level.
How would SOE work, if we publish as a SOAP?
Do we have any example for that besides http://rexdotnet.blogspot.com/ ?
Thanks,
Abhi.