cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Reading Soap Headers / Bypass WSDL requests
Date Wed, 01 Feb 2012 14:52:17 GMT
On Wednesday, February 01, 2012 11:23:13 AM Michael PrieƟ wrote:
> Hi,
> I like to use dynamic routing based on a version number. So I extended
> a AbstractPhaseInterceptor<SoapMessage>
> How can I easily recieve the Version from the SoapMessage. Is there a
> Utility Class?

SoapMessage has a getVersion() method on it that returns a SoapVersion object 
that contains a bunch of version specific information on it.
> My interceptor is also called when I try to get a WSDL. Is there a way
> to bypass WSDL calls?

You would need to move your interceptor to the USER_PROTOCOL phase most 
likely.   In POST_STREAM, nothing from the stream has been read yet so we 
wouldn't even know the soap version in use.    Moving it to USER_PROTOCOL 
would also fix the WSDL issue as the WSDLGetInterceptor would have already run 
and stopped the chain.


> <soapenv:Header>
>   <version>2.0</version>
> </soapenv:Header>
> public MediatorInInterceptor() {
>  super(Phase.POST_STREAM);
>  addBefore(StaxInInterceptor.class.getName());
> }
> Regards,
> Michael
Daniel Kulp -
Talend Community Coder -

View raw message