Dec 27th, 2010, 05:43 AM
Using multiple endpoint mappings in a single application
On a couple of subsequent projects now, I have needed to have multiple endpoints mappings (for different interceptor/security stacks) for different services within the same application.
In both cases, in order to achieve this using the PayloadRootAnnotationEndpointMapping and/or XmlRootElementEndpointMapping, I've had to implement my own endpoint mapper which extends AbstractMethodEndpointMapping to allow me to explicitly specify the target endpoint which I then provide to registerMethods() in my overridden initApplicationContext() method to 'force' the mapping to the intended endpoint.
Though this works fine for me, it feels like a common scenario (having multiple endpoints mappings for different services within the same application), which isn't provided for by the available mapping strategies. Common enough in fact, that I feel that I must be missing something... ?