Issue accessing web application over SSL using httpunit

Rohit Soni <[email protected]> Sat, 20 Mar 2010 21:48:40 -0700 (PDT)
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Hi,

I am using httpunit api to access a web url on SSL , the web application is deployed on Websphere 7.0 . I am getting the following exception

Rhino classes (js.jar) not found - Javascript disabled
> IBMJSSEProvider2 Build-Level: -20080630
> setting up default SSLSocketFactory
> class com.ibm.websphere.ssl.protocol.SSLSocketFactory is loaded
> Mar 20, 2010 11:33:39 AM null null
> WARNING: WSVR0072W
> Mar 20, 2010 11:33:40 AM null null
> WARNING: WSVR0072W
> Mar 20, 2010 11:33:40 AM null null
> WARNING: WSVR0072W
> Mar 20, 2010 11:33:40 AM null null
> WARNING: WSVR0072W
> Mar 20, 2010 11:33:40 AM null null
> INFO: ssl.disable.url.hostname.verification.CWPKI0027I
> instantiated an instance of class com.ibm.websphere.ssl.protocol.SSLSocketFactory
> java.lang.NullPointerException
>        at com.ibm.websphere.ssl.protocol.SSLSocketFactory.createSocket(Unknown Source)
>        at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:8)
>        at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:8)
>        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:972)
>        at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnection.java:2100)
>        at com.ibm.net.ssl.www2.protocol.https.b.getHeaderFieldKey(b.java:73)
>        at com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java:255)
>        at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:237)
>        at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:57)
>        at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:68)
>        at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:83)
>        at com.meterware.httpunit.WebClient.createResponse(WebClient.java:647)
>        at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:220)
>        at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:181)
>        at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158)
>        at com.meterware.httpunit.WebClient.getResponse(WebClient.java:122)
>        at TestSSL.main(TestSSL.java:13)
> Exception is java.lang.NullPointerException
> 


The client application code looks like

String url ="https://adc2100845:7583/wsm-enforcement-ssl_jaxws/SSLPolicyMethodServlet?user=wasadmin&password=welcome1&javax.net.ssl.trustStore=%2Fade%2Frosoni_was_view%2Fjeetest%2Ffunctional%2Fowsm%2Fdev%2Fcommon%2Fssl-keystores%2Fmytruststore.jks&result_as_object=true&baseurl=https%3A%2F%2Fadc2100845%3A7583&CLIENT_CONFIG_DIR=%2Fade%2Frosoni_was_view%2Foracle%2Fwork%2Futp%2Fbuildout%2Ffunctional%2Fowsm%2Fwsm%2Fenforcement%2Fssl%2Fstage%2Fresources&method=testJaxWsWssUsernameTokenOverSSLPort_CorrectCredentials";
>> 
>>       WebConversation conversation = new WebConversation();
>>       WebRequest request = new GetMethodWebRequest(url);
>>       WebResponse response = conversation.getResponse(request);
>> 

Can anyone tell me whats the causeof NullPointerException.

Thanks and regards
Rohit Soni


      

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev