ngày 31-03-2016
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Number Of Catalog:" />
<TextView
android:id="@+id/txtcount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#008040"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="30sp" />
<Button
android:id="@+id/btncount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Get Catalog Count" />
</LinearLayout>
|
package tranduythanh.com;
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.os.Bundle;
import android.os.StrictMode;
import android.app.Activity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends Activity {
TextView txtcount;
Button btncount;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//thiết lập Permit để kết nối internet
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
txtcount=(TextView) findViewById(R.id.txtcount);
btncount=(Button) findViewById(R.id.btncount);
btncount.setOnClickListener(new
View.OnClickListener() {
public void onClick(View arg0) {
doCount();
}
});
}
public void doCount(){
try{
//khai báo namespace trong Webservice
final String NAMESPACE="http://tranduythanh.com/";
//hàm cần truy suất
final String METHOD_NAME="CountCatalog";
final String SOAP_ACTION=NAMESPACE+METHOD_NAME;
//service description
final String URL="http://testdrthanh.somee.com/mywebservice.asmx?WSDL";
//khai báo đối tượng SoapOBject
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
//thiết lập version
SoapSerializationEnvelope envelope=
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
//thiết lập output
envelope.setOutputSoapObject(request);
//tạo đối tượng HttpTransportSE
HttpTransportSE androidHttpTransport=
new HttpTransportSE(URL);
//tiến hành triệu gọi Service
androidHttpTransport.call(SOAP_ACTION, envelope);
//lấy kết quả trả về SoapPrimitive, vì hàm CountCatalog chỉ trả về kiểu int (primitive data)
SoapPrimitive response=(SoapPrimitive) envelope.getResponse();
//hiển thị kết quả lên giao diện
txtcount.setText(response.toString());
}
catch(Exception e) {
e.printStackTrace();
}
}
}//end MainActivity
|
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<Button
android:id="@+id/btnlistcatalog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Get List Catalog" />
<ListView
android:id="@+id/lvcatalog"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
|
package tranduythanh.com;
import java.util.ArrayList;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.MarshalFloat;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.os.Bundle;
import android.os.StrictMode;
import android.app.Activity;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
public class MainActivity extends Activity {
Button btngetlist;
ListView lvcatalog;
final String URL="http://testdrthanh.somee.com/mywebservice.asmx?WSDL";
ArrayList<String> arrCate=new ArrayList<String>();
ArrayAdapter<String>adapter=null;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
lvcatalog=(ListView) findViewById(R.id.lvcatalog);
btngetlist=(Button) findViewById(R.id.btnlistcatalog);
btngetlist.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0)
{doGetList();}
});
adapter=new ArrayAdapter<String>
(this, android.R.layout.simple_list_item_1, arrCate);
lvcatalog.setAdapter(adapter);
}
public void doGetList() {
try{final String NAMESPACE="http://tranduythanh.com/";
final String METHOD_NAME="getListCatalog";
final String SOAP_ACTION=NAMESPACE+METHOD_NAME;
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope=
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
//Nếu truyền số thực trên mạng bắt buộc phải đăng ký MarshalFloat
//không có nó thì bị báo lỗi
MarshalFloat marshal=new MarshalFloat();
marshal.register(envelope);
HttpTransportSE androidHttpTransport=
new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
//Get Array Catalog into soapArray
SoapObject soapArray=(SoapObject) envelope.getResponse();
arrCate.clear();
//soapArray.getPropertyCount() return number of
//element in soapArray
//vòng lặp duyệt qua từng dòng dữ liệu
for(int i=0; i<soapArray.getPropertyCount(); i++)
{
//(SoapObject) soapArray.getProperty(i) get item at position i
SoapObject soapItem =(SoapObject) soapArray.getProperty(i);
//soapItem.getProperty("CateId") get value of CateId property
//phải mapp đúng tên cột:
String cateId=soapItem.getProperty("CateId").toString();
String cateName=soapItem.getProperty("CateName").toString();
//đẩy vào array
arrCate.add(cateId+" - "+cateName);
}
//xác nhận cập nhật giao diện
adapter.notifyDataSetChanged();
}
catch(Exception e){}}
}
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<Button
android:id="@+id/btnlistcatalog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Get List Catalog" />
<ListView
android:id="@+id/lvcatalog"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ListProductByCatalogActivity" >
<ListView
android:id="@+id/lvproduct"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
|
package tranduythanh.com;
public class Product {
private String productId;
private String productName;
private int quantity;
private double unitPrice;
private double totalMoney;
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public double getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(double unitPrice) {
this.unitPrice = unitPrice;
}
public double getTotalMoney() {
return totalMoney;
}
public void setTotalMoney(double totalMoney) {
this.totalMoney = totalMoney;
}
public Product(String productId, String productName, int quantity,
double unitPrice, double totalMoney) {
super();
this.productId = productId;
this.productName = productName;
this.quantity = quantity;
this.unitPrice = unitPrice;
this.totalMoney = totalMoney;
}
@Override
public String toString() {
return this.productName+"-"+(this.totalMoney);
}
}
|
package tranduythanh.com;
public class Cate {
private String cateId;
private String cateName;
public String getCateId() {
return cateId;
}
public void setCateId(String cateId) {
this.cateId = cateId;
}
public String getCateName() {
return cateName;
}
public void setCateName(String cateName) {
this.cateName = cateName;
}
public Cate(String cateId, String cateName) {
super();
this.cateId = cateId;
this.cateName = cateName;
}
@Override
public String toString() {
return this.cateId.trim()+" - "+this.cateName.trim();
}
}
|
package tranduythanh.com;
import java.util.ArrayList;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.MarshalFloat;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.os.Bundle;
import android.os.StrictMode;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends Activity {
Button btngetlist;
ListView lvcatalog;
final String URL="http://testdrthanh.somee.com/mywebservice.asmx?WSDL";
ArrayList<Cate> arrCate=new ArrayList<Cate>();
ArrayAdapter<Cate>adapter=null;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
lvcatalog=(ListView) findViewById(R.id.lvcatalog);
btngetlist=(Button) findViewById(R.id.btnlistcatalog);
btngetlist.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0)
{doGetList();}
});
adapter=new ArrayAdapter<Cate>
(this, android.R.layout.simple_list_item_1, arrCate);
lvcatalog.setAdapter(adapter);
lvcatalog.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
//xử lý hiển thị danh sách sản phẩm theo danh mục
Cate c=arrCate.get(arg2);
Intent in=new Intent(MainActivity.this, ListProductByCatalogActivity.class);
in.putExtra("cateid", c.getCateId());
startActivity(in);
}
});
}
public void doGetList() {
try{final String NAMESPACE="http://tranduythanh.com/";
final String METHOD_NAME="getListCatalog";
final String SOAP_ACTION=NAMESPACE+METHOD_NAME;
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope=
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
//Nếu truyền số thực trên mạng bắt buộc phải đăng ký MarshalFloat
//không có nó thì bị báo lỗi
MarshalFloat marshal=new MarshalFloat();
marshal.register(envelope);
HttpTransportSE androidHttpTransport=
new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
//Get Array Catalog into soapArray
SoapObject soapArray=(SoapObject) envelope.getResponse();
arrCate.clear();
//soapArray.getPropertyCount() return number of
//element in soapArray
//vòng lặp duyệt qua từng dòng dữ liệu
for(int i=0; i<soapArray.getPropertyCount(); i++)
{
//(SoapObject) soapArray.getProperty(i) get item at position i
SoapObject soapItem =(SoapObject) soapArray.getProperty(i);
//soapItem.getProperty("CateId") get value of CateId property
//phải mapp đúng tên cột:
String cateId=soapItem.getProperty("CateId").toString();
String cateName=soapItem.getProperty("CateName").toString();
//đẩy vào array
Cate c=new Cate(cateId, cateName);
arrCate.add(c);
}
//xác nhận cập nhật giao diện
adapter.notifyDataSetChanged();
}
catch(Exception e)
{
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}
}
}
|
package tranduythanh.com;
import java.util.ArrayList;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.MarshalFloat;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.os.Bundle;
import android.os.StrictMode;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class ListProductByCatalogActivity extends Activity {
ListView lvproduct;
final String URL="http://testdrthanh.somee.com/mywebservice.asmx?WSDL";
ArrayList<Product> arrProduct=new ArrayList<Product>();
ArrayAdapter<Product>adapter=null;
String cateId="";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_product_by_catalog);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
lvproduct=(ListView) findViewById(R.id.lvproduct);
adapter=new ArrayAdapter<Product>
(this, android.R.layout.simple_list_item_1, arrProduct);
lvproduct.setAdapter(adapter);
Intent in=getIntent();
cateId= in.getStringExtra("cateid");
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
doGetListProduct();
}
public void doGetListProduct()
{
try{
final String NAMESPACE="http://tranduythanh.com/";
final String METHOD_NAME="getListProductByCatalogId";
final String SOAP_ACTION=NAMESPACE+METHOD_NAME;
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("id", cateId);
SoapSerializationEnvelope envelope=
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
MarshalFloat marshal=new MarshalFloat();
marshal.register(envelope);
HttpTransportSE androidHttpTransport=
new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
//Get Array Catalog into soapArray
SoapObject soapArray=(SoapObject) envelope.getResponse();
arrProduct.clear();
//soapArray.getPropertyCount() return number of
//element in soapArray
//vòng lặp duyệt qua từng dòng dữ liệu
for(int i=0; i<soapArray.getPropertyCount(); i++)
{
//(SoapObject) soapArray.getProperty(i) get item at position i
SoapObject soapItem =(SoapObject) soapArray.getProperty(i);
//phải map đúng tên cột:
String productId=soapItem.getProperty("ProductId").toString();
String productName=soapItem.getProperty("ProductName").toString();
String squantity=soapItem.getProperty("Quantity").toString();
String sunitPrice=soapItem.getProperty("UnitPrice").toString();
String stotalMoney=soapItem.getProperty("TotalMoney").toString();
int quantity=Integer.parseInt(squantity);
double unitPrice=Double.parseDouble(sunitPrice);
double totalMoney=Double.parseDouble(stotalMoney);
//đẩy vào array
Product p=new Product(productId, productName, quantity, unitPrice, totalMoney);
arrProduct.add(p);
}
//xác nhận cập nhật giao diện
adapter.notifyDataSetChanged();
}
catch(Exception e) {}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.list_product_by_catalog, menu);
return true;
}
}
|
//10 - thêm 1 catalog vào CSDL
[WebMethod]
public int insertCatalog(Catalog cate)
{
try
{
cate.Products.Clear();
db.Catalogs.InsertOnSubmit(cate);
db.SubmitChanges();
}
catch
{
return -1;
}
return 1;
}
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFF80"
android:text="Input Catalog:"
android:textSize="20sp" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#F0E7B3"
android:text="Cate Id:" />
<EditText
android:id="@+id/editcateid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" >
<requestFocus />
</EditText>
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#F0E7B3"
android:text="Cate Name:" />
<EditText
android:id="@+id/editcatename"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" />
</TableRow>
<TableRow
android:id="@+id/tableRow4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btninsertcate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:text="Insert Cate" />
</TableRow>
</TableLayout>
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FF80FF"
android:text="Show List Catalog" />
<Button
android:id="@+id/btnshowlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Show List Catalog" />
<ListView
android:id="@+id/lvcatalog"
android:layout_width="match_parent"
android:layout_height="fill_parent" >
</ListView>
</LinearLayout>
|
package tranduythanh.com;
import java.util.ArrayList;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.MarshalFloat;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.os.Bundle;
import android.os.StrictMode;
import android.renderscript.Mesh.Primitive;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends Activity
implements OnClickListener{
EditText txtcateid,txtcatename;
Button btninsertcate,btnlistcate;
ListView lvlistcatalog;
final String NAMESPACE="http://tranduythanh.com/";
final String URL="http://testdrthanh.somee.com/mywebservice.asmx?WSDL";
ArrayList<String> arrCate=new ArrayList<String>();
ArrayAdapter<String>adapter=null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
txtcateid=(EditText) findViewById(R.id.editcateid);
txtcatename=(EditText) findViewById(R.id.editcatename);
btninsertcate=(Button) findViewById(R.id.btninsertcate);
btnlistcate=(Button) findViewById(R.id.btnshowlist);
btninsertcate.setOnClickListener(this);
btnlistcate.setOnClickListener(this);
lvlistcatalog=(ListView) findViewById(R.id.lvcatalog);
adapter=new ArrayAdapter<String>
(this, android.R.layout.simple_list_item_1, arrCate);
lvlistcatalog.setAdapter(adapter);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
@Override
public void onClick(View v) {
if(v==btnlistcate)
{
showlistcate();
}
else if(v==btninsertcate)
{
insertcate1();
}
}
public void insertcate1()
{
try
{
final String METHOD_NAME="insertCatalog";
final String SOAP_ACTION=NAMESPACE+METHOD_NAME;
SoapObject request=new SoapObject
(NAMESPACE, METHOD_NAME);
//tạo đối tượng SoapObject với tên cate như parameter trong service description
SoapObject newCate=new
SoapObject(NAMESPACE, "cate");
//truyền giá trị cho các đối số (properties) như service desctiption
newCate.addProperty("CateId",
txtcateid.getText()+"");
newCate.addProperty("CateName",
txtcatename.getText()+"");
request.addSoapObject(newCate);
SoapSerializationEnvelope envelope=
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport=
new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
//vì hàm insertCatalog trả về kiểu int
SoapPrimitive soapPrimitive= (SoapPrimitive)
envelope.getResponse();
//chuyển về int để kiểm tra insert thành công hay thất bại
int ret=Integer.parseInt(soapPrimitive.toString());
String msg="Insert Cate Successful";
if(ret<=0)
msg="Insert Cate Failed";
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
}
catch(Exception e)
{
}
}//end insert cate
public void showlistcate() {
try
{
final String METHOD_NAME="getListCatalog";
final String SOAP_ACTION=NAMESPACE+METHOD_NAME;
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope=
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
MarshalFloat marshal=new MarshalFloat();
marshal.register(envelope);
HttpTransportSE androidHttpTransport=
new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
//Get Array Catalog into soapArray
SoapObject soapArray=(SoapObject) envelope.getResponse();
arrCate.clear();
//soapArray.getPropertyCount() return number of
//element in soapArray
for(int i=0; i<soapArray.getPropertyCount(); i++)
{
//(SoapObject) soapArray.getProperty(i) get item at position i
SoapObject soapItem =(SoapObject) soapArray.getProperty(i);
//soapItem.getProperty("CateId") get value of CateId property
String cateId=soapItem.getProperty("CateId").toString();
String cateName=soapItem.getProperty("CateName").toString();
arrCate.add(cateId+" - "+cateName);
}
arrCate.add(soapArray.getPropertyCount()+" -- cate");
adapter.notifyDataSetChanged();
}
catch(Exception e)
{
}
}
}
|