|
|
|
[Android] Android จะอ่านค่า XML ที่ Web Services ส่งมายังไงคับ |
|
|
|
|
|
|
|
อ่านบทความนี้ครับ
Code (Android-Java)
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.bodyIn;
if (result != null) {
txtResult.setText(result.getProperty(0).toString());
} else {
Toast.makeText(getApplicationContext(),
"Web Service not Response!", Toast.LENGTH_LONG)
.show();
}
Android and Web Service
|
|
|
|
|
Date :
2015-08-26 13:50:04 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่ส่งมาเป็น JSON ล่ะครับ
|
|
|
|
|
Date :
2015-08-26 15:14:14 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|