user2330792
user2330792

Reputation: 67

android soap service : how to get the property of the model

i am developing a android application which use .net wsdl service. i can able to get result using soap object.

i tired to access the property but no use.

the problem is the property name are appended with random names .

please check the below image . instead for BidAccepted_BackingField i am getting _x003c_BidAccepted some please help me to solve this problem.

Thanks in advance...

enter image description here

Upvotes: 1

Views: 606

Answers (1)

MDroid
MDroid

Reputation: 550

:) Hope this can be helpful to you..

Try like this

    SoapEnvelope result = (SoapEnvelope) envelope.getResponse();
    Log.d("result : ", "" + result.toString());
    int elementCount = result.getPropertyCount();
    Log.d("count : ", ""+elementCount);
    for (int i = 0; i < elementCount; i++) 
    {
        Object property = result.getProperty(i);
        SoapObject obj= (SoapObject)property;               
        Log.d("OBject: ", ""+obj);

        String property_name=obj.getProperty(your_property_name).toString();

     }

Upvotes: 1

Related Questions