I would use one controller for this resource that interacts with the context-based service layer (type or type of media received or requested - SOAP, JSON, XML, etc.) So you have a really uniform resource identifier that can receive and return various types of media, and the controller does not need to know anything except what method the user wants to execute on which resource and in what type of media.
For example, perhaps the service level returns objects that have methods such as "toXml", "toSoap", or "toJson". Then you can simply ask the service level to do anything and use the switch statement on the requested media type to either return the requested information or display the 406 Not Acceptable status code by default. For unsafe or idempotent transactions, an object may have constructor or factory methods for this type of media, and then you simply request that the service level do something with this object.
source share