All,
When you deploy a Java Code using java.net.URL object in weblogic server, on opening a connection using URL object, instead of getting the standard javax.net.ssl.HttpsUrlConnection it will return weblogic.net.http.SOAPHttpsURLConnection
Even if you try to type cast it, you will get class cast exception as these 2 classes are not compatible. You may not like to use the weblogic.net.http.SOAPHttpsURLConnection class also as the method signature is different
To overcome the issue, a simple replacement of the code below would work
Instead of creating a URL object using standard constructor like
URL wsURL = new URL(wsLoc + “?command=login”);
Use
java.net.URL wsURL = new URL(null, wsLoc + “?command=login”,new sun.net.www.protocol.https.Handler());
The above code does solve the ClassCastException problem in WebLogic. It helped me in a situation where I needed to make a thin web service client to connect to a Client cert authenticated SSL web service interface on WebLogic 9.2. The bad side is that if the System-wide SSL provider changes, the code will most likely break, since it is dependent on the SUN’s implementation.
Thanks a ton. This helped!!
Thanks for this really valuable tip!
thanks!
thx u so much!!! It’s really valuable…
Howdy would you mind stating which blog platform you’re working with? I’m looking to start my own blog soon but I’m having a tough time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique.
P.S Sorry for being off-topic but I had to ask!
Hi, It is wordpress
Thanks. This actually had solved a very big issue for me. thanks a lot again
Thanks!
I spent a day trying to solve this problem. Thanks !!!
This helped me out, thanks for your post!
awesome fix …
I was recomended this website by mу cousin. ӏ’m not
sure wҺether tɦis post is written Ƅy him as no ߋne elsе
кnow ѕuch detaqiled about mу trouble. Υou’гe amazing!
Ƭhanks!
TҺanks foг finally talking аbout >Using javax.net.ssl.HttpsUrlConnection іn weblogic server | Venky’s Blog <Liked it!
Your method of explaining all in this article is actually good, every one be capable of easily understand it, Thanks a lot.
I’m impressed, I muist ѕay. Rarely Ԁo Ӏ come ɑcross а blog that’s both equally educative andd іnteresting, and lеt me tеll you, yοu
hаve hit the nail oon tɦe head. Ҭhe problem iѕ аn issue that
not enough people aree speaking intelligently abօut. I am ѵery happy that Ι foսnd
this in myy hunt for something relating to this.
Your style is unique in comparison to other folks I have read stuff
from. Thanks for posting when you have the opportunity, Guess I will just bookmark this blog.
Thanks Venkatesan for this post it helped me to resolve my problem. I spent a day trying to resolve this problem.
awesome fix.
you are the man, thanks bro it works perfectly with jdeveloper wls.