ksoap2

Call SOAP service from android with ksoap error [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-24 18:11:08
问题 This question already has answers here : How to fix 'android.os.NetworkOnMainThreadException'? (55 answers) Closed 6 years ago . I have a webservice running on Google app engine, and i would to call a available service from an android device. I've follow and merge code of most tutorial about KSoap2, but i still obtain an exception on android. this is the code: private static String METHOD_NAME = "getData"; private static String SOAP_ACTION = "http://example.com/getData"; private static String

Android web service access

帅比萌擦擦* 提交于 2019-12-24 15:37:27
问题 I have accessed a web service from Android 2.2.It is perfectly OK.I changed my program for Android 4.0.3 to access same web service.But this doesn't work. Code of my Android program import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.widget.TextView; import android.app.Activity; import android.os.Bundle;

java.lang.ClassCastException: java.util.Vector cannot be cast to org.ksoap2.serialization.SoapPrimitive

烂漫一生 提交于 2019-12-24 14:13:13
问题 I am trying to connect my Android APP development to a Web Service and cannot seem to capture the response (throws the above error); the snippet of my APP code, follows: @Override protected String doInBackground(String... params) { String URL = "https://MyDomain/Services/AccountManager.asmx"; String NAMESPACE = "http://tempuri.org/"; String METHOD_NAME = parameters.get("METHOD_NAME"); String ReturnValue; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); // addProperty for each

Double with ksoap2 on Android?

老子叫甜甜 提交于 2019-12-24 03:27:29
问题 How do I add a double property to a ksoap2 request? request.addProperty("doubleProperty", 1.0); There are no nice and clear answers on the web. 回答1: In order to send the double value as a request parameter you need to use Marshaling concept. Have a look at this tutorial I also found this to be useful. Try googling for more info on the Marshaling concept All the best Cheers 来源: https://stackoverflow.com/questions/7830239/double-with-ksoap2-on-android

SOapObject Issues Android

微笑、不失礼 提交于 2019-12-23 17:34:07
问题 Am getting Soap response using as Soap Object and retrieving properties. see this below code SoapObject returnObj = (SoapObject)response.getProperty("GetAllDocumentsResult"); // Integer id = Integer.valueOf(returnObj.getProperty("id"); for(int i=0;i<returnObj.getPropertyCount();i++) { SoapObject persondetails = (SoapObject)returnObj.getProperty(i); SoapPrimitive videoname = (SoapPrimitive)persondetails.getProperty("PDFFileName"); am retrieving each videoname from persondetails object. but for

java.lang.ClassCastException: org.ksoap2.serialization.SoapPrimitive cannot be cast to org.ksoap2.serialization.SoapObject

天涯浪子 提交于 2019-12-23 04:18:27
问题 I am doing soap parsing in android .These are the following steps I take while doing parsing 1) I am download ksoap2-android-assembly-2.4-jar-with-dependencies (1).jar . 2) Then I used this in this code But I am getting this error . **java.lang.ClassCastException: org.ksoap2.serialization.SoapPrimitive cannot be cast to org.ksoap2.serialization.SoapObject** Here is my code. package com.example.networkconnectivity; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject;

Self-signed certificate

懵懂的女人 提交于 2019-12-23 03:57:14
问题 I use a hosting with a self-signed certificate. So I downloaded the certificate from my domain https://www.marpel.cz/ and created .bks file using http://portecle.sourceforge.net/. I need to establish the https connection and retrieve data from my webservice. I use ksoap2 library. I have copied and used a class ConnectionWithSelfSignedCertificate stated in ksoap2 wiki. This is the way I create a keyStore MainActivity.java // Get an instance of the Bouncy Castle KeyStore format try { this

SoapFault - faultcode: 'SOAP-ENV: Exception in android

丶灬走出姿态 提交于 2019-12-22 10:50:08
问题 I know already same type qusetion is present in SO but i didn't find the solutions. i got this SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Procedure 'login' not present' faultactor: 'null' detail: null exception when try to get response from my localserver.. my wsdl code hould like: <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs0="http://www.processmaker.com"

Sending byte array with ksoap2 on android

偶尔善良 提交于 2019-12-22 00:24:29
问题 I'm trying to upload images from an android device to a WCF service. If I send a small image (about 20kb) then it works fine. If I send a slightly larger image (about 95kb) I get an error: org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@41636470) Android code is: byte[] fileContents = IOUtil.readFile(image.getFileName()); request = new SoapObject(CommonFunctions.NAMESPACE, "SaveAttachment"); envelope = new

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

旧时模样 提交于 2019-12-21 17:52:07
问题 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