BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 01-30-2012, 05:09 AM   #81 (permalink)
New Member
 
Join Date: Jan 2012
Model: 7100T
OS: Win XP
PIN: N/A
Carrier: Verizon
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

Please Login to Remove!

The problem was on my part the network was disabled !!!!
Offline  
Old 01-31-2012, 11:58 AM   #82 (permalink)
New Member
 
Join Date: Jan 2012
Model: 7100T
PIN: N/A
Carrier: Toursh
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

Please i can not download it can u please provide me with a downlaod link ?
Offline  
Old 02-01-2012, 08:01 AM   #83 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

Did you notice that the library and sample code is attached to the first post in this thread?

Also, here is the link from google:

kSOAP 2
Offline  
Old 02-17-2012, 06:05 AM   #84 (permalink)
New Member
 
Join Date: Feb 2012
Model: 9930
PIN: N/A
Carrier: developing
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

i am using ksoap2-j2me-core-prev-2.1.2 file in my blackberry application but show the error
'ksoap2-j2me-core-prev-2.1.2' not found
Please help me.
Offline  
Old 07-04-2012, 04:27 AM   #85 (permalink)
New Member
 
Join Date: Jul 2012
Model: 9300
PIN: N/A
Carrier: Developer
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

Quote:
Originally Posted by sickned View Post

Now, into your project, in which you wanna use ksoap, do the next:
- Right click on the project -> Properties -> Java Build Path -> Libraries -> Add Jars... select Ksoap2.jar (Project's jar NOT LIBRARY JAR).. ->Ok
- Right click on the project -> Properties -> BlackBerry Project Dependencies -> Select "Ksoap2".
Hello, I understand that I have to add the jar of the Library's project and not "ksoap2-j2me-core-prev-2.1.2.jar", but my problem is that the library project's jar is not generated when I sign it. Any solution?
Offline  
Old 09-13-2012, 01:59 AM   #86 (permalink)
New Member
 
Join Date: Sep 2012
Model: 9900
PIN: N/A
Carrier: airtel
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

Awesome solution... It works... Many Thanks
Offline  
Old 10-12-2012, 02:09 AM   #87 (permalink)
New Member
 
Join Date: Oct 2012
Model: 9790
PIN: N/A
Carrier: Sun
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Ksoap2 tutorial with Eclipse plugin 1.1

Quote:
Originally Posted by brooza View Post
Hi, has anyone tried the tutorial with BlackBerry Java Plug-in for Eclipse v1.1? I have Eclipse 3.5 and the 1.1. plugin with component pack 4.5?

Here is what I did:
1) New - Other - BlackBerry project - called Ksoap2, JRE: BB JRE 4.5 - Finish
2) In BB app descriptor window I have changed app type to Library and saved
3) right click on project - New - Folder - called lib
4) right click on folder - import - filesystem - jar provided in this tutorial
5) right click on project - properties - java build path: a) tab source - add folder - check Ksoap2/lib b) tab Libraries - add jars.. - Ksoap2/lib/the jar file c) tab Order and Export - check the jar file ok

And now the testing project:
1) New - Other - BlackBerry project - called Ksoap2Test, JRE: BB JRE 4.5 - Finish
2) right click on Ksoap2Test - properties - Java build path: a) tab Projects - check Ksoap2 b) tab Libraries - add Ksoap2/bin/the jar file c) tab Order and export - check the jar and project Ksoap2
3) right click on KsoapTest - new - class: called Ksoap2Demo, package mypackage - Finish
4) Copy the source code of java file provided in tutorial, change the mistakes in name of classes (StockQuoteDemo>Ksoap2Demo and StockQuoteScreen>Ksoap2DemoScreen), check the package and save
5) Run - Run as - BB simulator


Until running the project, everything seems to be fine but unfortunatelly the app doesnt run, just simulator without the app. In eclipse console I have found this:
Packaging project Ksoap2
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\bin\rapc.exe -quiet library=deliverables\4.5.0\Ksoap2 deliverables\4.5.0\Ksoap2.rapc -sourceroot=C:\Users\JB.s4u\workspace\Ksoap2\src;C: \Users\JB.s4u\workspace\Ksoap2\lib;C:\Users\JB.s4u \workspace\Ksoap2\res -import=C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\lib\net_rim_api.jar;C:\Use rs\JB.s4u\workspace\Ksoap2\lib\ksoap2-j2me-core-prev-2.1.2.jar C:\Users\JB.s4u\workspace\Ksoap2\bin
JAR file creation failed with error -1
The preverified classes if any are in tmp8965. See jar log of errors in C:\Users\JB.s4u\AppData\Local\Temp\rapc_191cb4a2.d ir\jarlog.txt
Error!: Error: preverifier failed: C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\bin\preverify.ex ...
Packaging project Ksoap2 failed (took 0.464 seconds)

Packaging project Ksoap2Test
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\bin\rapc.exe -quiet codename=deliverables\4.5.0\Ksoap2Test deliverables\4.5.0\Ksoap2Test.rapc -sourceroot=C:\Users\JB.s4u\workspace\Ksoap2Test\sr c;C:\Users\JB.s4u\workspace\Ksoap2Test\res -import=C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4. 5.0_4.5.0.21\components\lib\net_rim_api.jar;C:\Use rs\JB.s4u\workspace\Ksoap2\bin\ksoap2-j2me-core-prev-2.1.2.jar;..\Ksoap2\deliverables\4.5.0\Ksoap2.jar C:\Users\JB.s4u\workspace\Ksoap2Test\bin
I/O Error: Import file not found: ..\Ksoap2\deliverables\4.5.0\Ksoap2.jar
Packaging project Ksoap2Test failed (took 0.967 seconds)


