Below is the message i posted on a SyncML group on yahoo.com, but i suspect that it is not the problem with SyncML protocol and how it is handled. I am suspecting that my PHP Script is not sending the package back out, either incorrect headers or not going to the right address.
Anything regards PHP, i think would be best to ask on this forum. I was asking for a way to look at my sent out header is because i am thinking that that might be causing problem.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Taking into consideration that i am using PHP 4.1.2
(Debian Stable version) to build the SyncML server.
I received the Client Initial Package as shown below
Code: Select all
<SyncML>
<SyncHdr>
<VerDTD>1.0</VerDTD>
<VerProto>SyncML/1.0</VerProto>
<SessionID>11</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>http://pc6.homelinux.com/~myleow/syncml/index.php</LocURI></Targ\
et>
<Source><LocURI>010197000074551</LocURI></Source>
<Meta><MaxMsgSize
xmlns='syncml:metinf'>2700</MaxMsgSize></Meta>
</SyncHdr>
<SyncBody>
<Put>
<CmdID>1</CmdID>
<Meta><Type
xmlns='syncml:metinf'>application/vnd.syncml-devinf+wbxml</Type></Meta>
<Item>
<Source><LocURI>./devinf10</LocURI></Source>
<Data><DevInf>...</DevInf></Data>
</Item>
</Put>
<Alert>
<CmdID>2</CmdID>
<Cred>
<Meta>
<Format xmlns='syncml:metinf'>b64</Format>
<Type
xmlns='syncml:metinf'>syncml:auth-basic</Type>
</Meta>
<Data>YWRnam06ZG13YWp0Lmdw</Data>
</Cred>
<Data>201</Data>
<Item>
<Target><LocURI>Contacts</LocURI></Target>
<Source><LocURI>EriPBDB</LocURI></Source>
<Meta>
<Anchor xmlns='syncml:metinf'>
<Last xmlns='syncml:metinf'>41</Last>
<Next xmlns='syncml:metinf'>41</Next>
</Anchor>
</Meta>
</Item>
</Alert>
<Final/>
</SyncBody>
</SyncML>
============================================
====The Following is my response package====
============================================
Code: Select all
<SyncML>
<SyncHdr>
<VerDTD>1.0</VerDTD>
<VerProto>SyncML/1.0</VerProto>
<SessionID>11</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>010197000074551</LocURI></Target>
<Source><LocURI>http://pc6.homelinux.com/~myleow/syncml/index.php</LocURI></Sour\
ce>
<Meta><MaxMsgSize
xmlns='syncml:metinf'>2700</MaxMsgSize></Meta>
</SyncHdr>
<SyncBody>
<Status>
<CmdID>1</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>0</CmdRef>
<Cmd>SyncHdr</Cmd>
<TargetRef>http://pc6.homelinux.com/~myleow/syncml/index.php</TargetRef>
<SourceRef>010197000074551</SourceRef>
<Chal>
<Meta>
<Type
xmlns='syncml:metinf'>syncml:auth-basic</Type>
<Format xmlns='syncml:metinf'>b64</Format>
</Meta>
</Chal>
<Data>407</Data>
</Status>
<Status>
<CmdID>2</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>1</CmdRef>
<Cmd>Put</Cmd>
<Data>407</Data>
</Status>
<Status>
<CmdID>3</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>2</CmdRef>
<Cmd>Alert</Cmd>
<Data>407</Data>
</Status>
<Final/>
</SyncBody>
</SyncML>
The reponse package is in turn encoded using my WBXML
Codec. I think my codec is working fine because when
i encode the decoded client initial message, it is
exactly the same.
Anyway. After i encoded the reply, i called it
$wbxml_obj in my PHP script.
I then proceed in sending it back out by
Code: Select all
<?php
header ("POST HTTP/1.1 200 OK");
header ("Content-Type: application/vnd.syncml+wbxml");
header ("Accept-Charset: UTF-8");
header ("transfer-coding: chunked");
echo $wbxml_obj;
?>
I am stuck after this stage, because there is no
indication of error beside Synchronization Interrupted
on my Sony Ericsson T-616/610.
I don't know if the package is actually sent out from
my server, if the client received the package or if
the package itself has error. Basically, i can't even
start the communication channel going with a simple
challenge.
==========================================
==Below is the Header information
==from $_SERVER received by server
==========================================
Code: Select all
CONTENT_LENGTH == 1340
CONTENT_TYPE == application/vnd.syncml+wbxml
DOCUMENT_ROOT == /var/www
HTTP_ACCEPT == application/vnd.syncml+wbxml,
text/x-vcard, text/x-vcalendar, image/vnd.wap.wbmp,
image/gif
HTTP_ACCEPT_APPLICATION == 1,2
HTTP_ACCEPT_CHARSET == US-ASCII, ISO-8859-1, UTF-8,
ISO-10646-UCS-2
HTTP_ACCEPT_LANGUAGE == en
HTTP_BEARER_INDICATION == 0
HTTP_CLIENT_IP == 10.184.24.197
HTTP_HNAME1 == hvalue1
HTTP_HNAME2 ==
HTTP_HNAME3 == hvalue3
HTTP_HOST == pc6.homelinux.com
HTTP_USER_AGENT == SonyEricssonT616/R101
Profile/MIDP-1.0 Configuration/CLDC-1.0
HTTP_VIA == WTP/1.1 proatlwap02 (Nokia WAP Gateway
4.0/ECD10/4.0.64), HTTP/1.1 proatledmpxy02ї0540000D]
(Traffic-Server/5.1.3-55590 їuScM])
HTTP_X_NETWORK_INFO == GPRS,unsecured
HTTP_X_NOKIA_BEARER == GPRS
HTTP_X_NOKIA_CONNECTION_MODE == CMODE
HTTP_X_NOKIA_GATEWAY_ID == NWG/4.0/Build64
HTTP_X_WAP_PROFILE ==
http://wap.sonyericsson.com/UAprof/T616R101.xml
PATH == /bin:/usr/bin:/sbin:/usr/sbin
REMOTE_ADDR == 66.94.27.3
REMOTE_PORT == 35374
SCRIPT_FILENAME == /home/myleow/public_html/syncml/index.php
SERVER_ADDR == 192.168.1.4
SERVER_ADMIN == webmaster@icees.com
SERVER_NAME == www.icees.com
SERVER_PORT == 80
SERVER_SIGNATURE == <ADDRESS>Apache/1.3.26 Server at www.icees.com Port 80</ADDRESS>
SERVER_SOFTWARE == Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
UNIQUE_ID == QRv@Yn8AAAEAABlzAd0
GATEWAY_INTERFACE == CGI/1.1
SERVER_PROTOCOL == HTTP/1.1
REQUEST_METHOD == POST
QUERY_STRING ==
REQUEST_URI == /~myleow/syncml/index.php
SCRIPT_NAME == /~myleow/syncml/index.php
PATH_TRANSLATED == /home/myleow/public_html/syncml/index.php
PHP_SELF == /~myleow/syncml/index.php
argv == Array
argc == 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Thank you in advance
Regards
Mian