cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Intercepting SOAP Message when using JMS Transport
Date Fri, 04 Jan 2013 22:05:12 GMT

On Jan 4, 2013, at 3:48 PM, Larry Presswood <lpresswood@me.com> wrote:

> I tried using the stream interceptor when using CXF configured with JMS Transport but
it seems that
> 
> boolean isOutbound = false;
>         isOutbound = message == message.getExchange().getOutMessage()
>                || message == message.getExchange().getOutFaultMessage();
> 
>         if (isOutbound) {
>             OutputStream os = message.getContent(OutputStream.class);
> 
> os is null when using jms but not when using straight http 
> 
> both are soap
> 
> is this a bug or doe i need to intercept in a different stream
> 
> i can see in the code where the message is being put into a JMSMessage but don't seem
to find a way to intercept handily like with HTTP
> 
> Any ideas or examples?

Are you using a text JMS message or binary JMS message?   If using a Text message, we keep
it as a string and provide a Reader instead to avoid a lot of String -> byte[] -> String
type conversions.   Try:

Reader r = message.getContent(Reader.class);

or switch the JMS setup to use binary messages.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message