BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 04-10-2009, 09:42 AM   #1 (permalink)
Knows Where the Search Button Is
Join Date: Apr 2009
Model: 7100t
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Angry Error receiving a webservice response with kSoap

Please Login to Remove!

I coded a web service parsing an XML string with Javolution and reformatting it.

Here is a sample code of it:
processedResponse = new String(((ReportHandler)parser.getContentHandler()).getprocessedResponse());
processedResponse = processedResponse.concat("</test>");
res = String.copyValueOf(processedResponse.toCharArray());
System.out.println("DEBUG: processedResponse=" + res);
return res;
Here is the output when I run the webservice as a java application (with the main function calling the "webmethod":
DEBUG: processedResponse=<test><Advertisers><content reportKey='xxxx'/><reportTable title='CampaignDeliveryInformation' ></reportTable><reportTable title='CreativeDeliveryInformation' ></reportTable><reportTable title='SiteDeliveryInformation' ></reportTable><content reportKey='yyyy'/><reportTable title='CampaignDeliveryInformation' ></reportTable><reportTable title='CreativeDeliveryInformation' ></reportTable><reportTable title='SiteDeliveryInformation' ></reportTable><content reportKey='zzzzz'/><reportTable title='CampaignDeliveryInformation' ></reportTable><reportTable title='CreativeDeliveryInformation' ></reportTable><reportTable title='SiteDeliveryInformation' ></reportTable><content reportKey='ooooo'/><reportTable title='CampaignDeliveryInformation' ></reportTable><reportTable title='CreativeDeliveryInformation' ></reportTable><reportTable title='SiteDeliveryInformation' ></reportTable><content reportKey='jjjjj'/><reportTable title='CampaignDeliveryInformation' ></reportTable><reportTable title='CreativeDeliveryInformation' ></reportTable><reportTable title='SiteDeliveryInformation' ></reportTable></Advertisers><Sites><content reportKey='gggg'/><reportTable title='CampaignDeliveryInformation' ></reportTable><content reportKey='wwwww'/><reportTable title='CampaignDeliveryInformation' ></reportTable><content reportKey='nnnn'/><reportTable title='CampaignDeliveryInformation' ></reportTable><content reportKey='QA'/><reportTable title='CampaignDeliveryInformation' ></reportTable><content reportKey='fgfgf'/><reportTable title='CampaignDeliveryInformation' ></reportTable></test>
However, when I request it with the blackberry like this:
SoapObject request = new SoapObject(NAMESPACE, "GetReportTopSitesAdvertisers");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

request.addProperty("username", "xxx");
request.addProperty("password", "xxx");
request.addProperty("account", "xxx");
request.addProperty("startDate", "xxx");
request.addProperty("endDate", "xxx");
request.addProperty("number", "5");
envelope.bodyOut = request;
try {
            HttpTransport ht = new HttpTransport("URL:8080/xxxx");
  , envelope);
I only get a partial response. I looked into the soap object with the debugger and here is what I get:
Ok i can't transfer images so I'll paste it:
img511 .image shack. us/img511/724/resp.png

Here is the important part:
So basically he only gets the first and the last element. The first <test> is added at the beginning of the parsing. The last test is added in the end.

This problem has been driving me crazy, does anybody has a clue where it might come from?

Last edited by yann247 : 04-10-2009 at 09:44 AM.
Old 04-10-2009, 01:51 PM   #2 (permalink)
Knows Where the Search Button Is
Join Date: Apr 2009
Model: 7100t
Carrier: verizon
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts

Ok sorry this was application-specific and not even related to web-services.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

APPLE 820-0522-A 630-0895-B LITE VRAM 128K X 8 BOARD
APPLE 820-0522-A 630-0895-B LITE VRAM 128K X 8 BOARD   picture

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