SoapObject的GetProperty中的NullPointer异常

时间:2014-04-18 05:16:39

标签: android getproperty

我试图执行soap的返回,而不是在getproperty中显示错误。

我试过两种方式。

1 -

SoapObject obj, obj1;
obj = (SoapObject) soapEnvelope.getResponse();
obj1 = (SoapObject) obj.getProperty("STRUCTSTK");

desc.setText(obj1.getProperty(1).toString());
prcrev.setText(String.format(obj1.getProperty(12).toString(), 0.00).toString());
saldo1.setText(obj1.getProperty(10).toString());

2 -

SoapObject obj, obj1;
obj = (SoapObject) soapEnvelope.getResponse();
obj1 = (SoapObject) obj.getProperty("STRUCTSTK");

desc.setText(obj1.getProperty("DESCPROD").toString());
prcrev.setText(String.format(obj1.getProperty("NPRCREV").toString(), 0.00).toString());
saldo1.setText(obj1.getProperty("LJ25GERAL").toString());

两者都没有效果,并在NullPointerException ...

的行中显示desc.settext

任何人都可以帮助我?

THKS

0 个答案:

没有答案