Hello. I was wondering if any of you can please help me with this problem.
I am trying to use a tcp-outbound-gateway to communicate with a TCP server using a specified format.
I'm currently trying to do an integration test on this client using the tcp-inbound-gateway as a stand-in for the actual tcp server (because an instance of the actual server is not available to us at the moment).
The problem is... I'm getting a "socket is closed" exception on my test case. What am I missing here?
Below are the configuration files for the test case:
server configuration
client configurationCode:<int:channel id="bytesToStringChannel"/> <int:channel id="silverlakeChannel"/> <int:channel id="errorChannel"/> <int-ip:tcp-connection-factory id="silverlakeConnectionFactory" type="server" pool-size="5" port="8787"/> <int-ip:tcp-inbound-gateway id="silverlakeGateway" connection-factory="silverlakeConnectionFactory" request-channel="bytesToStringChannel" reply-channel="silverlakeChannel" error-channel="errorChannel"/> <int:transformer id="serverBytes2String" input-channel="bytesToStringChannel" output-channel="silverlakeChannel" expression="new String(payload,${casa.message.encoding})"/> <int:service-activator input-channel="silverlakeChannel" ref="silverlakeService" method="process"/> <bean id="silverlakeService" class="com.ucpb.tfs.silverlake.SilverlakeService"/>
Code:<int-ip:tcp-connection-factory id="casaConnectionFactory" host="localhost" port="8787" type="client" single-use="true" pool-size="5" so-timeout="10000" serializer="casaSerializer" deserializer="casaSerializer" /> <int-ip:tcp-outbound-gateway connection-factory="casaConnectionFactory" request-channel="casaRequestChannel" reply-channel="casaResponseChannel" request-timeout="10000" reply-timeout="10000"/>


Reply With Quote