Showing posts with label Andriod. Show all posts
Showing posts with label Andriod. Show all posts

Friday, July 6, 2012

Ksoap2 Getting Values of Property or Attribute in Andriod

Hi All,

You can get the values and names of Attibutes and Properties in Ksoap2 SoapObject

// GETTING ATTIRIBUTE NAME AND VALUES IN KSOAP2
        for (int i = 0; i < yourSoapObject.getAttributeCount(); i++)
        {
            AttributeInfo attInfo = new AttributeInfo();
            yourSoapObject.getAttributeInfo(i, attInfo);
            String attributeName = attInfo.name;
            String attributeValue = yourSoapObject.getAttribute(i).toString();
          }

 // GETTING PROPERTY NAME AND VALUES IN KSOAP2
            for (int i = 0; i < yourSoapObject.getPropertyCount(); i++)
            {

                PropertyInfo attInfo = new PropertyInfo();
                yourSoapObject.getPropertyInfo(i, attInfo);
                String propertyName = attInfo.name;
                String propertyValue = yourSoapObject.getProperty(i).toString();
              }

Cheers
Varun Rathore           


 


About Me