1

Im trying to execute a return of soap and dont it shows a error in getproperty.

I tried of two ways.

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());

both not worked and show a NullPointerException in line of desc.settext...

Anyone can help me ?

Thks

Hariharan
  • 24,741
  • 6
  • 50
  • 54

0 Answers0