Alok Save
Alok Save

Reputation: 206546

Soap Client on Android to access Salesforce APIs

I want to develop a application on Android platform to connect to salesforce. From what i have found salesforce provides service API's which can be used to connect to salesforce servers by creating a Web service from the client side application.

Salesforce developer site has examples of creating such a Web service by using Apache Axis as the SOAP client and using the WSDL file downloaded from the salesforce website. I want to know can this be done from Android platform?

Is there a version of Apache Axis ported for Android? I did some googling and could find that Android does not have a inbuilt SOAP client and usually Ksoap is used on Android. But I have also read that KSOAP doesnt support WSDL.

I have seen the above question asked before but quite a while ago, As Android platform has emerged eversince I want to know what is the current situation and options of doing this.

Also, Since I am new to Android and development on Android if anyone can direct me to a sample code snippet, which creates a Web Service from android to connect to salesforce, I would be higly grateful.

Thanks in Advance.

Edit: Is there any other way to develop an Salesforce client on Android without the above approach? I am running out of ideas :(

Upvotes: 3

Views: 2371

Answers (2)

superfell
superfell

Reputation: 19040

At the end of they day, SOAP is just XML over HTTP, Android (at least 2.1 and up, not sure about earlier versions) have built in XML parsers and serializers, so you could manually build/parser the relevant soap messages that you care about (this is probably not a big deal if you only need to make a few different types of calls, but will be a chunk of work to do them all). Depending on your timeframe, you could wait for the REST API, which'll let you do json instead of XML. (this is currently in pilot)

Upvotes: 2

eyescream
eyescream

Reputation: 19622

Not really an answer, but...

There will be a webinar about REST API for Salesforce soon. With pure HTTP and JSON you might be able to avoid SOAP problems :)

It's a "developer preview", meaning that probably this functionality will be officially released this autumn/winter.

https://www.developerforce.com/events/rest_developer_preview/registration.php?d=70130000000FV4P

Upvotes: 4

Related Questions