[sync] Empty URI for xmlns="" in the elements
Daniel Vandal
dvandal at infoteck.qc.ca
Fri Aug 20 12:32:54 PDT 2004
Hi,
In the framework, in the file XML/WBXML/ContentHandler.php, on line 75, I changed :
if ((!$currentUri) || ($currentUri != $uri)) {
$this->_output .= ' xmlns="' . $uri . '"';
}
to:
if (!empty($uri) && ((!$currentUri) || ($currentUri != $uri))) {
$this->_output .= ' xmlns="' . $uri . '"';
}
because, when I was trying to sync my iPAQ h4100 with horde using Sync4j SyncML client, the client wasn't able to find the <SyncBody> element.
The problem was that the server was sending to the client <SyncBody xmlns=""> instead of <SyncBody>.
This has fixed one of my problems, but now the client give me the error :
error message: Status command for SyncHeader not found!
I included in attachment the Sync4j debug file so that you could have a look.
---
Daniel Vandal
dvandal at infoteck.qc.ca
-------------- next part --------------
INFO - Preparing sync...
DEBUG - 2
DEBUG - [login]:[password]
DEBUG - Initialization message:
DEBUG - <SyncML>
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>1</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>http://beta.courriels.com</LocURI></Target>
<Source><LocURI>B600E0D03041977E0</LocURI></Source>
<Cred>
<Meta><Format xmlns='syncml:metinf'>b64</Format><Type xmlns='syncml:metinf'>syncml:auth-basic</Type></Meta>
<Data>[encrypted data]</Data>
</Cred>
</SyncHdr>
<SyncBody>
<Alert>
<CmdID>1</CmdID>
<Data>201</Data>
<Item>
<Target><LocURI>./task</LocURI></Target>
<Source><LocURI>./task</LocURI></Source>
<Meta><Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>29656810</Next>
</Anchor></Meta>
</Item>
</Alert>
<Final/>
</SyncBody>
</SyncML>
DEBUG - Connecting to beta.courriels.com:80
DEBUG - Requesting resource /rpc.php
DEBUG - Content-length: 1102
DEBUG - size: 1103, read: 1102
DEBUG - Response:
DEBUG - <SyncML><SyncHdr xmlns="syncml:syncml1.1"><VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>1</SessionID><MsgID>1</MsgID><Target><LocURI>B600E0D03041977E0</LocURI></Target><Source><LocURI>http://beta.courriels.com</LocURI></Source><RespURI>http://beta.courriels.com</RespURI></SyncHdr><SyncBody><Status xmlns="syncml:syncml1.1"><CmdID>1</CmdID><MsgRef>1</MsgRef><CmdRef>0</CmdRef><Cmd>SyncHdr</Cmd><SourceRef>B600E0D03041977E0</SourceRef><TargetRef>http://beta.courriels.com</TargetRef><Data>212</Data></Status><Status xmlns="syncml:syncml1.1"><CmdID>2</CmdID><MsgRef>1</MsgRef><CmdRef>1</CmdRef><Cmd>Alert</Cmd><SourceRef>./task</SourceRef><TargetRef>./task</TargetRef><Data>508</Data><Item><Data><Anchor><Next>29656810</Next><Last>0</Last></Anchor></Data></Item></Status><Alert xmlns="syncml:syncml1.1"><CmdID>3</CmdID><Data>201</Data><Item><Target><LocURI>./task</LocURI></Target><Source><LocURI>./task</LocURI></Source><Meta><Anchor xmlns="syncml:metinf1.1"><Last>0</Last><Next>1093029532</Next></Anchor></Meta></Item></Alert><Final xmlns="syncml:syncml1.1"></Final></SyncBody></SyncML>
DEBUG - Response message:
DEBUG - <SyncML><SyncHdr xmlns="syncml:syncml1.1"><VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>1</SessionID><MsgID>1</MsgID><Target><LocURI>B600E0D03041977E0</LocURI></Target><Source><LocURI>http://beta.courriels.com</LocURI></Source><RespURI>http://beta.courriels.com</RespURI></SyncHdr><SyncBody><Status xmlns="syncml:syncml1.1"><CmdID>1</CmdID><MsgRef>1</MsgRef><CmdRef>0</CmdRef><Cmd>SyncHdr</Cmd><SourceRef>B600E0D03041977E0</SourceRef><TargetRef>http://beta.courriels.com</TargetRef><Data>212</Data></Status><Status xmlns="syncml:syncml1.1"><CmdID>2</CmdID><MsgRef>1</MsgRef><CmdRef>1</CmdRef><Cmd>Alert</Cmd><SourceRef>./task</SourceRef><TargetRef>./task</TargetRef><Data>508</Data><Item><Data><Anchor><Next>29656810</Next><Last>0</Last></Anchor></Data></Item></Status><Alert xmlns="syncml:syncml1.1"><CmdID>3</CmdID><Data>201</Data><Item><Target><LocURI>./task</LocURI></Target><Source><LocURI>./task</LocURI></Source><Meta><Anchor xmlns="syncml:metinf1.1"><Last>0</Last><Next>1093029532</Next></Anchor></Meta></Item></Alert><Final xmlns="syncml:syncml1.1"></Final></SyncBody></SyncML>
ERROR - Error code: 700
error message: Status command for SyncHeader not found!
INFO - Sync ended
More information about the sync
mailing list