zeycc / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

HttpTransportSE.call() is too slow #82

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sorry for the long time an issue creation...

1. What steps will reproduce the problem?

Try to send a lot of binary data to the remote system.
One of examples is here: 
http://groups.google.com/group/ksoap2-android/browse_thread/thread/325d11f2cb6c5
652

2. What is the expected output? What do you see instead?
I hope the sending at all will take some seconds instead of minutes (it takes 
about 1.5-2 minutes for 400Kb file: 1.3-1.7 minutes to prepare data on 
envelope.write() and 1-5 seconds to actually send it).

3. What version of the product are you using? On what operating system?
2.5.7 on Android 2.3.5

Thank you for help in advance!

Original issue reported on code.google.com by v...@itgorod.ru on 14 Sep 2011 at 9:36

GoogleCodeExporter commented 8 years ago
I have the same problem. Any progress?

Original comment by andrewdi...@gmail.com on 13 Oct 2011 at 9:55

GoogleCodeExporter commented 8 years ago
No... feel free to implement a fix. I can pull it in and cut a new release.

Original comment by mosa...@gmail.com on 13 Oct 2011 at 7:05

GoogleCodeExporter commented 8 years ago
If I find the time I can look at that myself at some stage, but if somebody 
that needs this could provide a fix that would probably be faster.

Original comment by mosa...@gmail.com on 18 Nov 2011 at 5:37

GoogleCodeExporter commented 8 years ago
Looks like I might not get around to this anytime soon so I am changing to 
awaiting a contribution from someone else.

Original comment by mosa...@gmail.com on 8 Dec 2011 at 5:31

GoogleCodeExporter commented 8 years ago
The problem might be related with the method used to create the request data 
(createRequestData on class Transport ). Currently this method is using a 
default constructor call to build the ByteArrayOutputStream used to hold the 
request information, The buffer capacity is initially 32 bytes by default as 
per javadocs.

That means that it will need to increase the size of the array dinamically 
(Very expensive proceess) to make space to hold the 2.5 Mg.

So i think we can alleviate this by calling the ByteArrayOutputStream 
constructor passing as argument the size of the object, (Or at least and 
aproximated value).

Will try to test this solution, the problem will be to determine the 
approximate size of the object

Original comment by jose.cas...@gmail.com on 16 May 2012 at 3:53

GoogleCodeExporter commented 8 years ago
That sounds like a good improvement. In the short term it might even be fine to 
be able to set an initial value as a static parameter on the transport so that 
you can set it high when calling a service with a large load.

Original comment by mosa...@gmail.com on 11 Jun 2012 at 5:40

GoogleCodeExporter commented 8 years ago
I am working on that will send you a pull request shortly

Original comment by jose.cas...@gmail.com on 12 Jun 2012 at 2:43

GoogleCodeExporter commented 8 years ago
Thank you!

Original comment by rbrlnx on 2 Aug 2012 at 10:14

GoogleCodeExporter commented 8 years ago
Hello, 

I am also having difficulties with KSOAP httpTransport.call() being too slow.
Our IPhone app on IOS is able to call our webservice superfast.
For Android, using KSOAP, the same webservice takes several seconds.

When will a  version  be available with the fix described above? 

Thanks in advance!

Original comment by i...@pharox.nl on 7 Aug 2012 at 9:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Fix is in master and will be available with 3.0.0-RC.4

Original comment by mosa...@gmail.com on 12 Nov 2012 at 6:24

GoogleCodeExporter commented 8 years ago
Hello, 
I have the same issue, but it occurs when using in a local network (e.g. the 
device has the IP 192.168.1.3 and the server 192.168.1.3) and this network is 
not connected to the Internet. Nevertheless it works well when the network is 
connected to the Internet. In this case the HttpTransport.call() method returns 
immediately, but when not connected to the Internet it takes up to 20 seconds 
to return (what is a lot of time for the task that uses it). 
I have tried with the 3.0.0-RC.4 but it did not work.  

Could you check this out, please?

Thank you!

Original comment by j...@accesofacil.com on 8 Jun 2013 at 11:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Still no fix?

Ksoap2 on android is useless for 3G/Edge.

Where iOS app connects to our web service (https) instantly and returns in no 
time, our android version is taking 5+ seconds just to open the output stream. 
Once it's open, it will send the data in a couple of milliseconds.

We use KeepAliveHttpsTransportSE.

It's working fine on WiFi.

Original comment by dco...@gmail.com on 21 Jun 2013 at 3:53

GoogleCodeExporter commented 8 years ago
Forgot to mention, we are using 3.0.0 RC4

Original comment by dco...@gmail.com on 21 Jun 2013 at 3:53

GoogleCodeExporter commented 8 years ago
Hello, 
I have the same issue, but it occurs when using in a local network (e.g. the 
device has the IP 192.168.1.3 and the server 192.168.1.3) and this network is 
not connected to the Internet. Nevertheless it works well when the network is 
connected to the Internet. In this case the HttpTransport.call() method returns 
immediately, but when not connected to the Internet it takes up to 20 seconds 
to return (what is a lot of time for the task that uses it). 
I have tried with the 3.0.0-RC.4 but it did not work.  

Could you check this out, please?

Thank you!

ı have the same problem too. still no fix?

Original comment by bluerom...@gmail.com on 11 Aug 2014 at 12:22

GoogleCodeExporter commented 8 years ago

My Web Service was like this on below & I don't know how to use it.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Submit xmlns="http://tempuri.org/">
      <ID>int</ID>
      <FC>
        <Message>string</Message>
        <Att>
          <Collection>
            <UserName>string</UserName>
          </Collection>
          <Collection>
            <UserName>string</UserName>
          </Collection>
        </Att>
      </FC>
    </Submit>
  </soap:Body>
</soap:Envelope>

Original comment by kasiling...@gmail.com on 22 Apr 2015 at 4:45