ksoap

Sending Image in Base64 String and receiving in webservice via kSoap

无人久伴 提交于 2021-01-29 22:10:50
问题 i am sending an image in byte[] and 3 strings to a webservice usingksoap but its not working for me , i am not sure where i am wrong, in sending image from Android and at receiving end, i am putting the code here kindly check it Here is how i am converting image to byte[] at client (Android) side Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath()); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); myBitmap.compress(Bitmap.CompressFormat.JPEG, 100,

How to Pass json array as Parameter To A Webservice Using Ksoap2 in android

生来就可爱ヽ(ⅴ<●) 提交于 2020-02-15 19:48:18
问题 My code is given below: public void testWebServiceForJson() { TextView textView = new TextView(this); setContentView(textView); SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); ArrayList<String> list = new ArrayList<String>(); list.add("blah"); list.add("bleh"); JSONArray jsArray = new JSONArray(list); String mStringArray[] = { "String1", "String2" }; JSONArray mJSONArray = new JSONArray(Arrays.asList(mStringArray)); request.addProperty("jsonArray", mJSONArray);

Using KSOAP for file transfer from android application to web service

人走茶凉 提交于 2020-02-08 06:46:08
问题 I have sent the data from the android application to the webservice which further will transfer it to the browser by using KSOAP. now i am planning to transfer a file from the app to the web service. Is it possible? 回答1: InputStream is = null; try{ is = new BufferedInputStream(new FileInputStream(Environment.getExternalStorageDirectory().getAbsolutePath() +"/Filename")); } catch (FileNotFoundException e1) { e1.printStackTrace(); } ByteArrayOutputStream bos = new ByteArrayOutputStream(); try {

Using KSOAP for file transfer from android application to web service

寵の児 提交于 2020-02-08 06:44:07
问题 I have sent the data from the android application to the webservice which further will transfer it to the browser by using KSOAP. now i am planning to transfer a file from the app to the web service. Is it possible? 回答1: InputStream is = null; try{ is = new BufferedInputStream(new FileInputStream(Environment.getExternalStorageDirectory().getAbsolutePath() +"/Filename")); } catch (FileNotFoundException e1) { e1.printStackTrace(); } ByteArrayOutputStream bos = new ByteArrayOutputStream(); try {

Send/Receive image or XML file via KSOAP

帅比萌擦擦* 提交于 2020-01-03 04:20:09
问题 it may sounds stupid but i would like to know whether is it possible send and receive. maybe image/XML file vai kSOAP? 回答1: I have been able to transmit WebRowSet XML documents using kSOAP2. http://roderickbarnes.com/blog/droid-chronicles-web-services-handling-complex-parameters In this example I am sending an XML document from the web service to my Android based client. I hope this helps bro. 回答2: It is possible to send image via ksoap by following steps: convert the Image into byte[] add

Android KSOAP2 SSL java.security.cert.CertPathValidatorException

邮差的信 提交于 2020-01-01 00:53:09
问题 I tried connect to my JAX-WS service over SSL. Without SSL all works. Method in AsyncTask: HttpsTransportSE androidHttpTransport = new HttpsTransportSE("10.0.2.2", 8181, "/Server/?wsdl", 10000); ((HttpsServiceConnectionSE) androidHttpTransport.getServiceConnection()).setSSLSocketFactory(trustAllHosts() .getSocketFactory()); //androidHttpTransport.debug=true; androidHttpTransport.call(getSoapAction(method), envelope); Get SSLContext public SSLContext allowAllSSL() { SSLContext context = null;

Issue with using ksoap jar, when install my app on a real android device

青春壹個敷衍的年華 提交于 2019-12-25 08:58:48
问题 I have a problem with my android application. That application which uses the kSOAP jar, in order to make connection with a webservice. In the eclipse emulator everything works fine. But when I extract the apk and install it on a real device, the application says that there isn't installed. If I remove the kSOAP, I can open the application. What should I do? Regards 回答1: Resolved. The problem was related to the use of: android:permission = "INTERNET", on every Activity. And related to when i

Android consume WCF , that particular method return DataTable

懵懂的女人 提交于 2019-12-25 06:45:52
问题 I am new to this site & Android, If there are any wrong please indicate me . My problem is in soap response, This is my Android code: public static final String APPURL = "http://192.168.1.213:7986/XontService"; private static final String METHOD_NAME = "LoadDownLoadTables"; private static final String NAMESPACE = "http://tempuri.org/"; private static String SOAP_ACTION = "http://tempuri.org/IXontPDAService/LoadDownLoadTables"; try { response = soap(METHOD_NAME, SOAP_ACTION, NAMESPACE, APPURL)

ksoap2 AsyncTask PropertyInfo not recevied to webservice, why?

强颜欢笑 提交于 2019-12-25 06:34:55
问题 I need to send some parameters to my web service and get result. I have used ksoap2-android-assembly-2.4-jar-with-dependencies.jar in lib, my web service work properly : [WebMethod] public string TestParams(string userName, string password, string startRowIndex, string maximumRows, string OrderType, string IdOpera) { return userName + " - " + password + " - " + startRowIndex + " - " + maximumRows + " - " + OrderType + " - " + IdOpera; } In main java code : private class AsyncCall extends

How can I send this SOAP request using KSOAP2 in Android

那年仲夏 提交于 2019-12-25 03:52:07
问题 I am very new to SOAP and Android. Can some one please help me to build an SOAP request to send the following request. SOAPAction: http://api.example.com/application Request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.example.com/registration/v3.1"> <soapenv:Header> <ns0:appCredentials ns0:name="your-account-name" ns0:password="mypassword" ns0:targetAccountName="vvz" xmlns:ns0="http://services.example.com/application/types/1.0"/> </soapenv