You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andrea Zoppello <zo...@tiscali.it> on 2008/03/26 13:32:06 UTC
Error in CXF Provider with MTOM XOP
I all,
I've a process like FILE(BC) -> EIP-Pipeline ( CXF-BC Provider ) ->
CONSOLE OUT ( StreamWriterComponent ).
Now my problem is that the cxf bc provider in the pipeline invoke a
webservice where the response contains mtom/xop.
The cxf pipeline fail in that case with an exception in class
CxfBcProviderMessageObserver anf the exception seem to be caused
bye the interceptor chain because they don't work well with multipart
message.
Any idea??
Andrea
Re: Error in CXF Provider with MTOM XOP
Posted by Andrea Zoppello <zo...@tiscali.it>.
Yes i've done the problem is in the class CxfBcProviderMessageObserver
in this two lines of code:
XMLStreamReader xmlStreamReader =
createXMLStreamReaderFromMessage(soapMessage);
soapMessage.setContent(XMLStreamReader.class, xmlStreamReader);
the code seem to expect a xml content for soap message so i've modified
in the following way:
if (contentType != null &&
contentType.toLowerCase().indexOf("multipart/related") == -1) {
XMLStreamReader xmlStreamReader =
createXMLStreamReaderFromMessage(soapMessage);
soapMessage.setContent(XMLStreamReader.class,
xmlStreamReader);
}
In that case the problem is solved, but by the way in the end of the
method when the content of soap message is
put on the normalized message the attachment are not copied so i need to
add other patch to the code.
Andrea
Freeman Fang ha scritto:
> Hi Andrea,
>
> Did you set mtomEnabled="true" for the provider configuration?
>
> Freeman
>
> Andrea Zoppello wrote:
>> I all,
>>
>> I've a process like FILE(BC) -> EIP-Pipeline ( CXF-BC Provider ) ->
>> CONSOLE OUT ( StreamWriterComponent ).
>>
>> Now my problem is that the cxf bc provider in the pipeline invoke a
>> webservice where the response contains mtom/xop.
>>
>> The cxf pipeline fail in that case with an exception in class
>> CxfBcProviderMessageObserver anf the exception seem to be caused
>> bye the interceptor chain because they don't work well with multipart
>> message.
>>
>> Any idea??
>>
>> Andrea
>>
>
>
Re: Error in CXF Provider with MTOM XOP
Posted by Freeman Fang <fr...@gmail.com>.
Hi Andrea,
Did you set mtomEnabled="true" for the provider configuration?
Freeman
Andrea Zoppello wrote:
> I all,
>
> I've a process like FILE(BC) -> EIP-Pipeline ( CXF-BC Provider ) ->
> CONSOLE OUT ( StreamWriterComponent ).
>
> Now my problem is that the cxf bc provider in the pipeline invoke a
> webservice where the response contains mtom/xop.
>
> The cxf pipeline fail in that case with an exception in class
> CxfBcProviderMessageObserver anf the exception seem to be caused
> bye the interceptor chain because they don't work well with multipart
> message.
>
> Any idea??
>
> Andrea
>