BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-09-2008, 02:53 AM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8700
PIN: N/A
Carrier: bb
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default MDS not working with JDE 4.3

Please Login to Remove!

Hi

I'm using Blackberry to develop an application to send data over HTTP. I am posting the data from blackberry to a java servlet (web server).
It is working fine when I am working with JDE 4.2.0 and JDE 4.2.1 .
But not getting data in the java servlet when I send data using JDE 4.3.0 . No exeception printed. And also got the httpConnection.getResponseCode() as 200

I tried with the MDS that come with the JDE4.3 and the MDS in "BlackBerry Email and MDS Services Simulators 4.1.4"

Any help would be appreciated.

below is the code I am using to post data.

url is the path to servlet and
str is the data

Code:
byte[] data = str.getBytes();
int length = data.length;
httpConnection = (HttpConnection) Connector.open(url, Connector.WRITE);
httpConnection .setRequestMethod(HttpConnection.POST);
httpConnection .setRequestProperty("User-Agent",
	"Profile/MIDP-1.0 Configuration/CLDC-1.0");
httpConnection .setRequestProperty("Content-Language", "en-US");
httpConnection .setRequestProperty("Accept",						"application/octet-stream");
httpConnection.setRequestProperty("Content-Length", Integer.toString(length));
output = httpConn.openDataOutputStream();
output.write(data, 0 ,length);
return 0;
Offline  
Old 07-09-2008, 03:41 AM   #2 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8700
PIN: N/A
Carrier: bb
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi thanks to GOD and all forum members/viewers.

the reason was I am immediatly return after writing data, It works fine when I read the inputstream.
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

IBM WHEELWRITER PRINTWHEEL COURIER 10- BRAND NEW - NOT OEM
$34.91
IBM WHEELWRITER PRINTWHEEL COURIER 10- BRAND NEW - NOT OEM picture1958 IBM typewriter parts catelog and price list OEM
$34.99
1958 IBM typewriter parts catelog and price list OEM pictureOEM LCD MONITOR CONTROLLER BOARD 14R0006--IBM SURE POS 4840-563 TOUCH SCREEN
$4.99
OEM LCD MONITOR CONTROLLER BOARD 14R0006--IBM SURE POS 4840-563 TOUCH SCREEN pictureOEM CPU HEATSINK RETENTION MOUNT KIT 14R0012--IBM SURE POS 4840-563 TOUCH SCREEN
$2.99
OEM CPU HEATSINK RETENTION MOUNT KIT 14R0012--IBM SURE POS 4840-563 TOUCH SCREEN pictureOEM VIDEO GRAPHICS CARD 14R0019 TSCC0036901 --IBM SURE POS 4840-563 TOUCH SCREEN
$6.99
OEM VIDEO GRAPHICS CARD 14R0019 TSCC0036901 --IBM SURE POS 4840-563 TOUCH SCREEN picture






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