BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-02-2009, 03:33 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 7100t
PIN: N/A
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Weird behavior while receiving a web service response

Please Login to Remove!

Hi,

I have a web service which returns a big string (10000+ characters) representing XML code.

Here is a part of it (the beginning and the end):
Code:
<Advertisers>[...]</reportTable></Sites><reportDate>Thu Apr 02 12:04:42 PDT 2009</reportDate>
I tested it with SOAPSonar, which is a tool to test web services with their wsdl. Anyway that works.

So I developped a blackberry client using ksoap2 to connect to the web service. Here is the code:
Code:
SoapObject request = new SoapObject(URL, SERVICE);
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        request.addProperty("username", "testuser");
        envelope.setOutputSoapObject(request);
        try {
            HttpTransport ht = new HttpTransport("ht tp://xxxxxxxxxxxx:xxxx/xxx/xx/xx");
            ht.call(null, envelope);
            result = (envelope.getResponse()).toString();
            System.out.println("DEBUG: Response=*" + result + "*");
And here is the strangest part. This is the result I get while debugging:
Code:
DEBUG: result=*</Sites><reportDate></reportDate>*
So this is supposed to be the end of the request but there is not even all the elements (some text is missing between the reportDate tags).
I've tried to hard-code the string and it does work so I don't think the issue is related to the size of the string.

I'm totally lost and any advice is appreciated.
Offline  
Old 04-06-2009, 10:06 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 7100t
PIN: N/A
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

any idea?
Offline  
Old 04-07-2009, 08:51 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 7100t
PIN: N/A
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Still nothing
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.