I have a requirement to implement an API using .NET technologies. The protocol is "plain old XML" (POX) over HTTP. There are 6 API calls, but all delivered from the same URI. The API method is identified by a "method" attribute in the top-level XML element. The child XML elements in the request and response depend on which method is being invoked.
For example:
<req method="GetStuff"><id>42</id></req>
might give response
<resp method="GetStuff"><Thing name="Bob"/></resp>
Or:
<req method="Status"><verbose>false</verbose></req>
might give response
<resp method="Status"><status>OK</status></resp>
I've considered WCF - I can see that following the example for a REST API I can easily get XML serialised and deserialised but cannot see an obvious way to get the method attribute to map to separate ServiceContract
methods. I could also consider MVC but would need to mess about in the MVC pipeline somewhere to map the method to the appropriate Action.
Suggestions please?