0
androidHttpTransport.call(SOAP_ACTION + GetPersonnel_METHOD, envelope);
SoapObject result = (SoapObject)envelope.getResponse();

这是我得到的肥皂反应

anyType{EntityKey=anyType{EntityContainerName=DSS_SOTUBIEntities;
EntityKeyValues=anyType{EntityKeyMember=anyType{Key=PersonnelID; Value=2; }; }; 
EntitySetName=Personnels; }; Adresse=ariana; CAB=784555584; CodeCommande=1; CommandeID=5;
 CommercialID=2; DateCreation=2013-12-13T00:00:00; 

查看属性

String res=null;
SoapObject pii = (SoapObject)result.getProperty(0);
res = pii;

res 显示以下结果:

anyType{EntityContainerName=DSS_SOTUBIEntities;
EntityKeyValues=anyType{EntityKeyMember=anyType{Key=PersonnelID; Value=2; }; }; 
EntitySetName=Personnels;

对于 getProperty(1)

SoapObject pii = (SoapObject)result.getProperty(1);

水库显示“未定义”

如何恢复 Adresse、CAB、CodeCommande 的价值...

感谢您的帮助。

4

1 回答 1

0

尝试这个

SoapObject Address = (SoapObject)result.getProperty("Adresse");

您在肥皂响应中错过了一个右括号。我假设它在响应的末尾。

如果它不起作用,请检查可用的属性数量

response.getPropertyCount();
于 2013-08-14T17:59:05.520 回答