Quantcast
Channel: SCN : Popular Discussions - Product Traceability & RFID
Viewing all articles
Browse latest Browse all 1203

TCP Connection to a Device Controller

$
0
0

Hello,

 

I need to write a standalone Java application that listens to some port, connects with the Device Controller, and interact with it over TCP. In the DC config file i got:

<Receiver id="rec1" description="First Receiver" protocol="TCP">
...<OptionList>     <opt:Name>TCPReceiver</opt:Name>     <opt:Address>localhost:9999</opt:Address></OptionList>

On port 9999 i got a Java ServerSocket listening for incomming connections. But the Device Controller wont connect. It says:

Feb 26, 2008 5:27:49 PM  ...cecontroller.messaging.XMLTransformer [Thread-2] Err
or: Error parsing message: com.inqmy.lib.xml.parser.ParserException: XMLParser:
No data allowed here:TYP (:main:, row:1, col:3)
Feb 26, 2008 5:27:49 PM  ...icecontroller.messaging.TCPConnection [Thread-2] Deb
ug: Incoming message was not ok: TYPE:DE

..which isn't helping me much!

 

The other option is to have the Receiver configured for communication over HTTP, with POST method, but then it wont connect, too. Besides, i think with POST it will be much more complicated - having to parse all those HTTP headers and stuff that normal servers do.

Over TCP it will be much more simpler, if I could only connect. Can someone explain me or give me a link to what i need to do to connect to the Device Controller over TCP?

 

Thank you for your time.

 

Edited by: Veselin Somlev on Feb 26, 2008 5:29 PM


Viewing all articles
Browse latest Browse all 1203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>