[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [iaik-ssl] HttpsURLConnection giving ClassCastException in Weblogic



If you want to run Isasilk under Weblogic https enabled version. Try the following code.

      uri = new URL(null, urlString, new iaik.protocol.https.Handler());
      con = (iaik.protocol.https.HttpsURLConnection) uri.openConnection();

This should help you to run Isasilk code without modifying the weblogic properties.

Thanks,
Dinesh Kumar Damodaran.



"Shashi Kiran H" <hskiran@icope.com> wrote:

>Hi
>
>I am using iSaSiLk3.03, for HttpsConnection.As shown in the demo example
>if i cast URLConnection to iaik.protocol.https.HttpsURLConnection.
>During the execution of this code, on the weblogic console i see the
>following exception:
>
>java.lang.ClassCastException: weblogic.net.http.HttpURLConnection
>        at
>CoCoNet.multiweb.mobilebanking.push.connector.SMSConnector.postURL(SMSConnec
>tor.java)
>        at
>CoCoNet.multiweb.mobilebanking.push.connector.SMSConnector.getResponseSMSReq
>uest(SMSConnector.java)
>        at
>CoCoNet.multiweb.mobilebanking.push.connector.SMSConnector.push(SMSConnector
>.java)
>        at
>CoCoNet.multiweb.mobilebanking.push.servlet.PushServlet.doGet(PushServlet.ja
>va)
>        at
>CoCoNet.multiweb.mobilebanking.push.servlet.PushServlet.doPost(PushServlet.j
>ava)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>        at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:105)
>        at
>weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
>l.java:742)
>        at
>weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
>l.java:686)
>        at
>weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
>Manager.java:247)
>        at
>weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
>        at
>weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
>        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>And the code is as follows:
>
>HttpsURLConnection urconnection = null;
>System.getProperties().put("java.protocol.handler.pkgs", "iaik.protocol");
>urconnection=(HttpsURLConnection)url.openConnection();//HERE class cast
>exception
>SSLContext context = new SSLClientContext();
>urconnection.setSSLContext(context);
>urconnection.setDoInput(true);
>urconnection.setDoOutput(true);
>DataOutputStream dout=new DataOutputStream(urconnection.getOutputStream());
>dout.writeBytes(toBePosted);
>dout.flush();
>dout.close();
>
>Does anyone know the solution for this.
>
>Thanks in advance
>
>Regards
>Shashi
>
>
>--
>Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html
>
>To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-ssl
> 
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-ssl