ksoap2

Android KSOAP2 ServiceConnectionSE NullPointerException

ⅰ亾dé卋堺 提交于 2019-12-04 17:04:29
I try to implement KSOAP2 in my android application and now im having a problem. When i use the call method of the HTTPTransportSE Object im getting the following exception: 10-04 09:24:05.997: W/System.err(6779): java.lang.NullPointerException 10-04 09:24:06.017: W/System.err(6779): at org.ksoap2.transport.ServiceConnectionSE.getResponseProperties(ServiceConnectionSE.java:85) 10-04 09:24:06.017: W/System.err(6779): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:167) 10-04 09:24:06.017: W/System.err(6779): at com.brandmakerandroid.mediapool.LoginActivity.Login(LoginActivity

Send data to WCF from Android using KSOAP2

强颜欢笑 提交于 2019-12-04 16:57:59
My code is, SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("ItemList", mainObject.toString()); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.setOutputSoapObject(request); envelope.dotNet = true; envelope.implicitTypes = true; HttpTransportSE transport = new HttpTransportSE(URL); try { transport.call(SOAP_ACTION, envelope); } catch (final Exception e) { activity.runOnUiThread(new Runnable() { public void run() { new CustomToast(activity, SOAP_ACTION + " - " + e.getMessage() + " error").show(); e

KSOAP2 for Android gives

让人想犯罪 __ 提交于 2019-12-04 16:39:15
I'm trying to access a web service whose WSDL is at http://srilanka.lk:9080/services/CropServiceProxy?wsdl . Using SoapUI I sent a request and successfully got a response. Then using KSoap2 for Android I tried to get a response. But all I get is a SoapFault Error. The code is as follows. String NAMESPACE = "http://schemas.icta.lk/xsd/crop/handler/v1"; String URL = "http://www.srilanka.lk:9080/services/CropServiceProxy.CropServiceProxyHttpSoap12Endpoint"; String method_name = "getCropDataList"; String SOAP_ACTION = method_name; SoapObject request = new SoapObject(NAMESPACE, method_name); String

java.lang.ClassCastException: org.ksoap2.serialization.SoapPrimitive?

烈酒焚心 提交于 2019-12-04 10:10:06
I am calling a web service from my android client application. After getting response when i am trying to display it i am getting ClassCastException. Following is my code: public void onClick(View v) { setContentView(R.layout.report); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); EpcDetails epcdetails=new EpcDetails(); epcdetails.setEpcId(input_val.getText().toString()); request.addProperty("id", id SoapSerializationEnvelope sse=new SoapSerializationEnvelope(SoapEnvelope.VER11); sse.setOutputSoapObject(request); sse.addMapping(NAMESPACE, ProductDetailsRequest

Android, AsyncTask with kSoap2

血红的双手。 提交于 2019-12-04 09:15:27
I'm coding an app that primarily uses data gotten from a web service, and I want to use AsyncTask to run the SOAP calls in the background... I'm fairly new to Android(being an iOS programmer), so I'm a bit new at this... Now, I have a login screen, where I take a user-provided login and check it against information on a server... So in my login activity: loginBtn.setOnClickListener(new OnClickListener() { public void onClick(View v) { //Run the connection to authenticate the user AuthenticateConnection mAuth = new AuthenticateConnection(); mAuth.mNumber = number; mAuth.mPassword = pass; mAuth

java.lang.NoClassDefFoundError: javax.microedition.io.Connector

喜你入骨 提交于 2019-12-04 09:13:26
I am trying to consume a .net web service, and get the following error when I run it(debug) from my phone java.lang.NoClassDefFoundError: javax.microedition.io.Connector I get the error when I make the call to the transport object ht.call(SOAP_ACTION, soapEnvelope); while in the eclipse ide, the (context sensitive model) does not show this in the object model when i try to add it i only see javax.microedition.khronos.* , no javax.microedition.io, which confuses me more. When I try to debug this in the emulator, I only get a VerifyError private static final String SOAP_ACTION = "http:/

How can I make a ksoap2 call in async task?

心已入冬 提交于 2019-12-04 05:31:59
问题 I am a newbie on android development. I am trying to develop an application which will connect with .net webservice in order to retrieve data. I would like to make the ksoap2 call with async task. How I call it asyncronus with asynctask? My SoapCall class is public class SoapCall { public final static String SOAP_ACTION = "http://www.alpha.net.com/ExecuteEBSCommand"; public final static String OPERATION_NAME = "ExecuteEBSCommand"; public final static String NAMESPACE = "http://www.alpha.net

Web services stub generation + android

狂风中的少年 提交于 2019-12-04 05:27:35
I want to generate a android(java) based STUB for accessing all the web services. I have tried generating the stub using following tools: 1) Sun Java (TM) Wireless Toolkit 2.5.2_01 for CLDC, 2) ksoap2-generating-stub-0.1-SNAPSHOT-J2me-Android. But i was unable to generate a proper stub that can be used. Please suggest any library or tool that you have used for the purpose. thanks!! Anyone here!! Update: Problem with sun java lib: There are some java libs that are not supported by Android. For eg: "javax.microedition.xml.rpc.Operation" etc. Problem with ksoap2: getting a null pointer exception

Hostname was not verified ANDROID

戏子无情 提交于 2019-12-04 05:19:24
问题 I am using ksoap lib to call the webservice . In some cases service run correctly but in a case it gives Host name was not verified below is my code for calling webservice . HttpTransportSE httpTransport = new HttpTransportSE(URL, MessageConstant.TIMEOUT_TIME); httpTransport.debug = true; // this is optional, use it if you don't want to use a packet sniffer to check what the sent message was (httpTransport.requestDump) httpTransport.call(SOAP_ACTION, envelope); // send request here is my log

get data from ksoap2 in android

瘦欲@ 提交于 2019-12-03 21:38:30
please tell me how to retrieve multiple array of data in ksoap2 Result. actually let me explain. i have a web service of employee search. when i search by name it gives me Multiple Records. one record contain name, last name, phone, address etc and there are total 30,40 records. in other cases where we just recieve one output result we can use the following code in ksoap2 SoapObject result=(SoapObject)envelope.getResponse(); //get response String text = result.getProperty("response").toString(); This will return us the string from Response property but for only one record. now we have mutiple