axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From V D <st946...@drexel.edu>
Subject Big bug in Axis? DataHandler data is sent when making request without any parameter
Date Thu, 25 Nov 2004 18:56:16 GMT

I have something like this:

DataHandler getData();

When a client call a server, the server send back a file (a 
FileDataSource passing into a DataHandler instance).  All good.  The 
client receive the data, wrap it in a BufferedReader and read all the 
data, then close the reader stream.

However, when I call getData() again (after the first call), the client 
waits for a long time. 

Using a TcpMonitor, I was shocked to find out that the post from client 
to the server also include most of the data in the file.  Is this a 
known bug?

It's seems a definitely a big bug in Axis, not my code.  I don't know if 
the communication choked because of this sending data from client, but 
these are 2 big problems here.  The first problem is data is sending 
without specified so. The 2nd problem is the request hangs after some 
data was sent back.

To reproduce the problem, follow these steps:

1) create an interface:

public interface TestService{
    DataHandler getData();
}

2) Compile this interface and use Java2Wsdl to generate wsdl file

3) Use the generated wsdl file to generate all the stub, skeleton, 
locator, whatever

4)  Implement the service:
    javax.activation.DataHandler data = null;
    data = new javax.activation.DataHandler(new 
FileDataSource("testfile.txt"));
    return data;

5) Deploy the server code

6) Write a little client to call this twice, using a same stub obtained 
from the locator

Also make sure to set the scope of this test service on the server to 
"application" scope.

Please let me know if someone needs me to file this bug report.



Mime
View raw message