android-ksoap2

ksoap session web service

…衆ロ難τιáo~ 提交于 2019-12-07 07:22:27
How can i maintain the session state using ksoap? I need a way to receive and send the unique SessionID from the asp.net web service. So i wrote a simple web service, but the result is always 1.... [ScriptMethod] [WebMethod(EnableSession = true)] public string Calculate() { if (Session["example"] == null) { Session["example"] = 0; } int r = Convert.ToInt32(Session["example"]); r = r + 1; Session["example"] = r; return Session["example"].ToString(); } I know that i somehow need to get the SessionID from the cookie send back from the server, and use it on every new call to the service, but dont

Android KSOAP2 ServiceConnectionSE NullPointerException

浪子不回头ぞ 提交于 2019-12-06 09:35:03
问题 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

calling magento web service from android client using kSoap2

假如想象 提交于 2019-12-06 09:00:40
i am trying to access a magento web service from a android client.which should return a session id.i hav already done this uing java client using apache and am successful in calling the method. How ever i am getting xmlpullparser exception when trying with android client as: 10-24 15:25:44.409: WARN/System.err(277): org.xmlpull.v1.XmlPullParserException: expected: START_TAG { http://www.w3.org/2001/12/soap-envelope }Envelope (position:START_TAG @2:327 in java.io.InputStreamReader@44ee2268) well this is my wsdl file from which i am trying to access login method: my java code: public class

Sending XML to a Web Service in Android

假装没事ソ 提交于 2019-12-06 05:27:16
问题 I want to send this as XML to my Web Service. How should I do that? <dmi:ShipNoticeRequest xmlns:dmi="http://portal.suppliesnet.net"> <dmi:RequesterISA>xxxxxxxxxx</dmi:RequesterISA> <dmi:ShipDateRange> <dmi:ShipDateFrom>2009-09-09</dmi: ShipDateFrom> <dmi:ShipDateTo>2009-09-10</dmi: ShipDateTo> </dmi: ShipDateRange > </dmi:ShipNoticeRequest> My Web Service method required this type of request message: POST /ShipNotice/WebServiceShipNotice.asmx HTTP/1.1 Host: portal.suppliesnet.net Content

SoapObject Result returns anyType{} as value

╄→гoц情女王★ 提交于 2019-12-06 05:17:19
package com.example.gramaniladharidetails; import java.util.Vector; import org.ksoap2.SoapEnvelope; import org.ksoap2.SoapFault; import org.ksoap2.serialization.KvmSerializable; import org.ksoap2.serialization.Marshal; import org.ksoap2.serialization.MarshalFloat; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.os.AsyncTask; import android.os.Bundle; import android.app.Activity; import android.util.Log; import android.view.Menu; import

why does reflection slow down android phone

本小妞迷上赌 提交于 2019-12-06 04:03:08
I read many times that reflection will slow down the phone performance. How true is this? For example in my case, I get some parameters from a web service which have the same name as the parameters of a class I have in my android app. so I just set the values of these parameters using java fields and reflection... it doesn't seem to slow down the performance.. can anybody explain to me the fact behind this idea about reflection slowing down performance? Brian Cooley Take a look at this question . Basically, you are getting outside of the optimizations that the compiler can perform because

How to send a soap request in android?

我的梦境 提交于 2019-12-06 03:35:41
问题 I am new to WSDL webservices , using KSoap2 library to call wsdl webservices in android . This is my soap request dump <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:loy="http://loyalcard.com/LoyalCardWebService/">; <soapenv:Header/> <soapenv:Body> <loy:GetOffersByLocation> <!--Optional:--> <loy:Location> <!--Optional:--> <loy:Latitude>?</loy:Latitude> <!--Optional:--> <loy:Longitude>?</loy:Longitude> </loy:Location> </loy:GetOffersByLocation> </soapenv

XML parsing using kasoap2-Android

亡梦爱人 提交于 2019-12-06 03:01:22
i have difficulties parsing this structure xml: <Publications> <Publication> <PublicationID>1</PublicationID> <PublisherID>1</PublisherID> <Date>2012-03-28 13:39:04</Date> </Publication> <Publication> <PublicationID>2</PublicationID> <PublisherID>1</PublisherID> <Date>2012-01-23 10:00:03</Date> </Publication> </Publications> Maybe some one could give me some ides how to parse it ? My request looks: String method_name = "GetPublications"; // creating new SoapObject soap = GetSoapObject(method_name); SoapSerializationEnvelope envelope = GetEnvelope(soap); HttpTransportSE androidHttpTransport =

Get the IPaddress of the computer in an Android project using java

独自空忆成欢 提交于 2019-12-06 00:24:13
问题 I am using ksoap2-android and i need to get the IP address using java so that I don't have to type it manually everytime. What i mean by IP address is , for example if I do ipconfig using the command shell: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : f0::ed2:e3bf:8206:44%13 IPv4 Address. . . . . . . . . . . : 192.168.1.107 <--THIS ONE Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 The thing is am developing an

How to make the SOAP request

徘徊边缘 提交于 2019-12-05 21:17:59
I am making a SOAP request in Android. What exactly I want to achieve is: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/"> <soap:Header/> <soap:Body> <tem:GeneratePin> <tem:sEmail>xyz@abc.com</tem:sEmail> <tem:sFlage>true</tem:sFlage> </tem:GeneratePin> </soap:Body> </soap:Envelope> but I am getting: <v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2003/05/soap-encoding" xmlns:v="http://www.w3.org/2003/05/soap-envelope"> <v:Header /> <v:Body> <tem:GeneratePin