Hi,
I'm trying out the openid4java library and using the sample
ConsumerServlet as my consumer, however I'm having problems setting
the proxy so all requests go through the proxy (I'm on my office PC
and need a proxy host/port configured, but no authentication
required).
I've uncommented the proxy setup section in the
ConsumerServlet.authRequest method which fixes the problem for _some_
requests. However, I was still getting a connection refused error when
the ConsumerServlet.verifyResponse method was called, so I then added
the proxy settings at the beginning of this method - but these appear
to be being completely ignored (see the stack trace at bottom of this
message).
Does anyone have any ideas what I need to do to get the proxy
recognised for all the http requests? I've seen the other posts in
this group about the proxy but none of these seemed to fix this
particular problem. I've found that if i hard code the proxy settings
into the HttpClientFactory then all works fine - but this obviously
isn't really a great solution!
Any help much appreciated!
Cheers,
Alex
ps.for info the code also runs fine on a server in our DMZ that
doesn't need the proxy setting - but I can't really do all my
development on that machine :-(
Stack trace:
-------------------------------------------------------
18-Dec-2007 16:09:30 org.openid4java.consumer.ConsumerManager call
SEVERE: Error talking to
http://pip.verisignlabs.com/server response
code: -1
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.create
Socket(ReflectionSocketFactory.java:139)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.c
reateSocket(DefaultProtocolSocketFactory.java:124)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java
:706)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$Http
ConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt
pMethodDirector.java:386)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe
thodDirector.java:170)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:396)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:324)
at
org.openid4java.consumer.ConsumerManager.call(ConsumerManager.java:59
3)
at
org.openid4java.consumer.ConsumerManager.verifySignature(ConsumerMana
ger.java:1723)
at
org.openid4java.consumer.ConsumerManager.verify(ConsumerManager.java:
1167)
at
org.openid4java.samples.consumerservlet.ConsumerServlet.verifyRespons
e(ConsumerServlet.java:249)
at
org.openid4java.samples.consumerservlet.ConsumerServlet.doGet(Consume
rServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadP
ool.java:684)