この方法を試してみてください。これが問題の解決に役立つことを願っています。
public class Array implements KvmSerializable {
private String sid;
private String objectType;
private String whereClause;
private String maxRows;
private String attributes;
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getObjectType() {
return objectType;
}
public void setObjectType(String objectType) {
this.objectType = objectType;
}
public String getWhereClause() {
return whereClause;
}
public void setWhereClause(String whereClause) {
this.whereClause = whereClause;
}
public String getMaxRows() {
return maxRows;
}
public void setMaxRows(String maxRows) {
this.maxRows = maxRows;
}
public String getAttributes() {
return attributes;
}
public void setAttributes(String attributes) {
this.attributes = attributes;
}
@Override
public Object getProperty(int arg0) {
// TODO Auto-generated method stub
switch (arg0){
case 0:
return sid;
case 1:
return objectType;
case 2:
return whereClause;
case 3:
return maxRows;
case 4:
return attributes;
default:
return null;
}
}
@Override
public int getPropertyCount() {
return 5; //number of passing parameters
}
@Override
public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {
switch(arg0)
{
case 0:
arg2.type = PropertyInfo.STRING_CLASS;
arg2.name = "sid";
break;
case 1:
arg2.type = PropertyInfo.STRING_CLASS;
arg2.name = "objectType";
break;
case 2:
arg2.type = PropertyInfo.STRING_CLASS;
arg2.name = "whereClause";
break;
case 3:
arg2.type = PropertyInfo.OBJECT_CLASS;
arg2.name = "maxRows";
break;
case 4:
arg2.type = PropertyInfo.OBJECT_CLASS;
arg2.name = "attributes";
break;
default:break;
}
}
@Override
public void setProperty(int arg0, Object arg1) {
switch(arg0)
{
case 0:
sid = (String)arg1;
break;
case 1:
objectType = (String)arg1;
break;
case 2:
whereClause = (String)arg1;
break;
case 3:
maxRows = (String)arg1;
break;
case 4:
attributes = (String)arg1;
break;
default:
break;
}
}
}
Array array = new Array();
array.setFirstname(firstname);
array.setLastname(lastname);
array.setAddress(address);
array.setCity(city);
array.setState(state);
doInBackground にこれを追加します。
PropertyInfo pInfo = new PropertyInfo();
pInfo.setName("array");
pInfo.setValue(array);
pInfo.setType(array.getClass());
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty(pInfo);