![]() |
#1
|
|||
|
|||
![]() I am using the SyncML SDK VC++ example to sync from a SyncML Server and I'm experienceing some difficulties with syncing. The SyncML SDK VC++ example, the InitEngineFile() gives 20010 /* error parsing config file */. The modifies version of the syncserv_odbc.xml seems to be fine since if the same xml is used with the SyClient_Demo_win32_3.0.2.2 it is able sync the contacts and the XML file even confirms to WC3 standards.
I'm able continue even after getting the parser error. I do "err= t->OpenKeyByPath( keyH,NULL, "/profiles",0 );" then : "err= t->SetStrValue( subkeyH, "serverURI", "http://sync.xyz.com" ); err= t->SetStrValue( subkeyH, "serverPassword", "test" );" But calling the any of the below functions causes a Read Access violation: " const memSize textbuffersz = 3000; //memSize textsize; memSize textsize; char textbuffer[textbuffersz]={'\0',}; err= t->GetStrValue( subkeyH, "serverURI", s ); err= t->GetValue (fSessionH, "overwrite", VALTYPE_TEXT, (appPointer)textbuffer,textbuffersz, textsize); err= t->GetValue(fSessionH, "contenttype", VALTYPE_TEXT, (appPointer)textbuffer, textbuffersz, textsize);" I presume that I need to do these functions before calling: "char buff[]="<?xml version=\"1.0\" encoding=\"UTF-8\"?><SyncML xmlns='SYNCML:SYNCML1.2'><SyncHdr><VerDTD>1.2</VerDTD><VerProto>SyncML/1.2</VerProto><SessionID>2</SessionID><MsgID>1</MsgID><Target><LocURI>http://sync.xyz.com/</LocURI></Target><Source>...</Source><Cred><Meta><Format xmlns=\'syncml:metinf\'>b64</Format><Type xmlns=\'syncml:metinf\'>syncml:auth-md5</Type></Meta><Data>d6CNybhnUnejXLRuYy7c5g==</Data></Cred><Meta><MaxMsgSize xmlns=\'syncml:metinf\'>20000</MaxMsgSize><MaxObjSize xmlns=\'syncml:metinf\'>4000000</MaxObjSize></Meta></SyncHdr><SyncBody><Get><CmdID>1</CmdID><Meta><Type xmlns=\'syncml:metinf\'>application/vnd.syncml-devinf+xml</Type></Meta><Item><Target><LocURI>./devinf12</LocURI></Target></Item></Get><Alert><CmdID>2</CmdID><Data>200</Data><Item><Target><LocURI>contacts</LocURI></Target><Source><LocURI>./contacts</LocURI></Source><Meta><Anchor xmlns=\'syncml:metinf\'><Last>20080411T111826Z</Last><Next>20080411T113102Z</Next></Anchor><MaxObjSize xmlns=\'syncml:metinf\'>4000000</MaxObjSize></Meta></Item></Alert><Final/></SyncBody></SyncML>\r\n"; appPointer aBuffer=buff; memSize aValSize=sizeof(buff); sta = t->WriteSyncMLBuffer(fSessionH, aBuffer, aValSize); " If you can please provide a working example OR atleast working settings_test() function which has the correct order of SyncML APIs to sync the syncML data, it would be very helpful. Thanks, Tej |
Thread Tools | |
Display Modes | |
|
|