Synthesis AG - SyncML Discussion Forum  

Go Back   Synthesis AG - SyncML Discussion Forum > Synthesis SyncML Products (english) > SyncML Servers (Linux, Windows, MacOS X)

Reply
 
Thread Tools Display Modes
  #1  
Old 2006-08-14, 15:17
rjroos rjroos is offline
Junior Member
 
Join Date: 2006-08
Posts: 1
Default Unsupported media type when syncing with sync4j

Hi we're trying to let a blackberry talk to apache with the synthesis sysync module. Unfortunately it doesn't work out of the box. We get this conversation using ngrep. Any ideas?


T 2006/08/14 13:28:20.452179 84.241.211.124:52218 -> 213.53.208.170:80 [AP]
POST /sync/ HTTP/1.1
Host: pda.base.nl
Connection: close
User-Agent:BlackBerry/4.0.2.49
Content-Length: 662
Content-Type: application/vnd.syncml+xml
Content-Language: en

<SyncML>
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>12345678</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>http://pda.base.nl:/sync/</LocURI></Target>
<Source><LocURI>sc-pim-blackberry</LocURI></Source>
<Cred>
<Meta><Type mlns="syncml:metinf">syncml:auth-basic</Type></Meta>
<Data>dGVzdHVzZXI6dGVzdDE=</Data>
</Cred>
</SyncHdr>
<SyncBody>
<Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target>
<LocURI>scal</LocURI>
</Target>
<Source>
<LocURI>scal</LocURI>
</Source>
<Meta>
<Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>1155554895860</Next>
</Anchor>
</Meta>
</Item>
</Alert>
<Final/>
</SyncBody>
</SyncML>


T 2006/08/14 13:28:20.478057 213.53.208.170:80 -> 84.241.211.124:52218 [AP]
HTTP/1.1 415 Unsupported Media Type
Date: Mon, 14 Aug 2006 11:28:20 GMT
Server: Apache/1.3.33 (Debian GNU/Linux)
X-SyncML-Server: Synthesis SyncML Server/2.1.1.18
X-SyncCode: -1615981293
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Expires: Mon, 14 Aug 2006 11:28:20 GMT

144
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>415 Unsupported Media Type</TITLE>
</HEAD><BODY>
<H1>Unsupported Media Type</H1>
The supplied request data is not in a format
acceptable for processing by this resource
<HR>
<ADDRESS>Apache/1.3.33 Server at pda.base.nl Port 80</ADDRESS>
</BODY></HTML>

Reply With Quote
  #2  
Old 2006-08-14, 16:53
luz's Avatar
luz luz is offline
plan44.ch
 
Join Date: 2006-06
Posts: 348
Default Re: Unsupported media type when syncing with sync4j

This is because the XML data sent by the sync4j client lacks the <?xml version="1.0"?> prologue, so it is not recognized by the server as XML.

We are working to make the server more tolerant to such minor format problems in future versions. But in the strict sense, it's a sync4j problem.
__________________
Lukas Zeller, plan44.ch
Reply With Quote
  #3  
Old 2006-09-08, 16:19
chrisv chrisv is offline
Junior Member
 
Join Date: 2006-09
Posts: 1
Default Re: Unsupported media type when syncing with sync4j

I've just changed the Sync4J application, and now it does include <?xml version="1.0"?>, but we still get the same response:

Code:
POST /sync/ HTTP/1.1
Content-Type:application/vnd.syncml+xml
Connection:close
Via:MDS_4.1.0.22
Accept:*/*
Content-Language:en-US
Host:pda.base.nl
Content-Length:736
User-Agent:BlackBerry/4.1.0.139

<?xml version="1.0"?>
<SyncML>
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>1157720959267</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>http://pda.base.nl/sync/</LocURI></Target>
<Source><LocURI>sc-pim-blackberry</LocURI></Source>
<Cred>
<Meta><Type xmlns="syncml:metinf">syncml:auth-basic</Type></Meta>
<Data>dGVzdHVzZXI6dGVzdDE=</Data>
</Cred>
<Meta><MaxMsgSize>40768</MaxMsgSize></Meta>
</SyncHdr>
<SyncBody>
<Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target><LocURI>scard</LocURI></Target>
<Source><LocURI>scard</LocURI></Source>
<Meta>
<Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>1157720959267</Next>
</Anchor>
</Meta>
</Item>
</Alert>
<Final/>
</SyncBody>
</SyncML>

HTTP/1.1 500 Internal Server Error
Date: Fri, 08 Sep 2006 13:09:19 GMT
Server: Apache/1.3.33 (Debian GNU/Linux)
X-SyncML-Server: Synthesis SyncML Server/2.1.1.18
X-SyncCode: -1615981293
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Expires: Fri, 08 Sep 2006 13:09:19 GMT
251

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
 xxxxxxxxx and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at pda.base.nl Port 80</ADDRESS>
</BODY></HTML>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 07:43.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.