PDA

View Full Version : adding properties to SoapObject


JaiHo!
04-30-2009, 07:00 AM
Dear All,

I am unable to add multilevel properites to a SoapObject. Please help me.

The format of the Input parametres is like

<m30:message name>
<m30:property1>abc</m30:property1>
<m30:property2>
<m30:property21>123</m30:property21>
<m30:property22>lmn</m30:property22>
</m30:property2>

</m30:message name>

Please help me in adding property to Input SoapObject
the code is as below:

SoapObject rpc = new SoapObject("--message block--m30 namespace", "message name");

rpc.addProperty("property1","abc");
Object o= new Object();
SoapObject sub= (SoapObject)o;
sub.addProperty("property21","123");
sub.addProperty("property22","lmn");
rpc.addProperty("prperty2",sub);


But I am getting exceptions ... Please help me out --to add this hierarchy input field.