I need to send data from a client app to a IIS webserver. I have set in my code all the necessary stuff needed for persistent ssL, but the socket still closes. I have used both jdk1.3 and jdk1.4 but to no avail. Here's a sample of my code : ========================================================= HttpURLConnection con = (HttpURLConnection)new URL(urlAddress).openConnection(); con.setRequestProperty ("Authorization", "Basic " + encoding); con.setRequestMethod("POST"); con.setRequestProperty("HTTP-Version", "HTTP/1.1"); con.setRequestProperty ("Content-Type", "application/xml"); con.setRequestProperty ("Connection", "Keep-Alive"); con.setRequestProperty("Proxy-Connection", "Keep-Alive"); con.setRequestProperty ("Content-Length", ""+xmlStr.length()); con.setDoInput(true); con.setDoOutput(true); con.setUseCaches(false); con.connect(); =========================================== After that, I open a outputstream, then I write an xml to that url, then I close the stream, and open a reader stream to read the reply. That's basically it. I did a check on the netstat log, and find out the socket always closes, and its initiated by my app not the IIS webserver. Can anybody help? Thanks in advance.
author and iconoclast
Hi Mr. T, Welcome to JavaRanch! We don't have too many rules round these parts, but we do have our naming policy, which requires that your display name not be an obviously fictitious name (even if you were the famous entertainer, his name is obviously fictitious, so we wouldn't let him use it either!) Pleae head over here and update yours, pronto. Thanks, pardner!