Ping server HTTPS using SOAP webservice in android - android

I'm new to soap web service.I want to ping my server using https and i want to use soap.I referred the following links
Not trusted certificate using ksoap2-android
KSOAP 2 Android with HTTPS
but,it doesn't worked in my code. here is my code snippet
SSLConection.allowAllSSL();
HttpsTransportSE httpstransport = new HttpsTransportSE("myserver", 443, "rmo_t_json_v2.asmx", 1000);
httpstransport.call(SOAP_ACTION, envelope);
Where I have to call allowssl(). what is third param in httpstransportSE.

Related

cannot assign port in url while requesting to server in android

i am creating android app where i need to pass url with port as "http://182.71.155142:8888" but when i request for this url from android app using loopj Library .It shows me exception and Exception is:
Unable to resolve host "nsg-static-142.155.71.182.airtel.in": No address associated with hostname
Can anyone help me how to pass port number so that i can get response from url
i am sending the request by using following code:
AsyncHttpClient client = new AsyncHttpClient(8888);
client.get("http://182.71.155.142/demo/loan-lelo/json/1",params,new AsyncHttpResponseHandler()
i am able to hit url from browser and getting response
by this way i am hitting url "http://182.71.155.142:8888/demo/loan-lelo/json/loan-details/1"
Try using any other library. I tried with OKHttp Library and works properly for me in my case.

Connect webservice with android

I would like to connect my android with my own web service with nested like wsdl SOAP request
Using SOAPUI tool i found the method name is login .but unable to pass params user ,pass under Userlogin. how does specifically call the User login in android (Web service).
androidHttpTransport.responseDump returns error as
refer: androidHttpTransport.responseDump
wsdl SOAP request: SOPA Request WSDL

Android call my own LOCAL WebService (Symfony) in localhost

i have build an app on Symfony and a WebService REST for this app.
I have already build an Android application on the same idea of my Symfony project and i want to use the API (I'm on localhost) of my Symfony Application for consuming my Webservice in Android.
How can I do that without an OVH server or something else ?
Thank you ;)
You just need to send HTTP request to your webservice by specifing the endpoint as your local IP address.
You can use a third-part library as https://github.com/square/retrofit to do that properly, or with the native android http request manager : https://developer.android.com/reference/java/net/HttpURLConnection.html

Which url should I use for soap on android?

I have to use web service on android without using 3.rd party libraries like ksoap. So I must write my own requests. And this point which url should I use for post url?
HttpPost httppost = new HttpPost("url");
I have wsdl link like that:
http://kavakci.com.tr/kod.merkezi/rotametre.asmx?WSDL (not working for you, just for me)
Soap action:
http://kavakci.com.tr/BaglantiDogrula
Method:
BaglantiDogrula
Namespace:
http://kavakci.com.tr/
It is common practice to be able to access the WSDL of a web service by its endpoint address suffixed with "?WSDL", which means that you should POST your request to:
http://kavakci.com.tr/kod.merkezi/rotametre.asmx

Ksoap sending arguments and receiving results

I'm using KSoap within my Android application.
My application using Web Service for communicate with the server.
I have found a code sample of a KSoap wev service client.
In the sample, the client uses the following code for communication with the server -
Request = new SoapObject(NAMESPACE, METHOD_NAME);
How do I pass arguments to the server?
How do I invoke the return value form the server?
You should use SoapObject.addProperty() to add argument and SoapSerializationEnvelope.getResponse() to get data returned by server.
Here is example: http://android-devblog.blogspot.com/2010/06/soap-on-android.html

Categories

Resources