The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Call a dll and read the responding data

Posted by Fredrik on December 18, 2001 at 4:18 AM

I,m trying to connect to an URL that points on a dll, and read the string that the dll returns. I have tryed to use the URL class and the URLConnection but when I try to connect to the URL I get a SocketException [java.net.SocketException: setsockopt() TCP_NODELAY (code 10055)]. If I type the URL with the nessesary parameters in the browser, the dll response and the result (a string) are shown in the browserwindow. How can I do this from a servlet? If anyone could help me out, I would be more than happy.

Here is the code I have tryed:

URL url = new URL("http://www...com/../the.dll?key1=val1&...");

ObjectInputStream in = new ObjectInputStream(url.openStream());

String strResponse = (String)in.readObject();

Thanks in advance.

/Fredrik



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us