Hi all,

I am trying to receive a binary file from a directory and send it to a JMS
queue. Next, I want to receive that (soap-marshalled) content from jms and
store it in another directory. Unfortunately, it does not work, since it
appears that the file written to the target directory is a little bit
shorter than the original file.

Any help is greatly appreciated.

Thanks in advance.

Martin

PS: Please note that we are running servicemix using the jboss deployer. JMS
implementation is JBossMQ.


                        <sm:activationSpec componentName="filePoller"
                                service="foo:filePoller" 
destinationService="foo:jmsFileIn">
                                <sm:component>
                                        <bean
                                                
class="org.apache.servicemix.components.file.FilePoller">
                                                <property name="file" 
value="d:/tmp/wmreader" />
                                                <property name="period" 
value="5000" />
                                                <property name="marshaler">
                                                        <bean
                                                                
class="org.apache.servicemix.components.util.BinaryFileMarshaler">
                                                                <property 
name="contentType"
                                                                        
value="application/octetstream" />
                                                        </bean>
                                                </property>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>

                        <sm:activationSpec componentName="jmsFileIn">
                                <sm:component>
                                        <jms:component>
                                                <jms:endpoints>
                                                        <jms:endpoint 
service="foo:jmsFileIn"
                                                                
endpoint="endpoint" role="provider" destinationStyle="queue"
                                                                
processorName="jca" jndiDestinationName="queue/C"
                                                                
jndiConnectionFactoryName="java:/JmsXA" soapVersion="1.2"
                                                                soap="true" />
                                                </jms:endpoints>
                                        </jms:component>
                                </sm:component>
                        </sm:activationSpec>

                        <sm:activationSpec componentName="jmsFileOut">
                                <sm:component>
                                        <jms:component>
                                                <jms:endpoints>
                                                        <jms:endpoint 
service="foo:jmsFileOut"
                                                                
targetService="foo:fileWriter" endpoint="endpoint"
                                                                role="consumer" 
processorName="jca"
                                                                
bootstrapContext="#bootstrapContext"
                                                                
resourceAdapter="#jbossMQResourceAdapter"
                                                                
connectionFactory="#managedJmsFactory"
                                                                
defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
                                                                
synchronous="true" soap="true">
                                                                
<jms:activationSpec>
                                                                        <bean
                                                                                
class="org.jboss.resource.adapter.jms.inflow.JmsActivationSpec">
                                                                                
<property name="destination"
                                                                                
        value="queue/C" />
                                                                                
<property name="destinationType"
                                                                                
        value="javax.jms.Queue" />
                                                                        </bean>
                                                                
</jms:activationSpec>
                                                        </jms:endpoint>

                                                </jms:endpoints>
                                        </jms:component>
                                </sm:component>
                        </sm:activationSpec>

                        <sm:activationSpec componentName="fileWriter"
                                service="foo:fileWriter">
                                <sm:component>
                                        <bean
                                                
class="org.apache.servicemix.components.file.FileWriter">
                                                <property name="directory"
                                                        value="d:/tmp/outbox" />
                                                <property name="marshaler">
                                                        <bean
                                                                
class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
                                                </property>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>

-- 
View this message in context: 
http://www.nabble.com/Binary-soap-content-in-jms-tf2287318.html#a6353367
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to