Trouble In Receiveing Byte [] From Wcf Ksoap2 To Android
I am trying to send images from wcf ksoap2 to android. At wcf side I have converted all images into byte array and stored them in an ArrayList. At android side I trying fill the Ar
Solution 1:
Here's the code:
SoapObjectRequest=newSoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope soapEnvelop;
soapEnvelop = newSoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelop.dotNet = true;
soapEnvelop.setOutputSoapObject(Request);
HttpTransportSEhtps=newHttpTransportSE(URL);
htps.call(SOAP_ACTION, soapEnvelop);
response = (SoapObject) soapEnvelop.getResponse();
ar = newString[response.getPropertyCount()];
arrays = newArrayList<Byte>();
if (response != null) {
if (response.getPropertyCount() > 0) {
for (inti=0; i < response.getPropertyCount(); i++) {
arrays.add( (Byte) response.getProperty(i));
}
}
}
Solution 2:
You are casting the data as a Byte
, however you have a Byte[]
Post a Comment for "Trouble In Receiveing Byte [] From Wcf Ksoap2 To Android"