BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-24-2012, 09:19 AM   #1
LCBStanley
New Member
 
Join Date: Aug 2012
Model: 9930
PIN: N/A
Carrier: Verizon
Posts: 6
Default Pushing to BES from application

Please Login to Remove!

I 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, 09:21 AM   #2
LCBStanley
New Member
 
Join Date: Aug 2012
Model: 9930
PIN: N/A
Carrier: Verizon
Posts: 6
Default Re: Pushing to BES from application

connection.setDoOutput(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+");

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

// write out the data
int queryLength = query.length();
output.writeBytes( query );
output.close();

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

Its not letting me post the connection stuff, because it thinks it is a URL =(

I open an httpconnection with the u.r.l. server/push?DESTINATION=PIN&PORT=7874&REQUESTURI=/
Offline  
Old 08-24-2012, 11:15 AM   #4
freakinvibe
BlackBerry Extraordinaire
 
Join Date: Aug 2008
Location: Basel
Model: Class
PIN: N/A
Carrier: Swisscom
Posts: 1,616
Default Re: Pushing to BES from application

Try posting in the developer section:

Developer Forum - BlackBerry Forums Support Community
Offline  
Closed Thread



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: Pushing to BES from application
Thread Thread Starter Forum Replies Last Post
BES - Unable to resolved application vlhotel BES Admin Corner 3 11-19-2010 10:03 AM
Agent Crash Every hour or less GPITMAN BES Admin Corner 2 07-01-2010 01:14 AM
Special BES Express plans (UK) classact Carrier Specific Issues 0 05-16-2010 09:32 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


Unifi Talk UVP Touch VOIP IP Phone Unlocked picture

Unifi Talk UVP Touch VOIP IP Phone Unlocked

$125.00



Polycom Vvx 601 VoIP 16 Line Business Phone 4.3

Polycom Vvx 601 VoIP 16 Line Business Phone 4.3" HD Touchscreen PoE With Stand

$28.95



Vtech ErisTerminal VSP861 Touchscreen Color Desktop - Voice-Over-IP VOIP Phone picture

Vtech ErisTerminal VSP861 Touchscreen Color Desktop - Voice-Over-IP VOIP Phone

$14.99



Vtech VSP715 ErisTerminal Deskset VoIP Phone and Device HD Audio - Discontinued picture

Vtech VSP715 ErisTerminal Deskset VoIP Phone and Device HD Audio - Discontinued

$9.99



Nextiva X-835 SIP Color Deskset VoIP Phone Black New In Box picture

Nextiva X-835 SIP Color Deskset VoIP Phone Black New In Box

$59.99



PANASONIC KX-NT553 Business IP Handset VoIP Office Phone picture

PANASONIC KX-NT553 Business IP Handset VoIP Office Phone

$49.99







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