Problems with Android with Javax Sun Banks

I am working on an Android Web Services program that uses several classes from Sun javax libraries. The Eclipse IDE barks "Trying to include the main class (java. * Or javax. *) In something other than the main library." My application is an Android application, and I am not creating the main library. I use several .jars; javax.xml.ws, javax.xml.bind, javax.xml.soap, javax.xml.rpc and javax.jws. I believe that I cannot use these java-byte codes .jars directly. I will need to use the dx tool to convert them to delvik or .dex bytecode files. I did some additional research and found that using any javax. * Classes in the Android application are prohibited. Can someone explain why? Does their hands-on programming work around?

Thanks Steve

+6
android
source share
3 answers

This is because these banks use core sound libraries. Android does not support full J2SE, but rather a subset of it: http://developer.android.com/reference/packages.html

Thus, you cannot use the basic Java libraries because they do not belong to the Android SDK.

+7
source share

You need to use an alternative library to handle SOAP on Android - the libraries provided by Sun do not work.

One popular alternative to KSOAP2 ,

+2
source share

Start with an extended version of kSOAP called ksoap2-android:

http://code.google.com/p/ksoap2-android/

Then add a tool that generates kSDAP stubs based on WSDL called wsdl2ksoap:

http://code.google.com/p/wsdl2ksoap/

Not as advanced as wsimport, but it makes you damn close.

+1
source share

All Articles