My favorites | Sign in
Project Home Wiki Issues Source
Search
for
HowToUse  
Find out how to use this library in your Android application
Updated May 1, 2012 by mosa...@gmail.com

How to Use

Apache Maven

To make use of this library in a Maven project, add the following to your project's POM:

<project>
  ...
  <repositories>
    <repository>
      <id>googlecode-ksoap2-android</id>
      <name>googlecode-ksoap2-android</name>
      <url>http://ksoap2-android.googlecode.com/svn/m2-repo</url>
    </repository>
  </repositories>
  ...
  <dependencies>
    <dependency>
      <groupId>com.google.code.ksoap2-android</groupId>
      <artifactId>ksoap2-android</artifactId>
      <version>2.6.4</version>
    </dependency>
  </dependencies>
  ...
</project>

or use a repository manager to add the repository there and just add the dependency. Contact simpligility technologies for consulting and training for Sonatype Nexus.

Standard Android Ant-based build and Eclipse/ADT

To make use of this library in a non-Maven project, follow the instructions in the Android Developer's Guide on how to Add an External Library to your project.

You will need to add a ksoap2-android and all required transitive dependencies to the build path. Luckily the Maven build of the project produces a nice bundle of all these jars in one big file.

The different version of these files are available at http://code.google.com/p/ksoap2-android/source/browse/#svn/m2-repo/com/google/code/ksoap2-android/ksoap2-android-assembly/

To download a file from there, right click on "View raw file" and select "Save Link as" (this label differs for different browsers) and you will get the full jar downloaded.

The latest release artifact would be available at

http://code.google.com/p/ksoap2-android/source/browse/m2-repo/com/google/code/ksoap2-android/ksoap2-android-assembly/2.6.4/ksoap2-android-assembly-2.6.4-jar-with-dependencies.jar

with a direct download url of

http://ksoap2-android.googlecode.com/svn/m2-repo/com/google/code/ksoap2-android/ksoap2-android-assembly/2.6.4/ksoap2-android-assembly-2.6.4-jar-with-dependencies.jar

Some users seem to experience download problems with IE. Just try a decent browser or download with a command line tool like wget

wget http://ksoap2-android.googlecode.com/svn/m2-repo/com/google/code/ksoap2-android/ksoap2-android-assembly/2.6.4/ksoap2-android-assembly-2.6.4-jar-with-dependencies.jar

After the manual download confirm the size of the downloaded file since many users seem to be experiencing problems.

Or better just use Maven and a repository server.

More

And in terms of how to write your code please look at the help wiki page.

Comment by thanhbinh.gd@gmail.com, Apr 8, 2011

nice :)

Comment by sow...@gmail.com, Jun 1, 2011

great

Comment by xianglon...@gmail.com, Jun 2, 2011

I'd like it,thanks

Comment by project member mosa...@gmail.com, Jun 19, 2011

It is all in the m2-repo folders. Follow the instructions above for download.

Comment by sa...@tyretraders.com, Aug 2, 2011

In Addition to the above comment after adding the reference the following error is given : "Conversion to Dalvik format failed with error 1" - Removing the library and cleaning the project does not fix this problem instead I have to delete the project and start again.

Comment by sa...@tyretraders.com, Aug 3, 2011

Problem fixed, for anyone else getting this make sure to read this line carefully :

To download a file from there, right click on "View raw file" and select "Save Link as" (this label differs for different browsers) and you will get the full jar downloaded.

Download th file any other way and you will get the "Conversion to Dalvik format failed with error 1" error.

Comment by JRL...@gmail.com, Nov 24, 2011

Hi, do you have documentation regarding how to access secured .NET webservice that require user name & password ?

Thanks Samuel

Comment by project member mosa...@gmail.com, Nov 24, 2011

There is some documentation on the wiki and in the linked blog posts. Also some more on stackoverflow.

Comment by project member mosa...@gmail.com, Jan 4, 2012

It works just fine if you actually read and follow the instruction on this page further up. Worst case get it with wget as documented.

Comment by mone741...@gmail.com, Apr 23, 2012

Dear Authors,

Excuse me. When I add the ksoap2 2.6.3 jar into the 3rd party lib in our new android project in eclipse, a compelixity problem occur when the program run in emu as I declare the SoapObject? in anywhere in my project even I write "SoapObject? request = new SoapObject?(NAMESPACE, METHOD_NAME);" in the first line in onCreate function. The error message contain Ksoap2wcfActivity?.onCreate(Bundle) line: 62 Instrumentation.callActivityOnCreate(Activity, Bundle) line: 1047..... ActivityThread?.performLaunchActivity(ActivityThread?$ActivityClientRecord?, Intent) line: 1611 and so on

I am so preciate athour's contribution

Comment by project member mosa...@gmail.com, Apr 23, 2012

Ask on the mailinglist with more details

Comment by zhouwentao16, Apr 26, 2012

最近刚好开发android,听说这个用在android上不错


Sign in to add a comment
Powered by Google Project Hosting