12-26-2012 01:49 AM
How to establish or Implemented TLS Connection with Post and Get method?
There are any option for SetRequestProperty into TLS?
How to get RequestCode into TLS?
Solved! Go to Solution.
12-27-2012 01:04 AM
For security purpose means ?
You were calling any web service or what ?
If you told your proper idea that what you want to do then I can try to help you.
01-06-2013 02:30 PM - edited 01-06-2013 02:32 PM
Going by this, and your other post on this Thread:
I think you are confused about what is going on here.
I'm not an expert, but as I understand it, the various TCP/IP protocols are layered.
At the bottom is the socket connection, which if course you can open using a URL that starts
Now if the other end of your communication is a socket server, this is what you need.
(Actually I say socket connections are at the bottom, conveniently forgetting UDP connections. In fact I think a socket connection is built on top of a UDP connection, but we can ignore this for this discussion)
Above that is http:\\. And if you open an HTTP connection, you will open it with an HTTP server. But an HTTP connection is actually a socket connection with some helpful methods. You could actually open a socket connection to a HTTP server and as long as you send the right things on the socket and understand what the HTTP server is sending back to you, then you could communicate quite happily. A while ago, I think I did this in one application where I needed to send a request header that I couldn't generate any other way.
The trouble with both these approaches is that the data is sent insecurely. So to provide securely, the appropriate internet bodies decided to invent a secure socket layer - SSL - as the secure form of socket, and HTTPS which was the secure form of HTTP and would be transmitted over SSL. So if you opened a connection with HTTPS, instead of creating a socket connection to the HTTP server, the processing will create a secure socket (SSL) connection.
And then they decided SSL could be improved and created TSL.
But you don't actually care. All you do is open an https:\\ connection to the appropriate server and it will sort out the correct secure socket layer protocol. If you want to find out what is actually being used, you can - see the
of your HTTPS connection.
So if you need to call a web service that is secure, then just use https:\\ and the correct port (usually 443) and the rest will take care of itself.
Does this clarify the problem?
01-06-2013 02:37 PM
Thanks for reply me.
But actully i need below infomation
-> Into Https we call webserivce into GET and POST.And also set some methode like setReqeustProperty and SetRequestMethod.
So into TLS how to do?
01-06-2013 06:33 PM
As noted, not an area of expertise, but this is what I understand. You don't use TLS. You use HTTPS. The Web Server implements this with TLS..
So you do an HTTPS connection to the Web Server. Under the covers, it will use the TLS socket level security. But because you have established an HTTPS Connection, which is like an HTTP Connection, you use the HTTP GET and POST methods, and you can setRequestProperty.
01-07-2013 12:10 AM
Please check attachement.
There are difference to pass parameter into Https and TLS.But there are not mention that how to setRequestProperty and method into TLS.
01-07-2013 04:51 AM
I'm sorry, you are asking the same question a different way - it appears I am not able to explain this to you.
Possibly this is because in fact I am wrong in what I think - as I keep noting, this is not an area of expertise. But what I am telling you is what I believe to be correct and I have researched this.
The code sample provided by Mark Sohm, does NOT use HTTPS. It provides 3 different socket level connections. None of the connections support setRequestProperty().
HTTPS and HTTP are protocols that exist on top of socket level connections. They support setRequestMethod.
You seem to have the idea stuck in your head that you should be able do a use the setRequestMethod() on a TLS Connection. You can't. You can only do this to a connection established using the HTTP or HTTPS protocol.
Since you seem to be stuck at this point, I suggest a different starting point. Go back to the people providing the Web Service you are trying to use and ask how other users are using this service. Are they establishing HTTPS connections? Is this Web Service a socket or HTTP server?