You won't be able to send raw data to remoting server using socket transport for a few reasons (i.e. using java.net.Socket instead of org.jboss.remoting.Client). The main reason is that the remoting server expects a remoting InvocationRequest object to be sent on the wire (and will reject data if not of this type). One of the reasons this is required is that remoting needs the extra data contained within the InvocationRequest object so it can process the request (such as subsytem so knows which handler to route the request to).
Thank you very much for your reply.
Actually I have to write a service that response concurent socket connections from different type of clients (other development platforms that I can't control) which will send plain text.
Is there any way to do it in JBoss or will I have to write a service from scratch?
Please note that recent changes to the socket invoker (available on HEAD in CVS) allow it to read input data not wrapped in an InvocationResponse. See, in particular, org.jboss.remoting.transport.socket.ServerThread.processInvocation().
As Ron stated, this is now allowed with the current code base in CVS (but not yet released, but will be in 2.2.0.Alpha3 release within next week or so). Can see http://jira.jboss.com/jira/browse/JBREM-604 for more info.