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.
Dan
>
> <soapenv:Header>
> <version>2.0</version>
> </soapenv:Header>
>
> public MediatorInInterceptor() {
> super(Phase.POST_STREAM);
> addBefore(StaxInInterceptor.class.getName());
> }
>
> Regards,
>
> Michael
--
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com