[sync] And one more time: Auth. problems

Easy lists at digital.ktu.lt
Sun Jul 31 14:12:33 PDT 2005


Hello one more time.
So, I'we compared sync4j and horde sync logs. I'we found that:
. client sends completely identical initial message to both of them.
. both horde and sync4j sends back verry similar messages(see at the bottom)
. client responds only to sync4j.
Simple question: how to check, what mime type is set when sending back the 
packet? May it be, that it sends pure xml? Or the mime type is set not to 
application/vnd.syncml+wbxml? I cannot imagine any other reasons, as server 
respond messages ar approximately identical. I think it can be only the thing 
that client ignores server's message. And this could happen only because of mime 
type.

As You will notice those messages are verry similar, and I couldn't find any 
mistakes(yes, now, I'm reading syncml_represent_v101_20010615.pdf). The phone 
_should_ interpretate them both the same way, having, of cource, that it gets 
them both. And here is the question...

Algirdas

So, message sent by sync4j:
<SyncML>
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>5</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>syncml-phone</LocURI></Target>
<Source><LocURI>http://myserver:8888/sync4j/sync</LocURI></Source>
</SyncHdr>
<SyncBody>
<Status>
<CmdID>1</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>0</CmdRef>
<Cmd>SyncHdr</Cmd>
<TargetRef>http://myserver:8888/sync4j/sync</TargetRef>
<SourceRef>syncml-phone</SourceRef>
<Chal>
<Meta>
<Format>b64</Format>
<Type>syncml:auth-basic</Type>
</Meta>
</Chal>
<Data>407</Data>
</Status>
<Status>
<CmdID>2</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>1</CmdRef>
<Cmd>Alert</Cmd>
<TargetRef>./contact</TargetRef>
<SourceRef>/telecom/pb.vcf</SourceRef>
<Data>407</Data>
</Status>
<Status>
<CmdID>3</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>2</CmdRef>
<Cmd>Put</Cmd>
<SourceRef>./devinf11</SourceRef>
<Data>407</Data>
</Status>
<Final></Final>
</SyncBody>
</SyncML>

Message sent by horde:
<SyncML xmlns="syncml:SYNCML1.1">
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>15</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>IMEI:356228002178777</LocURI></Target>
<Source><LocURI>http://myserver/rpc.php</LocURI></Source>
</SyncHdr>
<SyncBody>
<Status>
<CmdID>1</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>0</CmdRef>
<Cmd>SyncHdr</Cmd>
<SourceRef>IMEI:356228002178777</SourceRef>
<TargetRef>http://myserver/rpc.php</TargetRef>
<Chal>
<Meta>
<Format xmlns="syncml:metinf">b64</Format>
<Type xmlns="syncml:metinf">syncml:auth-basic</Type>
</Meta>
</Chal>
<Data>407</Data>
</Status>
<Status>
<CmdID>2</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>1</CmdRef>
<Cmd>Alert</Cmd>
<Data>401</Data>
</Status>
<Status>
<CmdID>3</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>2</CmdRef>
<Cmd>Put</Cmd>
<SourceRef>./devinf11</SourceRef>
<Data>407</Data>
</Status>
<Final></Final>
</SyncBody>
</SyncML>

Btw, I'we tried to change command from 401 to 407 in 
/usr/lib/php/Horde/SyncML/Constants.php(and packet was sent with that command):
<SyncML xmlns="syncml:SYNCML1.1">
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>15</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>IMEI:356228002178777</LocURI></Target>
<Source><LocURI>http://myserver/rpc.php</LocURI></Source>
</SyncHdr>
<SyncBody>
<Status>
<CmdID>1</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>0</CmdRef>
<Cmd>SyncHdr</Cmd>
<SourceRef>IMEI:356228002178777</SourceRef>
<TargetRef>http://myserver/rpc.php</TargetRef>
<Chal>
<Meta>
<Format xmlns="syncml:metinf">b64</Format>
<Type xmlns="syncml:metinf">syncml:auth-basic</Type>
</Meta>
</Chal>
<Data>407</Data>
</Status>
<Status>
<CmdID>2</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>1</CmdRef>
<Cmd>Alert</Cmd>
<Data>401</Data>
</Status>
<Status>
<CmdID>3</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>2</CmdRef>
<Cmd>Put</Cmd>
<SourceRef>./devinf11</SourceRef>
<Data>407</Data>
</Status>
<Final></Final>
</SyncBody>
</SyncML>

But there was no response. 




More information about the sync mailing list