ksoap2

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

不问归期 提交于 2019-12-21 17:51:57
问题 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)

Web services stub generation + android

只愿长相守 提交于 2019-12-21 12:01:07
问题 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

How can you remove namespace declarations in ksoap?

久未见 提交于 2019-12-21 06:29:21
问题 Right off the bat, here is my Soap call implementation, minus the irrelevant bits. public class MySoapClient implements AbstractSoapClient { private String NAMESPACE = "http://www.examples.com/wsdl/MyService/"; private String METHOD_NAME = "getPersonDetails"; private String SOAP_ACTION = "http://www.examples.com/getPersonDetails/"; String URL = "http://192.168.0.10:8088/mockMyServiceBinding?WSDL"; public Object process() throws Exception { SoapSerializationEnvelope envelope = generateEnvelope

ksoap2 casting getResponse()

爷,独闯天下 提交于 2019-12-21 05:04:22
问题 Calling a .net SOAP1.1 web service from android using ksoap2 lib I met a problem of casting response to a custom object. For instance the code below is called correct after httpTransport.call(soapAction, soapEnvelope); and have data inside. But I cant't cast it to specific object neither to SoapObject or Vector as I saw in several examples, I get CastException or simple nothing. If somebody knows how to deal with it, please help. public StatusSetting[] GetAllStatuses(String installation){

How to consume WCF .SVC in Android

╄→尐↘猪︶ㄣ 提交于 2019-12-21 02:53:36
问题 i red a lot of documents about, but i can't consume this .svc file. I've no problem with .ASMX file. Only SVC i'm not able to consume. It's very very very stressfull....! I can't modify WCF part. I post WSDL file and my try to consume it: WSDL <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org

Out of memory on a byte allocation (Bitmap as String to webservice using soap)

假装没事ソ 提交于 2019-12-20 10:00:58
问题 Am having a bitmap , so I want to upload a webserivceas string and want to retrive the string. For converting bitmap to string am using: ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); strBase64 = Base64.encodeToString(byteArray, Base64.URL_SAFE); this above String is using as property to in soapobject to upload. But am getting Out of memory on a 11674900-byte allocation , while print

Out of memory on a byte allocation (Bitmap as String to webservice using soap)

僤鯓⒐⒋嵵緔 提交于 2019-12-20 10:00:38
问题 Am having a bitmap , so I want to upload a webserivceas string and want to retrive the string. For converting bitmap to string am using: ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); strBase64 = Base64.encodeToString(byteArray, Base64.URL_SAFE); this above String is using as property to in soapobject to upload. But am getting Out of memory on a 11674900-byte allocation , while print

How to recieve a message from a Webservice with KSOAP2 and Android

江枫思渺然 提交于 2019-12-20 05:48:06
问题 i tried to do a simple ksoap2 tutorial. This is the link My Problem is, I only get a response, if I use SoapPrimitive and Ksoap...2.6.4.jar with Ksoap...2.4.jar and or "SoapObject response = (SoapObject)envelope.getResponse();" I've got an exception. How i have to use the SoapObject? This is my Code: public class WS_Auth_ComplexObjectsActivity extends Activity { /** Called when the activity is first created. */ String NAMESPACE = "http://WS.androidroleplay.fk4.de.hs_bremen.de"; String METHOD

HttpTransportSE requestDump gives NullPointerException

别来无恙 提交于 2019-12-20 04:37:56
问题 I'm trying to access a webservice in Android via Ksoap2 for Android. The SoapObject is created OK, the S.O.P of the bodyOut outputs the desired strings. But when I do a requestDump of the HttpTransportSE object I create to make the call, a NullPointerException happens. In other words, the transport object is null. How can this happen? Web Service is at http://srilanka.lk:9080/services/CropServiceProxy?wsdl This service works very well with SoapUI. SoapUI Request: <soap:Envelope xmlns:soap=

HttpTransportSE .call() method has no action

大兔子大兔子 提交于 2019-12-20 03:11:05
问题 I'm trying to make an Android App that gets the weather based off a zipcode you enter, and that also displays the time in EST and GMT format. I am using webservices (WSDLs) and have the code written to access it, the code is below: public void sendMessage(View view) { SOAP_ACTION = "http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP"; NAMESPACE = "http://ws.cdyne.com/WeatherWS/"; METHOD_NAME = "GetCityWeatherByZIP"; URL = "http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl"; txtZIP = (EditText)