Error When calling asp.net web service through android - android

such as E/dalvikvm(2193): Could not find class 'org.ksoap2.transport.AndroidHttpTransport', of android httpTransport and what to write in place of "input" request.addProperty("input", searchNameString); I want to get the result by calling web service to the android app but I could not able to display it please help me on how to retrieve result from the webservice and also how to display to the android app. Please help me on this.

Prefer URL which is post question by me.
create soap envelope with security header in android using ksoap2
If your ksoap2 library is not working fine then change another kshoap2 library.
You use AndroidHttpTransportSE instead of AndroidHttpTransport.

Related

Consuming .net rest api via android - 400 error

I have created REST service according to this: http://www.asp.net/web-api/overview/older-versions/creating-a-web-api-that-supports-crud-operations
tutorial and a android client according to this: http://www.techrepublic.com/blog/software-engineer/calling-restful-services-from-your-android-app/
I changed the service to receive the json messages, and the connection string to the same that works in the browser, with 10.0.2.2 instead of localhost(according to one of the advices in stackoverflow) - in the browser it works perfectly. When I try to test it on the emulator I get the 400 bad request error. Maybe this is totally wrong way of approaching this, I am confused - would you kindly show me the error in the implementation or the tutorial that could help me with consuming the rest api with android client?

send soap request from Android using Ksoap2

i'm trying to send the following request to a webservice using ksoap. i managed to send a successfull log-in request and other requests, where it is not neccessary to send the "locale..." line. And that is exactly my problem, i have no idea how to add this line to my request. I've tried doing it as a complexType, but the result is always something like " country="de" .... and this the webservice is not accepting such a request.
I hope someone can give me a hint.
<request>
<locale country="DE" datCountryIndicator="de" language="de"/>
<sessionID>13vb4mf66m67b</sessionID>
<!--Optional:-->
<constructionTimeFrom>?</constructionTimeFrom>
<!--Optional:-->
<constructionTimeTo>?</constructionTimeTo>
<restriction>ALL</restriction>
</request>
From my experience with kSOAP2 - go right to the source.
I've found a few bugs in the version of kSOAP2 I was using (for BlackBerry & Android) and most of the time had more luck tracing the methods, rather than looking for info online.

Using webservice for android (Titanium) sending paramerters and response in json format?

Any way of using webservice for android through which we can send paramerters to serveer and receive response in json format?I have tested nusoap for iPhone that is working fine but not for android.Any one help please.
If you want to use Web Services with Android Titanium, you should have a look at the following,
how we can use web service in to appcelerator titanium

Android sending SOAP object over Https via ksoap2 2.5.8

My first time posting a question here so please do not mind my mistakes here.
I'm currently making an android application fetching and sending information from a .asmx web service.
Everything goes well with the ksoap2 library and am using HttpTransportSE to call the web service. So now what I'm trying to do is to use the HttpsTransportSE to call the web service over Https. I got java.security.cert.certpathvalidatorexception trustanchor for certpath not found exception.
I have the server certificate in .pfx , .jks and .bks format.
My questions is what do i do with it to make my HttpsTransportSE call to be success?
I've read around with articles using custom SSLSocketFactory but am still not sure how to implement it in my application.
Thanks in advance for any suggestion/advices
your ksoap library is not having the class HttpsTransportSE. you can downlaod the ksoap library of latest version "ksoap2-android-assembly-2.6.5-jar-with-dependencies". It has in built HttpsTransportSE.

ksoap2-android client throwing FileNotFoundException inside [KeepAlive]HttpsTransportSE.call()

I am attempting to create an Android (2.2) SOAP client to connect to a SQL Server 2005 XML Web Services endpoint (and of course this requires authentication). My SQL Server endpoint seems to be up and running (it's a simple function which takes a string (varchar(20)) and returns another string; the URL "https://10.1.1.20:444/dt2?wsdl" properly returns the WSDL XML. (I am not using the "?wsdl" part of the URL in my connection string; I just mention it to show the web service is working properly.)
All seems to be working well, until I am inside the call to KeepAliveHttpsTransportSE.call() (using ksoap2-android 2.5.4), and get to HttpTransportSE.class:150, where (ServiceConnection)connection.openInputStream() is called, which in turn calls connection.getInputStream() - that is what throws the FileNotFoundException.
Any idea what's happening here? What is a good next debugging step? Thanks for any input.
See the following question for more detail and the answer to the problem: Getting ParsingError, InvalidSoapActionHeader on SQL Server SOAP request

Categories

Resources