aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Need to implement persistent SSL in java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Need to implement persistent SSL in java" Watch "Need to implement persistent SSL in java" New topic
Author

Need to implement persistent SSL in java

Ice T.
Greenhorn

Joined: Mar 15, 2004
Posts: 1
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.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

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!


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Need to implement persistent SSL in java
 
Similar Threads
HttpUrlConnection - cXML PunchOutSetupRequest
Some of you are experts this could be your next problem!
sending HTML form data using java code
HttpURLConnection - Luanch Browser
Java Http Server and Java Http Client