在我的 WebService 中,我有一个简单的类:
public class UserName
{
public UserName() { }
public UserName(string loginname, bool logged)
{
this._loginname = loginname;
this._logged = logged;
}
public string Loginname
{
set { this._loginname = value; }
get { return this._loginname; }
}
public bool Logged
{
set { this._logged = value; }
get { return this._logged; }
}
private string _loginname = string.Empty;
private bool _logged = false;
}
我与我的 IIS(ADB 模拟器)通信:
SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(Request);
HttpTransportSE transport= new HttpTransportSE(URL);
transport.call(SOAP_ACTION, soapEnvelope);
SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse();
好的,这工作正常。
我不知道如何在 android 代码中获取 UserName 对象。如何制作响应对象类?