Re: axis call now gives java.net.SocketTimeoutException
Re: axis call now gives java.net.SocketTimeoutException
- Subject: Re: axis call now gives java.net.SocketTimeoutException
- From: "Jerry W. Walker" <email@hidden>
- Date: Thu, 6 Apr 2006 09:16:34 -0400
Hi, Baiss,
On Apr 5, 2006, at 11:13 PM, Baiss Eric Magnusson wrote:
I make the following call, which used to work,
String endpoint = "http://services.xmethods.com:80/soap";
org.apache.axis.client.Call call = (org.apache.axis.client.Call)
service.createCall();
call.setOperationName( new javax.xml.namespace.QName
( "urn:xmethods-delayed-quotes", "getQuote" ));
...
Float ret = (Float) call.invoke( new Object[] { stockSymbol } );
and the <call.invoke> throws a <java.net.SocketTimeoutException>.
I upped the JavaMonitor <Lifebeat Interval> to <300> and still get
the error, I used to be able to run most of the time with an
interval of <60>.
I'm not able to test on the development machine as the
<call.invoke> throws a
(502) Proxy Error
so there must be some setup done on the MacOSX server that is not
done on a simple MacOSX box.
I would suggest logging the requests and responses to find out where
the holdup is occurring. You can do this with TCPMonitor, but I've
found it easier to simply log them through the server app. If you
with to do the latter, try adding the following code to your WO
Application class's constructor method:
String theResponse;
theResponse = System.getProperty("DisplayHeaders");
displayHeaders = ("true".equals(theResponse) || "YES".equals
(theResponse));
LOGGER.debug("displayHeaders = " + ( displayHeaders ? "YES" :
"NO" ));
theResponse = System.getProperty("DisplayHeaderContent");
displayHeaderContent = ("true".equals(theResponse) ||
"YES".equals(theResponse));
LOGGER.debug("displayHeaderContent = " +
( displayHeaderContent ? "YES" : "NO" ));
Then add the following method to your WO app's Application class:
public WOResponse dispatchRequest( WORequest request )
{
if (displayHeaders) {
LOGGER.debug( "*********** The request = " + request.toString() );
if (displayHeaderContent)
LOGGER.debug( "*********** The request content = " +
request.contentString() );
}
WOResponse response = super.dispatchRequest( request );
if (displayHeaders) {
LOGGER.debug( "*********** The response = " + response.toString() );
if (displayHeaderContent)
LOGGER.debug( "*********** The response content = " +
response.contentString() );
}
return response;
}
Finally, set the two runtime parameters, DisplayHeaders and
DisplayHeaderContent, appropriately to log the requests and responses
to determine where the holdup is occurring in the network.
The code is a modification of something I got from Chuck Hill (either
the book or a response on this list, I don't remember). It also
presumes that you're running log4j. If you're not, then change the
LOGGER.debug messages to System.out.println, or some other
appropriate logging statements.
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden