You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org> on 2007/09/28 14:54:09 UTC

[jira] Updated: (AXIS-1729) DataHandler data is sent when making request without any parameter

     [ https://issues.apache.org/jira/browse/AXIS-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS-1729:
-----------------------------------

    Assignee:     (was: Davanum Srinivas)

> DataHandler data is sent when making request without any parameter
> ------------------------------------------------------------------
>
>                 Key: AXIS-1729
>                 URL: https://issues.apache.org/jira/browse/AXIS-1729
>             Project: Axis
>          Issue Type: Bug
>    Affects Versions: 1.2RC2
>         Environment: Windows XP SP2
>            Reporter: vd
>
> Description:
> Have an interface:
> public interface TestService{
>      public 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.
> If the service has another function which has no DataHandler in its signature, calling this function after the getData() also send the previously received data.  This problems was shown in both rpc/encoding and wrap/literal.
> To reproduce the problem, follow these steps:
> 1) create an interface:
> public interface TestService{
>      public 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:
> public DataHandler getData() throws java.rmi.RemoteException{
>     try{
>         javax.activation.DataHandler data = null;
>         data = new javax.activation.DataHandler(new FileDataSource("testfile.txt"));
>         return data;
>     }catch(Exception e){
>         return null;
>     }
> }
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org