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
PIN: N/A
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:
Code:
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":
Code:
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:
Code:
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");
            ht.call(null, 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:
Code:
Enveloppe.BodyIn.data.elementdata[0].value="<test></test>"
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.
Offline  
Old 04-10-2009, 01:51 PM   #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

Ok sorry this was application-specific and not even related to web-services.
Offline  
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

Conair / Franklin DB12-RE06MR Dust Beater Vacuum Loader w control
$575.0
Conair / Franklin DB12-RE06MR Dust Beater Vacuum Loader w control pictureSolid Flexible Corrugated Pvc Wire Hose For Leaf Sucker Lawn Vacuum Riding Mower
$67.98
Solid Flexible Corrugated Pvc Wire Hose For Leaf Sucker Lawn Vacuum Riding Mower pictureJelenko Oil-Less Vacuum Pump 306300
$249.99
Jelenko Oil-Less Vacuum Pump 306300 pictureAlton Filter Bags for Porter-Cable and Stanley 4 Gallon Wet/Dry Vacuum - 3 Pack
$17.59
Alton Filter Bags for Porter-Cable and Stanley 4 Gallon Wet/Dry Vacuum - 3 Pack pictureZENY Combo 35CFM 1/4HP Air Vacuum Pump HVAC A/C Refrigeration Kit AC Manifold...
$133.75
ZENY Combo 35CFM 1/4HP Air Vacuum Pump HVAC A/C Refrigeration Kit AC Manifold... picture






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