Android WebService is usually used when users accept the WebService server's return values.
Soapobject = (soapobject) envelope. getresponse (); this is used to accept the returned value, but this method usually produces Java. lang. classcastexception: Org. ksoap2.serialization. soapprimitive.
Use soapobject = (soapobject)
Envelope. getresponse (); and soapobject result = (soapobject) envelope. bodyin;
Java. Lang. classcastexception: org. ksoap2.serialization. soapprimitive. We can use object =
Envelope. getresponse (); To solve this error.
If the type returned by the server is byte [], use object = envelope. getresponse (); and soapobject result = (soapobject)
Envelope. bodyin; errors will not occur, but an error will be reported when using object = envelope. getresponse (); The retrieved value is decoded and encoded using base64. If soapobject result = (soapobject) envelope. bodyin; is used, the byte [] can be fully decoded and encoded.
, Byte [] Ops = base64.decode (result. getproperty (0). tostring ());