|
Description:
|
Between bindings and services, there should be a possibility of mapping between operations, to further differentiate bindings from service implementations.
From IRC:
<gaYak> umm, I must be blind, but I can't find this from the FSW documentation, nor from SwitchYard docs. How do I change the target service operation in the RestEasy gateway?
<gaYak> ContextMapper? Change QName from Composer? or..?
<kcbabo> gaYak: the operation name is set based on the JAX-RS interface
<gaYak> Yes, but I'd like to change that 
<gaYak> Because otherwise I would pollute my service with binding details
<gaYak> So I have two JAX-RS interfaces for "more-resty-behaviour", but I'd want them to call only one Service method, since I have to do a composer POJOing anyway
<gaYak> http://pastebin.com/ZPs9dE9L this sort of thing
<gaYak> If I have to add to the service interface "findModifier(..)" which would just call getModifiers and then .get(0), then that's sort of .. why having the Service interface
at all.
<kcbabo> gaYak: the JAX-RS interface is essentially the binding mapping
<kcbabo> it's binding configuration
<kcbabo> the service interface should be distinct
<kcbabo> although it is true with this approach that the operations themselves must match
<kcbabo> IOW, whatever is in one is reflected in the other
<gaYak> Yeah, I get the idea, that's why I wanted to know how they're really separated 
<kcbabo> it would be an interesting enhancement to allow a sort of custom mapper
<kcbabo> so we have operation <-> operation in our default mapper
<kcbabo> but allow the user to inject their own mapper
<gaYak> Worth a proposal ticket?
<kcbabo> strictly speaking, we might be able to do something with operationSelector here
<kcbabo> we never considered it before because the operation name was part of the binding config already
<kcbabo> but your use case is a bit different
<kcbabo> yes, definitely worth a ticket
<kcbabo> if we reuse the existing operation selector stuff, it should be pretty easy to bang out
<gaYak> I'm not able to trigger that in any way currently?
<kcbabo> at present, there's only the default mapping, AFAIK
<kcbabo> I don't think RESTEasy bindings support operationSelector right now
|