Claus Ibsen-2 wrote:
>
> Gert V. is the export on this matter. I will try to get his attention.
>
>
>> My route-config (simplified):
>>
>>
>> from("jbi:endpoint:http://biz.accelsis.swm/InboundRoutingService/EDIFileInEndpoint")
>> .intercept(new StreamCachingInterceptor())
>> .process(new DataProcessor(new SyntaxCheckProcessor(),
>> DataProcessor.BODY_TO_BODY))
>> .multicast()
>> .to("direct:ctrl", "direct:main");
>>
>> from("direct:ctrl")
>> .intercept(new StreamCachingInterceptor())
>> .process(new DataProcessor(new
>> ExtractionProcessor("/envelope/control/data"))
>>
>> .to("jbi:endpoint:http://biz.accelsis.swm/FileOutService/ContrlOut");
>>
>> from("direct:main")
>> .to("jbi:endpoint:http://biz.accelsis.swm/FileOutService/SapOut");
>>
>> I believe that i need the StreamCachingInterceptor because i send a
>> message
>> containing a stream-body via multicast to two endpoints. My tests show
>> that
>> if the first one (direct:ctrl) reads the message, the stream is used and
>> can
>> not be read again by endpoint two (direct:main). But somehow, i tried
>> multiple tests with the StreamCachingInterceptor, but none of them is
>> working.
>
>
Thank you. I think i can provide some more details of ServiceMix' output.
During deploy, if i use a global "streamCaching();" option, it says:
WARN - ProcessorType - Interceptor
StreamCachingInterceptor currently wraps target
Delegate(biz.accelsis.servicemix.swm.sw
[EMAIL PROTECTED]) is attempting to change target
Delegate(biz.accelsis.servicemix.swm.swm_camel_su.processors.Data
[EMAIL PROTECTED]) new wrapping has been denied.
Is that a problem?
The final exception appears when the jbi-file component (2nd endpoint of
multicast) tries to use the message:
ERROR - FileComponent - Error processing exchange InOnly[
id: ID:172.18.18.44-11db411e419-2:16
status: Active
role: provider
endpoint: SapOut
in: Unable to display: javax.xml.transform.TransformerException:
java.io.IOException: Stream closed
]
javax.jbi.messaging.MessagingException:
javax.xml.transform.TransformerException: java.io.IOException: Stream closed
at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageContent(DefaultFileMarshaler.java:153)
at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessage(DefaultFileMarshaler.java:82)
at
org.apache.servicemix.file.FileSenderEndpoint.processInOnly(FileSenderEndpoint.java:86)
at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)
...
I guess that means that the stream is already used.
Thanks for your help in advance.
--
View this message in context:
http://www.nabble.com/StreamCachingInterceptor-question-tp20561886s22882p20577708.html
Sent from the Camel - Users mailing list archive at Nabble.com.