BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-24-2012, 12:29 PM   #1
LCBStanley
New Member
 
Join Date: Aug 2012
Model: 9930
PIN: N/A
Carrier: Verizon
Posts: 6
Default Help Pushing to BES from Application

Please Login to Remove!

Hi folks, I am not the BES Admin in my organization, but I own an application that leverages the BES for a third party application to notify for events. (Service Desk event>third party notifier>BES)

We are wanting to do-away with the third party to save some $$, so I am trying to write a custom java notifier app. I am connecting to the BES and receiving 200: OK response codes, but nothing is coming through on my browser. I assume this means there is something wrong with the format/content I am pushing. I don't fully understand the URI thing, but basically I only need to push a subject and body. Maybe the body will be html formatted down the road, but I am not looking to push anything fancy like an XML.
Offline  
Old 08-24-2012, 12:30 PM   #2
LCBStanley
New Member
 
Join Date: Aug 2012
Model: 9930
PIN: N/A
Carrier: Verizon
Posts: 6
Default Re: Help Pushing to BES from Application

connection.setDoOutput(true);
connection.setDoInput(true);

connection.setRequestMethod("POST");
//connection.setFollowRedirects(true);

String query = "summary=" + "test";
query += "&";
query += "body=" + "testtesttest body";

connection.setRequestProperty("Content-length",String.valueOf (query.length()));
connection.setRequestProperty("Content-Type","text/plain");
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (BlackBerry; U; BlackBerry AAAA; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/X.X.X.X Mobile Safari/534.11+");
//connection.setRequestProperty("X-Rim-Push-Id", "45fed@rim.com");
connection.setRequestProperty("X-Rim-Push-Destination", "3326059E");

// open up the output stream of the connection
DataOutputStream output = new DataOutputStream( connection.getOutputStream() );

// write out the data
output.writeBytes(query);
//output.write(query.getBytes());

System.out.println("Resp Code:"+connection.getResponseCode());
System.out.println("Resp Message:"+ connection.getResponseMessage());
System.out.println("Status:"+ connection.getHeaderFieldKey(6));
System.out.println("Status:"+ connection.getHeaderField(6));
}
catch(Exception e)
{
System.out.println( "Something bad just happened." );
System.out.println( e );
e.printStackTrace();
}
}
}
Offline  
Old 08-24-2012, 12:31 PM   #3
LCBStanley
New Member
 
Join Date: Aug 2012
Model: 9930
PIN: N/A
Carrier: Verizon
Posts: 6
Default Re: Help Pushing to BES from Application

I had to leave out the connection string to post in the forum, but it creates a URL object, and sets it to SERVER/push?DESTINATION=BBPIN%PORT=7874&REQUESTURI=/
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

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

Forum Jump

Similar Threads for: Help Pushing to BES from Application
Thread Thread Starter Forum Replies Last Post
BES Licensing Thread BBAdmin BES Admin Corner 223 01-30-2016 04:54 PM
BES - Unable to resolved application vlhotel BES Admin Corner 3 11-19-2010 10:03 AM
Enabling Application Server SSO (Single Sign on)on the BES MobileMind BES Admin Corner 4 09-16-2009 04:12 PM
BES Application Issue coops4284 BES Admin Corner 2 08-25-2009 03:19 PM
application of a service pack on a BES with a remote SQL database booster BES Admin Corner 2 06-26-2006 08:38 AM


New In Box Schneider TSXMRPC001M Memory Card Module picture

New In Box Schneider TSXMRPC001M Memory Card Module

$519.99



Coltene Hyflex CM Controlled Memory NiTi Files Rotary File System Set of 6 Files picture

Coltene Hyflex CM Controlled Memory NiTi Files Rotary File System Set of 6 Files

$42.74



New in Box Siemens 6ES7953-8LM31-0AA0 6ES7 953-8LM31-0AA0 memory card picture

New in Box Siemens 6ES7953-8LM31-0AA0 6ES7 953-8LM31-0AA0 memory card

$170.59



6ES7952-0KF00-0AA0 SIEMENS ONE piece New In Box 6ES7 952-0KF00-0AA0 memory card picture

6ES7952-0KF00-0AA0 SIEMENS ONE piece New In Box 6ES7 952-0KF00-0AA0 memory card

$182.50



1PC Micron 8GB PC4-2400T DDR4 Memory MTA18ASF1G72HZ-2G3B1ZG Laptop RAM -  NEW picture

1PC Micron 8GB PC4-2400T DDR4 Memory MTA18ASF1G72HZ-2G3B1ZG Laptop RAM - NEW

$159.00



We R Makers The Cinch Book Binding Machine Round hole V 2 White Aqua 71050-9 picture

We R Makers The Cinch Book Binding Machine Round hole V 2 White Aqua 71050-9

$79.99







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