You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jason Pell <ja...@pellcorp.com> on 2015/10/14 00:02:31 UTC
Adding SoapAction to Service Model without changing java code or WSDL
Hi,
If I wanted to be able to get a soap action (that is the same as the
operation name) into the service model via an interceptor or other such
would it be possible.
We have a Web App which has CXF client code, and a Server Side which has
CXF service code.
I have a client who is facading one of our services in order to intercept
some operations for logging.
Our Web App -> Client Middle Ware -> Our Service
Their middle ware is tibco, which apparently requires a SoapAction to work
correctly. We don't currently use SoapAction and I don't want to go and
change all my code to handle it.
What I have come up with so far, is a new client side interceptor to add a
SoapAction based on the operation name (executed after
SoapPreProtocolOutInterceptor).
I was just going to add an interceptor server side to remove the Soap
action before it was checked, but it would be better if I could get it
added into the in memory service model, so it does match, and will also
appear in the ?wsdl
is this possible, and where might I start
Re: Adding SoapAction to Service Model without changing java code or WSDL
Posted by Jason Pell <ja...@pellcorp.com>.
I managed to resolve it myself.
https://github.com/pellcorp/JavaFirst/blob/cxf27/JavaFirst/src/main/java/com/pellcorp/server/interceptor/SoapActionFeature.java
Add this to both the client and server, works perfectly.
On Wed, Oct 14, 2015 at 9:02 AM, Jason Pell <ja...@pellcorp.com> wrote:
> Hi,
>
> If I wanted to be able to get a soap action (that is the same as the
> operation name) into the service model via an interceptor or other such
> would it be possible.
>
> We have a Web App which has CXF client code, and a Server Side which has
> CXF service code.
>
> I have a client who is facading one of our services in order to intercept
> some operations for logging.
>
> Our Web App -> Client Middle Ware -> Our Service
>
> Their middle ware is tibco, which apparently requires a SoapAction to work
> correctly. We don't currently use SoapAction and I don't want to go and
> change all my code to handle it.
>
> What I have come up with so far, is a new client side interceptor to add a
> SoapAction based on the operation name (executed after
> SoapPreProtocolOutInterceptor).
>
> I was just going to add an interceptor server side to remove the Soap
> action before it was checked, but it would be better if I could get it
> added into the in memory service model, so it does match, and will also
> appear in the ?wsdl
>
> is this possible, and where might I start
>