我正在使用kSoap库进行序列化和反序列化。我的回答是XML,并将其转换为字符串。然后将其解析为“ CustomSoapSerializationEnvelope”,但是当我将其解析为Soap Object进行对象映射时,它给了我空值。 代码在这里
public SoapObject createSoapObjectFromSoapObjectString(String soapObjectString) {
CustomSoapSerializationEnvelope env = new CustomSoapSerializationEnvelope(SoapEnvelope.VER12);
env.dotNet = true;
env.setOutputSoapObject(soapObjectString);
SoapObject so = null;
try {
so = ( SoapObject) env.getResponse();
} catch (Exception e){
e.printStackTrace();
}
Log.d(TAG,"asdasd");
return so;
}
so(肥皂对象)为null。但是Env有我的回应。响应在bodyOut中,我也尝试这样做
so = ( SoapObject) env.bodyOut;
但还是同样的问题。