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

Recessed Light Kit 3" Swivel Trim Incl. 50 Watt Bulbs Altair AL-2665T - 2 Pack
$19.87
Recessed Light Kit 3MSA Altair 5 Gas Detector-Read Description
$49.99
MSA Altair 5 Gas Detector-Read Description pictureMSA Power Supply Charger for Altair 4x and 5x Multi-Gas Detectors power cord
$29.68
MSA Power Supply Charger for Altair 4x and 5x Multi-Gas Detectors power cord pictureMSA 10089321 Calibration Assembly with Cap, Tube and Connector for Altair 4 G...
$52.7
MSA 10089321 Calibration Assembly with Cap, Tube and Connector for Altair 4 G... pictureMSA Altair 4X (4-way) Portable Gas Monitor
$600.0
MSA Altair 4X (4-way) Portable Gas Monitor picture






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