cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: How to determine whether a soap message have an attachment
Date Thu, 07 May 2009 01:26:38 GMT
Hi,

If we defer the creation of JMS Message until we know the Content-Type
for the client, we still need to flight with the miss configuration of
MTOM with TextMessage on the server side.

Current solution , I discussed with Liu Cong is if the MTOM is enabled,
CXF JMS transport will check the configuration of the JMS message type,
and make sure the JMS message type is BytesMessage, if not, the JMS
transport will throw an Exception for it.

Any thought?

Willem

Daniel Kulp wrote:
> On Wed May 6 2009 9:15:54 am Willem Jiang wrote:
>> Hi
>>
>> I think MTOM message should have the attachment info, we could check
>> that for it. We have some trouble to send the MTOM message if we send
>> the message in Text model, and Liu Cong is working on the patch.
> 
> Hmm....    the message won't have the attachment info at "prepare" time.   
> Whether to switch to mtom/mime or not is done later on, in the 
> AttachmentOutInterceptor.    The actual creation of the JMS message might need 
> to be deferred until the first call to write on the cached output stream or 
> something.   At that point, the Content-Type should be set to the mime version 
> and thus could be determined if it needs to be a binary message or not.
> 
> Dan
> 
> 
> 
>> Willem
>>
>> Daniel Kulp wrote:
>>> Doesn't it already support MTOM?
>>>
>>> Basically, it provides a OutputSteam to the dispatching and if the
>>> runtime needs to handle attachments and such, it will write it as mime
>>> stuff to the stream.
>>>
>>> Dan
>>>
>>> On Tue May 5 2009 12:53:48 am liucong wrote:
>>>> Hi all,
>>>>
>>>> When I want to add MTOM support for SOAP/JMS, I should know whether a
>>>> soap message have an attachment. But I don't know the details how to
>>>> judge wheter the message have an attachment.
>>>> Is anyone give me any prompt about where the code is? Or some code
>>>> example?
>>>>
>>>> Thank you very much.
>>>>
>>>> Best regards
>>>>
>>>> Liu
> 


Mime
View raw message