I'm not asking to be spoon fed here, just need some pointers on where to direct my searching
I want to call a SOAP web service, possibly this one
I don't want to use KSoap, is there anyway I can do this using the apache libraries that are included with the Android SDK?
I want to call a SOAP web service, possibly this one
That does not look like a SOAP Web service. Try clicking that link in a browser, and you will see it is a plain XML document.
is there anyway I can do this using the apache libraries that are included with the Android SDK?
Yes. For true SOAP, plan to spend a substantial amount of time writing your own SOAP layer atop HttpClient. However, for consuming a simple XML document like the one you link to above, it should be fairly simple.
I think the XML is not WebService, it is simple XML... To call WebService with SOAP you can use kSOAP2 on Android platform, but I've created an another - proof-of-concept - SOAP client:
http://wiki.javaforum.hu/display/ANDROIDSOAP/Home
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 want to learn how to consume web services in android , and i have done some research on it , i have seen that .net web services are in XML format and return response in XML, when PHP web services are give jason array in response , i have used ksoap for .net web services , is ksoap can also used for php web services?
I think you misunderstood. .Net is not only to generate data in XML format.It is also possible to generate JSON data using .NET also and it is also possible to generate XML format using php.Most of the people will use JSON only because it is light weight and its easy parse from client side.Parsing XML data is really pain in my opinion.
And you asked ksoap also used for php?Yes it is.
See the below link
http://www.petetracey.com/2009/11/ksoap-with-php-tutorial/
Above site is my site so thought I'd clear this up a bit -- SOAP is a protocol that uses XML as its underlying format. It's one of many options that use XML. KSOAP (with the K) is the Java library, for blackberry but may be somewhere in the android libs or tacked on somehow. Still I think the better option is JSON, it is lighter weight and parses faster and therefore for mobile with data rates/limited processing power/battery consumption goes up with processor use -- you want to be lean and mean.
So any modern language, be it PHP, .NET, whathaveyou++, has libraries for both JSON and XML - and most have SOAP either built-in or as the 3rd party library somewhere. Which to use is the right tool for the job, and SOAP at this point is pretty much a legacy technology outside of the Sun/Oracle and Microsoft world.
I'd like to create a RESTful WCF service and then call it from an Android 3.2 or 4.0 app. I have this sample here, but it dates back to May 2010. I'd like to know if that is still the best way of doing this?
The WCF part is OK, I can handle it (since I'm a .NET guy), but I'm looking for the best (both performance and security) way of calling the service.
If you have any links, samples or even books to suggest, I'd be more than happy.
Have a look at this https://sites.google.com/site/androidosbeginning/cosuming-restful-webservice-in-android
As long as you can get the WSDL from the WCF service, you should be able to interact with it using something like AXIS for Java and use wsdl2java to generate the client stub to interact with the service... though AXIS is relatively heavy to use on Android devices. I've never done anything like that with Android, but that's how it's done with Java. Perhaps there are some lighter-weight libraries you can use.
Here's a similar post: How to Consume WCF Service with Android
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 want to build a server that communicates with an android phone
based on a request/response model
At first i thought i will use Httpservlets and communicate with the android
by Http messages. but i need to be able to access a pretty big object with every
request so i guess i cant really transfer the object to the servlet.
so i know this is a pretty newbish question but iv'e been searching for days
what kind of java EE tech should i use(i thought of EJB but as i understand they cant communicate with android)?
Thanks in advance
I think the right question is how to implement service layer for your android application:
Basically there are two options REST based web services and SOAP. Android's support for SOAP is inadequate and I personally prefer REST over soap any day. If you have decided to go with REST, your options in Java are Jersey, RESTlets or Spring Rest services. I will prefer Jersey, but you can also look in to Spring ( although not strictly complaint with the JSR).
(note: look in "SO" for comparison on various rest based frameworks in Java)