Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 29th, 2005, 7:57 AM   #1
tsunami
Newbie
 
Join Date: Jul 2005
Posts: 2
Rep Power: 0 tsunami is on a distinguished road
Communicating between delphi and java apps

i am currently working on a program that needs to communicate with a delphi program. i have goten the programs to connect, and have been able to send strings, but niether can read them. If anyone has any ideas on how to read the strings, please reply

edit: forgot to mention, im using the TCP protocol
tsunami is offline   Reply With Quote
Old Jul 29th, 2005, 8:10 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You have to use a format that both expect and understand. Your communications should also be in network byte order, which isn't a given. There isn't hardly any information in your post; not much more can be said.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 29th, 2005, 8:30 AM   #3
Cy4n-
Newbie
 
Join Date: Jul 2005
Location: Finland
Posts: 1
Rep Power: 0 Cy4n- is on a distinguished road
ok. heres some more information:

- TCP protocol, Java application as server, delphi application as client, using ICS and TClientSocket in delphi. (I mean, I tried both, both worked the same way)

- The data format is String. Both, client and server excepts it to be string.

- everything happens at localhost (doesen't really have anything to do with this)

So the problem: I activate the server, then connect client to it. Succesfull, both applications notify me that they are connected. Then, I try to send some strings from client to server, but nothing happens. The server should print received strings to console when it gets them, but nothing happens. Client application tells me that those strings have been sent from client, but server never gets them? Where is the problem? everything seems to be ok in the code.. i also tried java application as client, delphi application as server, same result.
Cy4n- is offline   Reply With Quote
Old Jul 29th, 2005, 8:39 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Are you the same person as the OP?? Alter ego or something? One personality for Java and another for Delphi? Inquiring minds want to know .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 29th, 2005, 8:42 AM   #5
tsunami
Newbie
 
Join Date: Jul 2005
Posts: 2
Rep Power: 0 tsunami is on a distinguished road
Quote:
Originally Posted by DaWei
Are you the same person as the OP?? Alter ego or something? One personality for Java and another for Delphi? Inquiring minds want to know .
lol, we both forgot to mention that we are working together he is doing the delphi part, im doing the java
tsunami is offline   Reply With Quote
Old Jul 29th, 2005, 9:28 AM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Debugging a program transcends the language used. It revolves around the examination of data. Some of that is contained in status information and more is contained in the contents of the application-specific variables. You say you have established a connection. That is a Good Thang. Some of the other information you supply is contradictory. One post implies that material is transferred but not successfully interpreted.
Quote:
...have been able to send strings, but niether can read them.
Another post implies that there is no transfer.
Quote:
Then, I try to send some strings from client to server, but nothing happens.
There is nothing for it but to examine the relevant entities. The difficulty in doing that will be determined by the tools you have at hand (e.g., can you view the packets directly?). It isn't unreasonable to hope that some respondent can say, "Oh, I had that problem, the frammis on the Delphi side won't mesh with the gazeetus on the Java side unless you do thus and such." Prollynottagonnahappen. Break the path of transfer down; do a binary search. Status and data okay in the middle of the chain? Move toward the point of failure by half the distance. Barring a lightbulb going off over someone's head, there just isn't going to be an alternative. You need to be able to say, "Okay, we're expecting this entity here to perform in such and such a way and it isn't. What gives?" The probability of a helpful answer when that entity is the whole shootin' match isn't terribly high.

Congratulations on not being a practicing schizophrenic, you had me wondering .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:11 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC