This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I'm having problems with invoking a service request in Axis. I have built a basic CRUD style service and all I want to do is get a list of all the objects in a table. The request takes no parameters.
When I make the request, the server hangs while eating up my processor. Originally I was also getting java.lang.OutOfMemory exceptions. Increasing the heap size solved this (for now). It looks like somehow Axis never stops sending information back to the client.
I have tested as close to the network as I can figure out how to on both sides. I built a test app that calls the Skeleton class axis generated on the server. I get results back from this just fine. The test app I wrote client side accesses the Stub class and hangs. I don't get any returns or exceptions or anything useful. It just sits there.
I'm using Axis 1.x with Tomcat 5.5. Both are fresh installs within the past week so whatever the latest and greatest release versions are what I have. All communication is taking place on one machine.
Does anyone have any idea what might be causing this?
Originally posted by Adam Kreiss: The request takes no parameters. � When I make the request, the server hangs while eating up my processor. Originally I was also getting java.lang.OutOfMemory exceptions. Increasing the heap size solved this (for now). It looks like somehow Axis never stops sending information back to the client. � Does anyone have any idea what might be causing this?
A database server and client can deal with this by exchanging the information in batches (and it's usually binary data) - you seem to be attempting to send all of it in a single massive HTTP response of bloated XML text - so transmission could take a while.
However it's probably the result set to XML marshalling that's killing your server. If the result set is large enough the SOAP message creation process could cause the server to thrash because large parts of the virtual memory have to be repeatedly saved to and retrieved from disc - at which point the server might be sending no or only a trickle of data to the client.
Constrain your result set to a few rows, so that it can get it to work. Then make the result set bigger and bigger by varying your selection constraints until you are running into problems. What was the largest result set you could successfully send? How big was the resulting SOAP message?