Hi,

I am new Symbian.

I have to send a XML File to the server .

<root>
<h>
<msgt>restore</msgt>
<msg/>
<uid>919560922700</uid>
<hp>919560922700</hp>
<did>1908692458</did>
<currec>1</currec>
<totrec>1</totrec>
<loc>en_us</loc>
<ctime>1340189529699</ctime>
<lstime>1340189528844</lstime>
<synctype>
<mod>cs</mod>
<gran>contactlevel</gran>
<adde>true</adde>
<upde>true</upde>
<dele>true</dele>
</synctype>
</h>
<b>
<hp>919560922700</hp>
<username>919560922700</username>
<password>474747</password>
<phone_model>BlackBerry9300</phone_model>
</b>
</root>

and Response xml from server is: -->

<restore>OK</restore>


i tried it by :-->


HBufC8* iRegBuffer = HBufC8::NewL(1024);
HBufC* ptr1 = HBufC::NewL(30);
TPtr time = ptr1->Des();
iConnectionStatus = 2;
iRegBuffer->Des().Copy(_L("<root>"));
//TBuf<30> tempbuf1;
//tempbuf1->Des().Copy(_L("restore"));
iRegBuffer->Des().Append(_L("restore"));
//CreateHeaderXML(tempbuf1);
iRegBuffer->Des().Append(_L("<h>"));
iRegBuffer->Des().Append(_L("<msgt>"));
//iRegBuffer.Append(msgType);
iRegBuffer->Des().Append(_L("</msgt>"));
iRegBuffer->Des().Append(_L("<uid>"));
iRegBuffer->Des().Append(iMobileNo);
iRegBuffer->Des().Append(_L("</uid>"));
iRegBuffer->Des().Append(_L("<hp>"));
iRegBuffer->Des().Append(iMobileNo);
iRegBuffer->Des().Append(_L("</hp>"));
iRegBuffer->Des().Append(_L("<did>"));
iRegBuffer->Des().Append(PhoneImei());
iRegBuffer->Des().Append(_L("</did>"));
iRegBuffer->Des().Append(_L("<currec>"));
iRegBuffer->Des().Append(1);
iRegBuffer->Des().Append(_L("</currec>"));
iRegBuffer->Des().Append(_L("<totrec>"));
iRegBuffer->Des().Append(1);
iRegBuffer->Des().Append(_L("</totrec>"));
iRegBuffer->Des().Append(_L("loc>en_us</loc"));
iRegBuffer->Des().Append(_L("<ctime>"));
iRegBuffer->Des().Append(*currTime);
iRegBuffer->Des().Append(_L("</ctime>"));
iRegBuffer->Des().Append(_L("<lstime>"));
GetSubStatusSyncTime(time);
iRegBuffer->Des().Append(time);
iRegBuffer->Des().Append(_L("</lstime>"));
iRegBuffer->Des().Append(_L("<synctype><mod>cs</mod><gran>contactlevel</gran>\
<adde>true</adde><upde>true</upde><dele>true</dele></synctype>"));
iRegBuffer->Des().Append(_L("</h>"));
iRegBuffer->Des().Append(_L("<b>"));
iRegBuffer->Des().Append(_L("<hp>"));
iRegBuffer->Des().Append(iMobileNo);
iRegBuffer->Des().Append(_L("</hp>"));
iRegBuffer->Des().Append(_L("<username>"));
iRegBuffer->Des().Append(iUserNames);
iRegBuffer->Des().Append(_L("</username>"));
iRegBuffer->Des().Append(_L("<password>"));
iRegBuffer->Des().Append(iPassword);
iRegBuffer->Des().Append(_L("</password>"));
iRegBuffer->Des().Append(_L("<phone_model>"));
iRegBuffer->Des().Append(iAxiomPhoneModel);
iRegBuffer->Des().Append(_L("</phone_model>"));
iRegBuffer->Des().Append(_L("</b>"));
iRegBuffer->Des().Append(_L("</root>"));
servlet_data = iRegBuffer;


Is there any issue in this format. i am unable to sending it to the server.
Please suggest for the same . How we will get the response from the server .

Thanks in advance .