1
votes

What is way to connect to SOAP based web service from Blackberry Application. Every one is using KSoap Library. Is there no native support in Blackeberry SDK to connect to webservice.?

4
There does appear to be built-in support as of OS 6.0: blackberry.com/developers/docs/6.0.0api/net/rim/device/api/io/… - Rup

4 Answers

2
votes

User JSR 172 webservices. See NetBeans / Java ME IDE/SDK docs for more information.

1
votes

I am using Ksoap2 for blackberry application development when i am trying to send request through Soap then requestDump contains the value as

<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/12/soap-encoding" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /><v:Body><DownloadRetailerMobileApp xmlns="http://www.tibco.com/schemas/WSDL/Request.xsd" id="o0" c:root="1"><RetailerMSISDN>09886069494</RetailerMSISDN><RequestType>retailerowner</RequestType></DownloadRetailerMobileApp></v:Body></v:Envelope>

and the responseDump what i am getting is as

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns="">SOAP-ENV:Server</faultcode><faultstring xmlns="">RuntimeError: Internal Server Error</faultstring><faultactor xmlns=""/></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

and then it through an exception is

org.xmlpull.v1.xmlpullParserException: expected:END_TAG{http://schemeas.xmlsoap.org/soap/envelop/}
0
votes

I use the Java Sun Wireless Toolkit 2.5.2 to generate method stubs from your webservice using your webservices' wsdl file.

You can then call your webservice using the generated files, the syntax will be something like:

WebServiceSoap_Stub stub = new WebServiceSoap_Stub();
String result = stub.webMethod(param1, param2);
0
votes

I used HttpConnecttion to solve the problem I had.