Search code examples
androidweb-servicesksoap2android-ksoap2

Android ksoap webservice response truncate


I'm using ksoap library for webservice call. Below is a simple function for calling webserive.

 try {       
                METHOD_NAME = method;
                SOAP_ACTION = "http://tempuri.org/"+method;
                URL = "http://172.27.212.2:8080/services/"+serviceName;

                request = new SoapObject(NAMESPACE, METHOD_NAME);                           
                soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
                soapEnvelope.dotNet = true;             
                soapEnvelope.setOutputSoapObject(request);
                androidHttpTransport = new HttpTransportSE(URL);                        
                androidHttpTransport.call(SOAP_ACTION, soapEnvelope);
                SoapPrimitive resultString = (SoapPrimitive) soapEnvelope.getResponse();

                return resultString.toString();
            } catch (Exception e) {
                throw e;
            }

Webservice method returns a json string. But in eclipse this string getting truncated.
I debugged and truncated resultString is as below:

OutPut:

{"menu":{   "Arrival": [
    {
      "traveldeskdetailid": 1968,
      "traveldeskid": 4,
      "AirlineName": "United Airlines",
      "AirlineLogo": "UA1.gif",
      "FlightNumber": "1239",
      "Codeshare": "",
      "City": "Newark",
      "AirportName": "Newark Liberty International Airport",
      "Delayed": "T",
      "ScheduledTime": "8:29 PM",
      "Remarks": "126 minutes late",
      "RemarksWithTime": "Estimated 10:35 PM",
      "Terminal": "3",
      "Gate": "85",
      "path": "http://dem5xqcn61lj8.cloudfront.net/logos/UA1.gif"
    }, 
    { .. },{ .. },  
    {
      "traveldeskdetailid": 1983,
      "traveldeskid": 4,
      "AirlineName": "Air Canada",
      "AirlineLogo": "AC.gif",
      "FlightNumber": "564",
      "Codeshare": "",
      "City": "Vancouver",
      "AirportName": "Vancouver International Airport",
      "Delayed": "T",
      "ScheduledTime": "10:45 PM",
      "Remarks": "19 minutes late",
      "RemarksWithTime": "Estimated 11:04 PM",
      "Terminal": "I",
      "Gate": "73",
      "path": "http://dem5xqcn61lj8.cloudfront.net/logos/AC.gif"
    },

    {
      "traveldeskdetaili...

Response string is truncate like

{ "traveldeskdetaili...

How can I get full response?


Solution

  • Eclipse IDE has a limit of chars showing in the vars and watch debug fields. I think, you should print it out in logcat or parse JSON, because you already have json-format.