BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-20-2007, 11:48 AM   #1 (permalink)
New Member
 
Join Date: May 2007
Model: 8700
PIN: N/A
Carrier: TIM
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default client server application

Please Login to Remove!

Ehy everybody!

First of all, sorry for my bad english

I' m developing my first application for BB. I have a client side application (on a 8700g) that makes a request to a server side application, that scans a file and returns to the BB the data demanded.

At this point i've some problems:

1) How can the BB application connect itself to the server side application?The server side application is on a server (not the bes), behind a firewall and inside a LAN.

2) How can the server side application return the data to the BB?

Thanks a lot!

Turkishweb
Offline  
Old 05-21-2007, 01:00 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

see "BlackBerry Application Developer Guide Volume 1", chapter 6 "Connecting to Networks"
Offline  
Old 05-31-2007, 09:43 AM   #3 (permalink)
New Member
 
Join Date: May 2007
Model: 8700
PIN: N/A
Carrier: TIM
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i' ve already read that chapter...

but i don' t understand, in practice, how i can do the connection (if the bes ip is an internal ip, like 192.168.0.xxx, what is the ip that i have to use for the connection??), how i can access and use my application and how the server side application can return the data to the blackberry (how this application identifies the BB)?

however, thanks a lot!

turkishweb

Last edited by turkishweb : 05-31-2007 at 02:23 PM.
Offline  
Old 06-01-2007, 01:43 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if BES has only internal IP, you can't access it from outside of your LAN.

What do you mean under server side application? webpage, webservice, something else?

Look at httpdemo sample, bundled with JDE, how to download data using HttpConnection
Offline  
Old 06-01-2007, 08:24 AM   #5 (permalink)
New Member
 
Join Date: May 2007
Model: 8700
PIN: N/A
Carrier: TIM
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

for "server side application" i mean a java application (some classes and some methods) hosted on a PC behind my firewall...

i need a webservice for using it?i'm sorry but i never developed a server side application, this is my first experiment!

yesterday, i was searching some information about this problem and i have found this link

BlackBerry - BlackBerry | Wireless Handheld Devices, Software & Services from Research In Motion (RIM)

this part is really interesting:

"When you open an HTTP connection, by default the handheld establishes the connection using the BlackBerry Enterprise Server Software, which resides behind the corporate firewall. Communication is encrypted between the BlackBerry Enterprise Server and the BlackBerry Wireless Handheld using the same Triple DES encryption that is used for BlackBerry email. The BlackBerry service maintains the connection for the handheld, so you do not need to specify the IP address of the BlackBerry Enterprise Server to set up an HTTP connection."

then, can i open a connection without specify the BES IP[in the URL variable i set only the IP of the server where my application (or webservice ) is running]?

thanks a lot!

turkishweb
Offline  
Old 06-01-2007, 08:42 AM   #6 (permalink)
New Member
 
Join Date: Apr 2007
Model: 8100
Carrier: Cingular
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Think of the BES as just a gateway. When you attempt to make a network connection, if the address is reachable by the BES, then it will be reachable by the device.

For example, if you attempt to connect to internalserver.mycompany.com, that connection will only work on devices configured to use your BES. It won't work on a device configured to use someone else's BES, because their BES won't be able to resolve the address.

This is useful because it allows you to extend your internal network to wireless devices without having to expose those internal servers to the public internet.

That said, all you are doing on the device is making a network connection and getting the result (InputStream). It doesn't necessarily need to be a real web service, but your comment seemed to imply you are trying to call methods in classes on the server. If that's the case, you need to rethink your architecture. If that's not the case, just ignore this paragraph.
Offline  
Old 06-01-2007, 12:44 PM   #7 (permalink)
New Member
 
Join Date: May 2007
Model: 8700
PIN: N/A
Carrier: TIM
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

YOU ARE GREAT!!

really, thanks a lot!

Now the problem is the following: there is a big txt file on my server and the
user, using its BB, sends some data to the server and the server should return
some data.

This data returned to the user should be extracted from this txt file by the server-side java application.

How can i invoke the search(String dataFromTheUser) method that scans the txt file using the BB?

I think this is the last problem....or better, i hope it

turkishweb

Last edited by turkishweb : 06-01-2007 at 12:45 PM.
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





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