I do not understand what does the error report say. Could anyone give me a tip where the problem might be or can you try my steps to resolve if this is general or just my configuration problem.
Thank you very much.
Instead of doing b) tab Libraries - add Ksoap2/bin/the jar file in the testing project, import the Ksoap2.jar in the Ksoap2/deliverables (either in the sub-folder Standard/ or Web/. I chose Standard/). I followed the instructions until I got the same error (just so Eclipse would build Ksoap2 and produce the Deliverables folder and files) then I just went back to the Ksoap2Test - properties - Java build path - tab Libraries then removed the jar from Ksoap2/bin/ and then added the one in Ksoap2/deliverables
Offline  
Old 03-29-2013, 11:53 PM   #88 (permalink)
New Member
 
Join Date: Mar 2013
Model: 9300
PIN: N/A
Carrier: Uninor
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: to work the Ksoap in your BlackBerry project

Quote:
Originally Posted by monad.gon@gmail.com View Post
Environment
-Eclipse Platform Version: 3.4.1, Build id: M20080911-1700
-BlackBerry JDE Componet Package 4.5.0

To work your Ksoap in BlackBerry.

1. download the ksaopXXX.jar file from here.
sourceforge.net/projects/ksoap2/
- you can download ksoap2-j2me-core-2.1.2.jar, 2009/11/19
- you can also rename the file
- if you want to use the attached file-Ksoap2.jar.txt-,please rename to Ksoap2.jar

2. save the jar file

3. in your eclipse, set the build path to your project.
your project -> Properties > Java Build Path > Libraries > Add External JARs
select the saved jar file
4. in your eclipse, set the jar file as an Export
Java Build Path > Order and Export
Just check in your ksoap jar file.

Good Luck!
Offline  
Old 05-06-2013, 07:54 AM   #89 (permalink)
New Member
 
Join Date: May 2013
Model: 9800
PIN: N/A
Carrier: Airtel
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

I am using ksoap2.jar in my application for webservice call.

While conneting, to the server it is giving the below error when i am testing using device or simulator:

org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:0 in java.io.InputStreamReader@6111a1f1)

I am using the preverified Jar file. I wrote the below code:

Code:
              SoapObject rpc = new SoapObject(serviceNamespace, methodName);
		rpc.addProperty("UserID", "1");
		rpc.addProperty("UserName", "xyz");
		rpc.addProperty("ContactNo", "9014567890");
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

		envelope.bodyOut = rpc;
		envelope.dotNet = true;
		envelope.encodingStyle = SoapSerializationEnvelope.ENC;

		HttpTransport ht = new HttpTransport(serviceUrl + getConnectionString().trim());
		ht.debug = true;
		System.out.println("debug true ------- ");
		ht.setXmlVersionTag(" version=\"1.0\" encoding=\"UTF-8\"?>");
		SoapObject  response = null;
		try
		{
			ht.call(soapAction, envelope);
			 response = (SoapObject )envelope.getResponse();
			 String resultbody = response.getProperty("updateUserDetailResult").toString();
		}
		catch(org.xmlpull.v1.XmlPullParserException ex2){
			
			resultLbl.setText(ex2.toString());
		}
		catch(Exception ex){
		String bah = ex.toString();
		resultLbl.setText(bah);
		}




/**
	 * Looks through the phone's service book for a carrier provided BIBS network
	 * 
	 * @return The uid used to connect to that network.
	 */
	private static String getCarrierBIBSUid() 
	{
		net.rim.device.api.servicebook.ServiceRecord[] records = ServiceBook.getSB().getRecords();
		int currentRecord;

		for (currentRecord = 0; currentRecord < records.length; currentRecord++) 
		{
			if (records[currentRecord].getCid().toLowerCase().equals("ippp")) {
				if (records[currentRecord].getName().toLowerCase().indexOf("bibs") >= 0) {
					return records[currentRecord].getUid();
				}
			}
		}
		return null;
	}

	/**
	 *  Getting the connection string based on the connection
	 * @return
	 */
	public static String getConnectionString() 
	{
		String connectionString = null;

		// Wifi is the preferred transmission method
		if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) 
		{
			connectionString = ";interface=wifi";

		}
		// Is the carrier network the only way to connect?
		else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT) 
		{
			String carrierUid = getCarrierBIBSUid();
			if (carrierUid == null) 
			{
				// Has carrier coverage, but not BIBS. So use the carrier's TCP
				// network

				connectionString = ";deviceside=true";
			} 
			else 
			{
				// otherwise, use the Uid to construct a valid carrier BIBS
				// request

				connectionString = ";deviceside=false;connectionUID=" + carrierUid + ";ConnectionType=";
			}
		}

		// Check for an MDS connection instead (BlackBerry Enterprise Server)
		else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS)
		{
			connectionString = ";deviceside=false";

		}

		// If there is no connection available abort to avoid bugging the user
		// unnecssarily.
		else if (CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE) 
		{

		}

		// In theory, all bases are covered so this shouldn't be reachable.
		else 
		{
			connectionString = ";deviceside=true";
		}

		return connectionString;
	}
Can anyone please help as i am stuck in this from a long time..
Offline  
Old 05-06-2013, 11:46 AM   #90 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

What environment are you testing on? Device, simulator, etc?
Offline  
Old 05-07-2013, 02:16 PM   #91 (permalink)
New Member
 
Join Date: May 2013
Model: 9800
PIN: N/A
Carrier: Airtel
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: **** BlackBerry and Ksoap2 Tutorial *****

I have tested on phone as well as simulator..
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





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