BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-17-2004, 02:52 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Help - Device set MimeType

Please Login to Remove!

Hi,

I develop a java application, that open a HttpConnection.
Application run in BlackBarry 7230 handleld.

In code I set MimeType by
c.setRequestProperty(PROP_CONTENT_TYPE, "text/xml" ),
but server receive "application/x-www-form-urlencoded" MimeType.

Why?

Thanks for any suggestion.
fabius

--
Fabio Maggi [email address]
www.funambol.com

643 Bair Island Road, Suite 210 Via dei Valtorta 21
Redwood City, CA 94063 (USA) 20127 Milano (Italy)

Sync4j - the open source SyncML mobile application platform - www.sync4j.org
Offline  
Old 09-20-2004, 02:57 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Sep 2004
Model: 8700r
Carrier: Rogers
Posts: 221
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you doing a POST or a GET?
Offline  
Old 09-20-2004, 05:00 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

POST.

Thanks.
fabius
Offline  
Old 09-22-2004, 01:20 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Sep 2004
Model: 8700r
Carrier: Rogers
Posts: 221
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I assume you figured out this one?
Offline  
Old 09-23-2004, 07:40 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi eradis,
actually, we haven't figured out it at all... we are getting more pessimistinc about BB is giving real support for HTTP.
We did a test with the following code:
...
(HttpConnection)Connector.open("http://server:8080/sync4j/sync;WAPGatewayIP=x.x.x.x;WAPGatewayAPN=something; WAPGatewayPort=9201", Connector.READ_WRITE, true);

c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("User-Agent" , "BlackBerry/3.6.1" );
c.setRequestProperty (PROP_CONTENT_TYPE , "application/vnd.syncml+xml" );
c.setRequestProperty (PROP_CONTENT_LENGTH , String.valueOf(length) );

os = c.openOutputStream();

for (int i = 0; i < l; i++) {
os.write(requestArray[i]);
}
os.flush();
os.close();
os = null;

...

and we looked at the GW log. It receives the formencode mimetype, regardless what we specify in the connection object.
This prevents the BB to make, for example, SyncML calls, which is badly enough.

Any suggestion?
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Agilent Keysight N6700B Low-Profile MPS Mainframe, 400 Watts, READ
$250.0
Agilent Keysight N6700B Low-Profile MPS Mainframe, 400 Watts, READ pictureTektronix. OTS9030. OTS 9030 5-slot Mainframe With 2.5 Gb/s Jitter Mod #TQ43
$5000.0
Tektronix. OTS9030. OTS 9030 5-slot Mainframe With 2.5 Gb/s Jitter Mod   #TQ43 pictureRapid Systems PX1010 2010 2050 2040 2070 2020 PCXI Mainframe with Plug-Ins
$49.99
Rapid Systems PX1010 2010 2050 2040 2070 2020 PCXI Mainframe with Plug-Ins pictureHP Agilent 70004A Mainframe Internal parts Motherboard, CRT, Cover & Dials
$40.0
HP Agilent 70004A Mainframe Internal parts Motherboard, CRT, Cover & Dials pictureTektronix TLA7012 Logic Analyzer Portable Mainframe w/ TLA7AA4 Module
$6500.0
Tektronix TLA7012 Logic Analyzer Portable Mainframe w/ TLA7AA4 Module  picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.