android-ksoap2

SoapObject Result returns anyType{} as value when retuning a complexType object

走远了吗. 提交于 2019-12-03 03:36:58
I am calling a web service in my android app & the method is getGramaNiladhariData(), I am getting the result as a SoapObject. result = (SoapObject) envelope.bodyIn; Log.d("WS", String.valueOf(result)); And this is what I got for String.valueOf(result) getGramaNiladhariDataResponse{getGramaNiladhariDataResult=anyType{gnName=anyType{}; address=anyType{}; workingDays=anyType{}; gnDivision=anyType{}; contactNumber=anyType{}; }; } Here the method i am calling returns a complexType object,consist of 5 attributes. As i found in the internet i can't get a soap Object as the result of a webservice

KSoap Request Timeout?

折月煮酒 提交于 2019-12-02 17:14:50
问题 friends, i dont see request timeout in KSoap library any one guide me what should i do? or from where to download latest version of it? my code SoapObject userRequest=new SoapObject(NAMESPACE, METHOD_NAME); userRequest.addProperty("session_id", session_id ); userRequest.addProperty("page_size", PageSize); userRequest.addProperty("offset",Offset ); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("GetAlertsInput", userRequest); SoapSerializationEnvelope envelope

Android return value in AsyncTask onPostExecute using Interface [duplicate]

喜欢而已 提交于 2019-12-02 15:34:24
问题 This question already has answers here : Android AsyncTask don't return correct Result (3 answers) Closed 5 years ago . in this below code i want to return value from AsyncTask with using an Interface. but i get wrong value and i can not return correct value from onPostExecute . i'm developed this link tutorials with my code. i can not use correctly with that. Interface: public interface AsyncResponse { void processFinish(String output); } Ksoap Main class: public class WSDLHelper implements

Table pagination Table layout Web Service using XML parser

元气小坏坏 提交于 2019-12-02 09:53:45
I have written a table layout to fill values automatically from web service but i am newbie for java and android and wrote this. I want to add the vlaues from the sax parser to tablerow.Please help me how to add it to table layout. i have given the files below. Table Layout public class TablePage extends Activity { ArrayList<Bookdetails>bookno=new ArrayList<Bookdetails>(); ArrayList<Bookdetails>booktitle1=new ArrayList<Bookdetails>(); private final String NAMESPACE = "http://www.webserviceX.NET/"; private final String URL = "http://www.webservicex.net/BibleWebservice.asmx"; private final

how to solve org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40d310f0)

本秂侑毒 提交于 2019-12-02 06:46:05
问题 i have create simple webservice using jax-ws. i need to consume that webservice in android. when i consume that webservice i got this error org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40d310f0) my wsdl code: <definitions targetNamespace="http://sample.jaxws.ws.blog.accrd.com/" name="SimpleWebServiceService"> <types> <xsd:schema> <xsd:import namespace="http://sample.jaxws.ws.blog.accrd.com/" schemaLocation="http:/

how to solve org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40d310f0)

孤街浪徒 提交于 2019-12-02 01:55:48
i have create simple webservice using jax-ws. i need to consume that webservice in android. when i consume that webservice i got this error org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40d310f0) my wsdl code: <definitions targetNamespace="http://sample.jaxws.ws.blog.accrd.com/" name="SimpleWebServiceService"> <types> <xsd:schema> <xsd:import namespace="http://sample.jaxws.ws.blog.accrd.com/" schemaLocation="http://localhost:8080/SimpleWebService/SimpleWebService?xsd=1"/> </xsd:schema> </types> <message name="sayHello"><part

How to pass String array to webservice using ksoap2?

跟風遠走 提交于 2019-12-01 20:49:34
I am having a Web Client in Android using ksoap2 but I can't pass the string array as a parameter to the webservice. Here's my code String[] items={"hello","world"}; request.addproperty("str",items); First use "soapUI" to see correct request structure(like item names,item namespaces , ...). We assume that you want to write like this XML in request:(here n0 and n1 are namespaces) <n0:strarray xmlns:n0="http://n0 ..." xmlns:n1="http://n1 ..."> <n1:string>hello</n1:string> <n1:string>world</n1:string> </n0:strarray> extend a class from vector: import java.util.Hashtable; import java.util.Vector;

how to Call ksoap web service from android?

吃可爱长大的小学妹 提交于 2019-12-01 19:55:46
I have a small confusion, in our mobile app an ksoap web service called from ios like below : and getting data properly. Here in the following web service you can see from following code, there are some parameters need to pass to the web service. -(void)callwebservice{ NSString *soapMessage = [NSString stringWithFormat: @"<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><Calculate xmlns=\"http://tempuri.org/\"><inputRate>%@</inputRate><rateFrequency xmlns:a=\"http://schemas.datacontract.org/2004/07/FusionPeople.MobileContractor.DomainModel\" xmlns:i=\"http://www.w3.org

JSON String returned from SOAP web service containing no records for table

拟墨画扇 提交于 2019-12-01 15:25:24
I have a SOAP web service(.asmx) implemented using the .NET framework that returns me a JSON String in this form: {"checkrecord":[{"rollno":"abc2","percentage":40,"attended":12,"missed":34}],"Table1":[]} Now in my Android app I am using ksoap to call the web service in the following way: public String getjsondata(String b) { String be=""; SoapObject request = new SoapObject(namespace, method_NAME); request.addProperty("rollno",b); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request);

Web Service Android Application : Cannot serialize 1.0

こ雲淡風輕ζ 提交于 2019-12-01 13:15:17
问题 P.S : I have looked at similar questions but haven't been able to understand what to do. They talk about using a marshal class, which I can't seem to understand. I am creating an Android application to consume a JAX-WS . I am using the ksoap-2 library for the same. I take the inputs from the user in a series of text fields and pass these onto WebService activity. Here in the onCreate method I call the web service after setting up the soap object : protected void onCreate(Bundle