stack trace:
java.lang.RuntimeException: java.io.IOException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:602)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.ge tResponseCode(DashoA12275)
at com.meterware.httpunit.HttpWebResponse.readResponseHeader(HttpWebRespons e.java:147)
at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java: 185)
at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:53)
at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java: 61)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 125)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:141)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 127)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:99)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:86)
at net.sourceforge.jwebunit.HttpUnitDialog.gotoPage(HttpUnitDialog.java: 977)
at net.sourceforge.jwebunit.WebTester.gotoPage(WebTester.java:973)
at net.sourceforge.jwebunit.WebTestCase.gotoPage(WebTestCase.java:400)
at org.Guanxi.ShibbolethAccessTest.testAccess(ShibbolethAccessTest.java: 28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.jav a:57)
at junit.textui.TestRunner.start(TestRunner.java:172)
at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Text TestRunner2.java:23)
at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUn itStarter.java:97)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java: 31)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Da shoA12275)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:626)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLCon nection.java:1504)
at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.ge tHeaderFieldKey(DashoA12275)
at com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java: 201)
at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java: 183)
... 32 more
Caused by: sun.security.validator.ValidatorException: No trusted certificate found
at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator .java:304)
at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.ja va:107)
at sun.security.validator.Validator.validate(Validator.java:202)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Das hoA12275)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Das hoA12275)
... 45 more
java.lang.RuntimeException: java.io.IOException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:602)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.ge tResponseCode(DashoA12275)
at com.meterware.httpunit.HttpWebResponse.readResponseHeader(HttpWebRespons e.java:147)
at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java: 185)
at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:53)
at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java: 61)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 125)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:141)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java: 127)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:99)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:86)
at net.sourceforge.jwebunit.HttpUnitDialog.gotoPage(HttpUnitDialog.java: 977)
at net.sourceforge.jwebunit.WebTester.gotoPage(WebTester.java:973)
at net.sourceforge.jwebunit.WebTestCase.gotoPage(WebTestCase.java:400)
at org.Guanxi.ShibbolethAccessTest.testAccess(ShibbolethAccessTest.java: 28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25)
at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.jav a:57)
at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Text TestRunner2.java:23)
at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUn itStarter.java:97)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java: 31)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Da shoA12275)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:626)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLCon nection.java:1504)
at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.ge tHeaderFieldKey(DashoA12275)
at com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java: 201)
at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java: 183)
... 32 more
Caused by: sun.security.validator.ValidatorException: No trusted certificate found
at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator .java:304)
at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.ja va:107)
at sun.security.validator.Validator.validate(Validator.java:202)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Das hoA12275)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Das hoA12275)
... 45 more
at net.sourceforge.jwebunit.HttpUnitDialog.gotoPage(HttpUnitDialog.java: 979)
at net.sourceforge.jwebunit.WebTester.gotoPage(WebTester.java:973)
at net.sourceforge.jwebunit.WebTestCase.gotoPage(WebTestCase.java:400)
at org.Guanxi.ShibbolethAccessTest.testAccess(ShibbolethAccessTest.java: 28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java: 31)
On 9 Mar 2005, at 14:39, Nick Neuberger wrote:
I'm not sure. Maybe someone else in the mailing list has done the same thing.
I'm not familair with using the https portion of httpunit or using the
"shibboleth SP/IdP"
that you mentioned. On the httpunit side, I know you have to integrate some
SSL portion.
Can you send the complete stacktrace? I'm not sure which jwebunit method is
being called.
See Ya,
Nick
-----Original Message----- From: Alistair Young [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 4:34 AM To: Nick Neuberger Cc: [email protected] Subject: Re: [Jwebunit-users] getDialog
I now use:
beginAt("/");
getDialog().getWebClient().getClientProperties().setAutoRedirect(true) ;
gotoPage("/secure/secure.php");
assertTitleEquals("Authenticator");
however, gotoPage results in a redirect from http -> https on a different server/domain and produces the error:
java.lang.RuntimeException: java.io.IOException at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt pURLConnec tion.java:602) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272) at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection OldImpl.ge tResponseCode(DashoA12275)
what I'm doing is writing some tests for a shibboleth SP/IdP interaction, where /secure/secure.php is protected .htaccess style by shibboleth, so you get redirected to your IdP for authentication.
is what I'm trying to do possible with jwebunit?
thanks, Alistair
On 8 Mar 2005, at 19:49, Nick Neuberger wrote:
The beginAt method needs to be called first. This willinitialize theafter thedialog.
I would recommend moving that line into your "test" methodsbeginAt() method is called.
Actually, in our superclass we implemented an "authenticateApplication()" method called at the setUp() method.
////////////////////////////////// public void setUp() throws Exception { super.setUp(); getTestContext().setBaseUrl("http://localhost:8080");
authenticateApplication(); }
public void authenticateApplication() { beginAt("/ims/servlet/Login? COLLABORATION=login&OPERATION=display&TARGET=hom e");
//your line of code after the beginAt.
getDialog().getWebClient().getClientProperties().setAutoRedire ct(true);reading now.
assertTitleEquals("IMS Login");
setFormElement("userId", getUserId()); setFormElement("password", getUserPass());
//submit("login-button"); submit();
assertTitleEquals("Ims Home");
}
//////////////////////////////////////
Hope this Helps, HTH.
Nick
-----Original Message----- From: Alistair Young [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 10:43 AM To: [email protected] Subject: [Jwebunit-users] getDialog
Hello folks, I'm trying to follow redirects by using:
public class Test extends WebTestCase { public void setUp() throws Exception { super.setUp(); getTestContext().setBaseUrl("http:/somesite.org");
getDialog().getWebClient().getClientProperties().setAutoRedire ct(true); } }
but getDialog always returns null
is there something I'm missing?
thanks, Alistair
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Startindividual orhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
- - - - - - This e-mail message is intended only for the use of thedisclosure orentity identified in the alias address of this message and may contain confidential and privileged information. Any unauthorized review, use,distribution of this e-mail message is strictly prohibited.If you havereading now.received this e-mail message in error, please notify the sender immediately by reply e-mail and delete this message from your system. Thank you.
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Starthttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
- - - - - -
This e-mail message is intended only for the use of the individual or entity
identified in the alias address of this message and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution of this e-mail message is strictly prohibited. If you have
received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message from your system. Thank you.
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
