i am using a WSClient++ Java for Android project to generate the classes of my webservice but the version is the trial soo the program only generate two methods. My webservice have only one but miss some classes after generating. Anyone knows other software like this?
thanks
I think you can use DOM t generate your xml from WS. (http://www.w3schools.com/dom/default.asp)
Also, generate the Web service using simple java program with the help of Apache tomcat and Axis2. (http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html)
Then call these Web Service in Android using kSAOP library.
Regards,
Sneha
Related
I have a .net web service, I tried to connect it in java, so I converted wsdl file to java classes and start calling them and it was sussceccful, now I want to know if this methos can be use in android. should I use ksoap2 or I can to this in the same way of java?
We've been using ksoap2 in our Android app for over a year now, with good results. It's quite simple to use, well tested and can be used in commercial projects. Their website: ksoap2-android
You can do it by using SOAP library in java and Ksoap2 is for android.
i am new to Android development
i have a web service made in php now i want to consume it in android can any one guide me how to achieve this..???
i have tried many code samples on net but failed to achieve this goal.
i am using Eclipse with ADT.
any help would be appriciated.
Kindly go through the following link. you will find code examples here
http://www.anddev.org/calling_a_web_service_from_android-t348.html
Android is developed using Java platform. what you should do is create a WebService and expose the WSDL via HTTP.
write your java program calling this Webservice.
its easier and simpler.
please explain a little about the ksoap android objects. I couldn't find any help anywhere.
what is the meaning and purpose of "namespace" when declaring a ksoap object?
what is the purpose of "SoapSerializationEnvelope" object?
what is the purpose of "HttpTransportSE" object?
KSOAP is a SOAP API based on kXML,where kXML is a lightweight Java-based XML parser designed to run on limited, embedded systems such as personal mobile devices
Check this link for details.
Difference Between SOAP and KSOAP
According to this webpage:-
The ksoap2-android project provides a lightweight and efficient SOAP
client library for the Android platform.
It is a fork of the kSOAP2 library that is tested mostly on the
Android platform, but should also work on other platforms using Java
libraries. It is still using Java 1.3 so should work fine on JavaME,
Blackberry and so on.
Currently I am working on an iPhone app. But the company also would like to have an android version for this app.
I have programmed all the request by Soap and used for the iPhone the Soap Request Generator of Sudz-C.
I am wondering now if something similar exists for the Android, It would be nice if I don't have to program this all by myself.
Anyone have some experiences or ideas?
You can use
http://easywsdl.com
website to generate all required java classes for your webservice. It uses ksoap2 library and supports many features like objects sent as references (WCF IsReference), complex inheritance, document and rpc style of webservice, all standard data types (including normal enums and IsFlag enums), and much more
ksoap2-android is what you are looking for, it will send/recive soap request's, is easy to use and on MIT license
I go through a lot of solution solution in WSDL 2 android. google don't matter about SOAP service and provide anything for it. wsdl2java won't work in most of case, some library cannot be use by android SDK. I suggest you to use http://easywsdl.com.
you'll see you can edit your own package name, class prefix and many other parameters depends on your need. If you have complex data and your are familiar to use Gson (https://code.google.com/p/google-gson/) to send parameter between your activities don't check "Use JodaDate" that is a great library for using date, but Gson doesn't support it (yet).
If you have few services that don't work (yes that can happen, depend of your WSDL configuration file), report it to contact and they will make the possible to fix your issue like they did for me.
The generator is fast. you will receive all your generated code and the .jar that you'll have to import into your project.
I need an advice if you may. I want to use webservices in Android and so far i am very much confuzed of the path i shoudl follow. I understand that there are 2 ways...soap and rest.
Trying to use soap(no native implementations) with a third party jar, ksoap.. that was fun but does not work. After finding a jar that actually compiles, and trying with some code i found on google i found that some methods do not exist in that jar and did not work.
Now I am trying to use Rest, found this project here and trying to get what they did here.
I worked once with webservices and using a wsdl url, and axis2 i managed to generate stub classes.
I am really confuzed now :) what is the best approach, what to use in android?
Thank you.
I would suggest using REST as it is light weight as compared to SOAP. Also people have reported lot of performance issues with libraries like kSoap.
If you still want to use SOAP create soap message on your own programmatically instead of using a library.
For JSON processing try using GSON library http://code.google.com/p/google-gson/