• Post Reply Bookmark Topic Watch Topic
  • New Topic

Urgent: Socket problem when calling java function from Web Page

 
Sean McGurk
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks!
I have found a java program that sends SMS (text message) alerts to mobile phones. Now, when I run this program on its own (i.e. through a main method), there are no problems. The message is sent correctly and the result code, indicating whether or not the message was sent and if not, why not is returned.
However, when I try and call the 'sendSMS' method from an ASP page, (by saving the class file in the c:\Windows\Java\Trustlib directory) the program fails with an UnknownHostException error at the line:
Socket socket= new Socket(ADDRESS, PORT);
The strange thing is this only happens on certain machines. On other machines, the data is sent okay. Does anyone know why this is and if so, how I can go about correcting this?
Thanks in advance,
Sean
p.s. If anyone would like the java program I would be more than happy to supply it.
[This message has been edited by Sean McGurk (edited June 06, 2001).]
 
Srikanth Remani
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I think the problem is with the "ADDRESS" part and the Network status of the machines which are not running the Code successfully...
I am not sure but a rational guess....
I think more details may help you
cheers
Srikanth
Originally posted by Sean McGurk:
Hi folks!
I have found a java program that sends SMS (text message) alerts to mobile phones. Now, when I run this program on its own (i.e. through a main method), there are no problems. The message is sent correctly and the result code, indicating whether or not the message was sent and if not, why not is returned.
However, when I try and call the 'sendSMS' method from an ASP page, (by saving the class file in the c:\Windows\Java\Trustlib directory) the program fails with an UnknownHostException error at the line:
Socket socket= new Socket(ADDRESS, PORT);
The strange thing is this only happens on certain machines. On other machines, the data is sent okay. Does anyone know why this is and if so, how I can go about correcting this?
Thanks in advance,
Sean
p.s. If anyone would like the java program I would be more than happy to supply it.
[This message has been edited by Sean McGurk (edited June 06, 2001).]

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!