unknown protocol: https!

For the foolowing codeURL url = new URL("https://orders4.xxx.com/cgi-bin/vfpwebn.exe/xx");I will get the following runtime error:MalformedURLException: java.net.MalformedURLException: unknown protocol: https
How can I connect to secure protocol?
homeira_amirkhaniAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jpk041897Commented:
https is not supported dirrectly by java since it requires authorization. You can still ac4ess the pages though using http and code to access secure web pages.

The code to access such a page is rather large and is documented in the previously answered questionsection of this forum under:

  5/5/97  20 Retrieval of URL with authorization            rhee

Take a look at  the contents (I suggest you print the info iin that page since it comes out to about 10 printed pages).

Let me know if the inffo contained there is enough for your purposes, otherwise we can look at additionul alternatives.






 
0
pc012197Commented:
Of course java can access https: URLs. Well, it depends on the VM. Netscape does it. HotJava probably doesn't.

0
homeira_amirkhaniAuthor Commented:
I looked at the sources provided by "jpk". Good resources but  they were all talking about how to access cgi (post) using URLConnection etc. but I did not see anything for https or SSL. I understand that that accessing SSL is not trivial and require writing classes to handle that protocol. But my problem is the starting point, I can not create a valid URL from the address https://... to proceed and use URLConnection and so on. Also I test hotjava it has also have problem connecting to https://... I looked at the known bugs of HotJava and it has"The HotJava Browser cannot connect to certain SSL3 sites. In particular, it cannot connect to sites using X.509 certificates with some newer encodings for X.500 names, such as those using IA5 (ASCII) strings. (4039466)"then I think "pc" is right it is the matter of VM. but I don't know how I can access Netscape VM. It has only some dll files.I also find "Java SSL implementation" in Gamelan which I could not access it (the URL did not work). As soon as I get that and test it I will let you know if it helps. Apprently it uses SSLeay which is the security layer of Netscape.By the way if you have a good answer just let me know and I will increase the points. It is just that I am afraid it will leave unansweed and I loose those points.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

jpk041897Commented:
No, you don't loose the points. If you provide the answer yourself, no one provides a valid answer, or the question is unanswerable, you can cancel the question by posting a request to do so in the customer support forum of Experts Exchange. You the recover your points.
0
homeira_amirkhaniAuthor Commented:
Where is that customer support to cancel the question. I looked at edit question there is no option to cancel. Neither is in my customer info.
I don't know where should I post sucha cases.

0
jpk041897Commented:
Login at the home page:

http://www.experts-exchange.com/topics/

on the lower right you will find a forum called costumer service.

In that forum, post a question offering 0 points requesting that your points be canceled and giving the reason as the text of the question. State that you found out the solution on your own and give a reference (forum question, author and points) to which question you wish to cancel.
0
jpk041897Commented:
You might want to check out:

http://www.phaos.com/solutions.html

They have a toolkit there that seems to support evrything you want.
0
mwwhiteCommented:
Call the method createURLStreamHandler from the  java.net.URLStreamHandlerFactory class. You pass it a string containing the protocol name (i.e. "https") and it will allow you to create URL's with the https protocol.

   Example call:
   createURLStreamHandler("https");

0
homeira_amirkhaniAuthor Commented:
java.net.URLStreamHandlerFactory is an interface so far I have not able to find any class to implement that interface. If you mean I have to write a class to implement this interface then my problem still remains. IF you have ever done that meaning successfully connected to https and was able to retrive data I appreciate more help.
0
homeira_amirkhaniAuthor Commented:
java.net.URLStreamHandlerFactory is an interface so far I have not able to find any class to implement that interface. If you mean I have to write a class to implement this interface then my problem still remains. IF you have ever done that meaning successfully connected to https and was able to retrive data I appreciate more help.
0
ajchenCommented:
Check out BDK1.0 from Sun.  It's Bean Development Kit 1.0.  You can create your own "URLStreamHandlerFactory".  The javadoc was wrong in saying that you could use this class.  Basically, you need to set up your System Property that points to your own protocol.

For example, look under bdk1.0/beanbox/sun/beanbox.  Go to simpleresource directory and check it out.  Your implementation of https protocol is probably straight-forward by just forwarding contents back and forth since you shouldn't be dealing with SSL itself.

Hope this helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.