Hi everyone,

I'm relative new to the subject of Webservice and JMS programming. So i ran
into many problems which i eventually could solve. But now there is
something i do not understand. 

On serverside i've got a byte[] which is passed to the client via
DataHandler. On the serverside (length = 176844) when the array get through
on the clientside per

mtomIn = (InputStream) handler.value.getContent();
byte[] byteArray=org.apache.commons.io.IOUtils.toByteArray(mtomIn);

the byte[] length = 304977 and the File is corruted. Anybody an idea?

Thank you in advance!

My beans.xml:

<bean id="jmsConnectionFactory"
                
class="org.springframework.jms.connection.CachingConnectionFactory">
                <property name="targetConnectionFactory">
                        <bean 
class="org.apache.activemq.ActiveMQConnectionFactory">
                                <property name="brokerURL" 
value="tcp://localhost:61616" />
                        </bean>
                </property>
        </bean>


        <bean id="jmsConfig" 
class="org.apache.cxf.transport.jms.JMSConfiguration"
                p:connectionFactory-ref="jmsConnectionFactory"
p:targetDestination="webmediator.query.queue" />


        <bean id="jmsConfigData"
class="org.apache.cxf.transport.jms.JMSConfiguration"
                p:connectionFactory-ref="jmsConnectionFactory"
p:targetDestination="webmediator.data.queue" />


        <jaxws:endpoint xmlns:tns="http://web.biba.de/"; id="webmediator"
                implementor="de.biba.web.WebMediatorImpl"
endpointName="tns:WebMediatorImplPort"
                serviceName="tns:WebMediatorImplService" address="jms://">
                <jaxws:features>
                        <bean class="org.apache.cxf.feature.LoggingFeature" />
                        <bean 
class="org.apache.cxf.transport.jms.JMSConfigFeature"
                                p:jmsConfig-ref="jmsConfig" />
                </jaxws:features>
        </jaxws:endpoint>


        <jaxws:endpoint xmlns:tns="http://web.biba.de/"; id="webmediatorData"
                implementor="de.biba.web.WebMediatorDataImpl"
endpointName="tns:WebMediatorDataImplPort"
                serviceName="tns:WebMediatorDataImplService" address="jms://">
                <jaxws:features>
                        <bean class="org.apache.cxf.feature.LoggingFeature" />
                        <bean 
class="org.apache.cxf.transport.jms.JMSConfigFeature"
                                p:jmsConfig-ref="jmsConfigData" />
                </jaxws:features>
                <jaxws:properties>
                        <entry key="mtom-enabled" value="true" />
                </jaxws:properties>
        </jaxws:endpoint>




--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-ActiveMQ-MTOM-Problem-tp5713418.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to