lundi 19 septembre 2016

Spring WS: Multiple

I have a Spring-WS based project that has a number of actions that all do the same thing. Something like this:

    @SoapAction("http://ift.tt/2cWnItP")
    @ResponsePayload
    public Element MyAction(@RequestPayload Element payload, SoapMessage soapMessage) throws Throwable {
        return invokeFacade(payload, soapMessage);
    }

    @SoapAction("http://ift.tt/2ddvFgF")
    @ResponsePayload
    public Element MyAction(@RequestPayload Element payload, SoapMessage soapMessage) throws Throwable {
        return invokeFacade(payload, soapMessage);
    }

I would like to know if there is a way to simplify this? For example:

    @SoapAction("http://ift.tt/2cWnItP")
    @SoapAction("http://ift.tt/2ddvFgF")
    @ResponsePayload
    public Element MyAction(@RequestPayload Element payload, SoapMessage soapMessage) throws Throwable {
        return invokeFacade(payload, soapMessage);
    }

Or - perhaps, by being able to specify a method that gets the action as a parameter?




Aucun commentaire:

Enregistrer un commentaire