Calling webservice(JSON) from javascript not working in Blackberry but working on iPhone

50 views
Skip to first unread message

gurudas

unread,
Nov 24, 2009, 8:50:52 AM11/24/09
to rhomobile
Hi Adam
I am trying to execute following code which present in index.erb file
on blackberry platform. But my application gets hanged once alert
message “In Result” is displayed. Same javascript code working
successfully if tried on blackberry browser and if I test the appl. on
iphone then its working fine.

Here is the code from index.erb file (Ref for service -
http://developer.yahoo.com/common/json.html)

<script type="text/javascript">
function ws_results(obj) {
try{

alert("In result");
alert(obj.ResultSet.totalResultsAvailable);
}catch (ex)
{

alert("Error: "+ex+" Code = "+ex.code+" Message =
"+ex.message);

}
}
</script>
<script type="text/javascript" src="http://search.yahooapis.com/
ImageSearchService/V1/imageSearch?
appid=YahooDemo&query=Madonna&output=json&callback=ws_results"></
script>




<h1 id="pageTitle">
MyThirdApp
</h1>
</div>

<ul id="home" selected="true" title="MyThirdApp">
<li>Add links here...</li>
</ul>


So please let us know how can we resolve this issue?
Below I am giving few end lines from log file


T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:397 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getLength: 965
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
Accept-Charset
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHost: localhost
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection|
getRequestProperty: referer
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField: x-
rim-original-encoding
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
default-style
T 11/24/2009 12:11:46:413 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:428 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/base.css
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:11:46:444 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/blackberry.css
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getType
T 11/24/2009 12:11:46:459 eb8e2000 RhoConnection| getHeaderField:
content-type
I 11/24/2009 12:11:46:459 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results;deviceside=true
I 11/24/2009 12:12:06:569 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results
I 11/24/2009 12:12:18:510 3cc7c000 Sync| addSyncCommand: 2
I 11/24/2009 12:12:18:557 eb758000 Sync| Sync all sources
started.
T 11/24/2009 12:12:18:557 eb758000 DbAdapter| executeSQL: SELECT
source_id,source_url,token,name from sources ORDER BY source_id
T 11/24/2009 12:12:18:557 eb758000 DbAdapter| executeSQL: SELECT
session FROM sources WHERE session IS NOT NULL
I 11/24/2009 12:12:18:557 eb758000 Sync| Status: Sync
failed for Amitmodel. Details: Client is not logged in. No sync will
be performed.
I 11/24/2009 12:12:18:557 eb758000 Sync| Sync engine
blocked for 300 seconds...
T 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
I 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/app/index_erb.iseq
I 11/24/2009 12:12:27:905 eb8e2000 RhoConnection| dispatch start
I 11/24/2009 12:12:27:921 eb8e2000 APP| RhoApplication:
Using menu - {"Home"=>:home, "Refresh"=>:refresh, "Sync"=>:sync,
"Options"=>:options, "Log"=>:log, :separator=>nil, "Close"=>:close}
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Home, value: home
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Refresh, value: refresh
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Sync, value: sync
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Options, value: options
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Log, value: log
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: separator, value: NilClasscom.xruby.runtime.lang.RubyConstant
$3@2603b378
T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
label: Close, value: close
I 11/24/2009 12:12:27:921 eb8e2000 WebView| set_menu_items end
I 11/24/2009 12:12:27:921 eb8e2000 APP| inside
RHO.serve_index: /apps/app/index_erb.iseq
T 11/24/2009 12:12:27:921 eb8e2000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:12:27:921 eb8e2000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MyThirdApp</title>
<link href="/public/css/base.css" type="text/css" rel="stylesheet"/
>



<link href="/public/css/blackberry.css" type="text/css"
rel="stylesheet"/>



</head>
<body>


<script type="text/javascript">
function ws_results(obj) {
try{

alert("In result");
alert(obj.ResultSet.totalResultsAvailable);
}catch (ex)
{

alert("Error: "+ex+" Code = "+ex.code+" Message =
"+ex.message);

}
}
</script>
<script type="text/javascript" src="http://search.yahooapis.com/
ImageSearchService/V1/imageSearch?
appid=YahooDemo&query=Madonna&output=json&callback=ws_results"></
script>




<h1 id="pageTitle">
MyThirdApp
</h1>
</div>

<ul id="home" selected="true" title="MyThirdApp">
<li>Add links here...</li>
</ul>




</body>
</html>
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:921 eb8e2000 RhoConnection| getLength: 965
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
Accept-Charset
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHost: localhost
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection|
getRequestProperty: referer
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField: x-
rim-original-encoding
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
default-style
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:936 eb8e2000 RhoConnection| getURL:
http://localhost:8080/app/index_erb.iseq
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/base.css
I 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/base.css
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:952 eb8e2000 RhoConnection|
setRequestProperty: key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| setRequestField:
key = x-rim-request-priority; value = 1
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| setRequestMethod:
GET
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getURL:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| processRequest:
http://localhost:8080/public/css/blackberry.css
I 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| httpServeFile: /
apps/public/css/blackberry.css
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getResponseCode200
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getHeaderField:
content-type
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getType
T 11/24/2009 12:12:27:967 eb8e2000 RhoConnection| getHeaderField:
content-type
I 11/24/2009 12:12:27:967 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results;deviceside=true
I 11/24/2009 12:12:48:403 eb8e2000 NetworkAccess|
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json&callback=ws_results
I 11/24/2009 12:13:06:323 3cc7c000 RhodesApplicati| openLink
I 11/24/2009 12:29:50:733 3ec98000 RhodesApplicati| STARTING RHODES:
***----------------------------------***
T 11/24/2009 12:29:50:842 3ec98000 ClassFactory| getNetworkAccess
I 11/24/2009 12:29:50:842 3ec98000 NetworkAccess|
Postfix: ;deviceside=true
T 11/24/2009 12:29:50:858 ba030000 PushListeningTh| Block push thread
until data is recieved
T 11/24/2009 12:29:50:873 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:50:889 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:50:905 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:46 3ec98000 APP| RHO loaded
I 11/24/2009 12:29:51:61 3ec98000 APP| Calling
RHO.initialize
T 11/24/2009 12:29:51:77 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:77 3ec98000 APP| rhoconfig:
start_path => /app
T 11/24/2009 12:29:51:77 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:77 3ec98000 APP| rhoconfig:
options_path => /app/Settings
T 11/24/2009 12:29:51:77 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:77 3ec98000 APP| rhoconfig:
rhobundle_zip_url =>
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
rhobundle_zip_pwd =>
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
MinSeverity => 0
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
LogToOutput => 1
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
LogCategories => *
T 11/24/2009 12:29:51:92 3ec98000 ClassFactory| createRhoRubyHelper
I 11/24/2009 12:29:51:92 3ec98000 APP| rhoconfig:
ExcludeLogCategories =>
T 11/24/2009 12:29:51:108 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:124 3ec98000 APP| rhoconfig:
KeepTrackOfLastVisitedPage => 0
T 11/24/2009 12:29:51:124 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:124 3ec98000 APP| rhoconfig:
LastVisitedPage =>
T 11/24/2009 12:29:51:124 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:124 3ec98000 APP| rhoconfig:
syncserver => att1,att2
T 11/24/2009 12:29:51:124 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:124 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.version
T 11/24/2009 12:29:51:124 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.version
T 11/24/2009 12:29:51:139 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:139 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.script
T 11/24/2009 12:29:51:139 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.script
I 11/24/2009 12:29:51:155 3ec98000 DB| Database (re)
opened
T 11/24/2009 12:29:51:155 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.script
T 11/24/2009 12:29:51:171 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.script
T 11/24/2009 12:29:51:171 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:171 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.script
T 11/24/2009 12:29:51:171 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.script
I 11/24/2009 12:29:51:186 3ec98000 DB| Start open DB
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.data
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.data
I 11/24/2009 12:29:51:186 3ec98000 DBJournal| Create:
file:///SDCard/Rho/MyThirdApp/db/syncdb.journal
T 11/24/2009 12:29:51:186 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.journal
T 11/24/2009 12:29:51:202 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.journal
T 11/24/2009 12:29:51:202 3ec98000 ClassFactory|
createRhoRubyHelper
T 11/24/2009 12:29:51:233 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
I 11/24/2009 12:29:51:249 3ec98000 DB| End open DB
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.properties
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.properties
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.properties.new
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Create file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.properties.new
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.properties
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Open file:
file:///SDCard/Rho/MyThirdApp/db/syncdb.data
T 11/24/2009 12:29:51:280 3ec98000 Jsr75RAFileImpl| Close file:
syncdb.data
T 11/24/2009 12:29:51:280 3ec98000 DbAdapter| executeSQL: SELECT
source_id,source_attribs from sources
T 11/24/2009 12:29:51:327 3ec98000 DbAdapter| executeSQL: select
source_attribs from sources where "source_id" = '1201'
T 11/24/2009 12:29:51:327 3ec98000 ClassFactory|
createRhoRubyHelper
I 11/24/2009 12:29:51:343 e5d78000 RhodesApplicati| Starting
HttpServerThread main routine...
I 11/24/2009 12:29:51:358 3ec98000 RhodesApplicati| RHODES STARTUP
COMPLETED: ***----------------------------------***
I 11/24/2009 12:29:51:358 e5bee000 Sync| Starting sync
engine main routine...
T 11/24/2009 12:29:51:358 e5bee000 DbAdapter| executeSQL: SELECT
last_updated from sources
I 11/24/2009 12:29:51:374 e5bee000 Sync| Sync engine
blocked for 300 seconds...









gurudas

unread,
Nov 25, 2009, 5:10:11 AM11/25/09
to rhomobile
I also found one more issue in black berry simulator that once I tried
to call webservice/http request. Its giving a issue like Proxy
Authentication Required. Access to the web proxy filter is denied
error.

but same url I can access through ie and other browswer but is only
giving issue while running the app by rhodes.
pls let me know what its the issue. which url rhodes trying to access?

Thanks

Gurudas Pise

On Nov 24, 6:50 pm, gurudas <gurudas.p...@gmail.com> wrote:
> Hi Adam
> I am trying to execute following code which present in index.erb file
> on blackberry platform. But my application gets hanged once alert
> message “In Result” is displayed. Same javascript code working
> successfully if tried on blackberry browser and if I test the appl. on
> iphone then its working fine.
>
> Here is the code from index.erb file (Ref for service -http://developer.yahoo.com/common/json.html)
> I 11/24/2009 12:11:46:459 eb8e2000   NetworkAccess|http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Y...
> I 11/24/2009 12:12:06:569 eb8e2000   NetworkAccess|http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Y...
> I 11/24/2009 12:12:27:967 eb8e2000   NetworkAccess|http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Y...
> I 11/24/2009 12:12:48:403 eb8e2000   NetworkAccess|http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Y...

gurudas

unread,
Nov 26, 2009, 10:15:19 AM11/26/09
to rhomobile
Hi Adam,

Please any Update on my issues ??????
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

evgeny vovchenko

unread,
Nov 26, 2009, 1:04:56 PM11/26/09
to rhom...@googlegroups.com
Send me erb-file you use.
I copy text from your message to my erb-page and do not see any messagebox
on iPhone
What should I see?
--

You received this message because you are subscribed to the Google Groups
"rhomobile" group.
To post to this group, send email to rhom...@googlegroups.com.
To unsubscribe from this group, send email to
rhomobile+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rhomobile?hl=en.


gurudas

unread,
Nov 27, 2009, 8:32:13 AM11/27/09
to rhomobile
Hi evgeny

Thanks for your reply.

Its a normal javascript and its diplay a message in javascript alert
box.Below you will see the code.
Initially I thought below code is working on iphone but not on
blackberry but today I found that we can call json webservice on
blackberry but once call and display a message by javascript alert
then applications get hanged. I need to restart my device. javascript
alert hang blackberry device if you try to run it from rhodes.
I have checked from blackberry browser then javascript alert working
fine. But any application try to run by rhodes on blackberry then
alert make appplication hang. even I found that I can use onclick()
function on button.
Could you please update me regarding this issue.


<script type="text/javascript">
function ws_results(obj) {
try{


alert("In result");
alert(obj.ResultSet.totalResultsAvailable);
}catch (ex)
{


alert("Error: "+ex+" Code = "+ex.code+" Message
=
"+ex.message);


}


}


</script>
<script type="text/javascript" src="http://search.yahooapis.com/
ImageSearchService/V1/imageSearch?
appid=YahooDemo&query=Madonna&output=json&callback=ws_results"></
script>

<h1 id="pageTitle">
MyThirdApp
</h1>
</div>


<ul id="home" selected="true" title="MyThirdApp">
<li>Add links here...</li>
</ul>




On Nov 26, 11:04 pm, "evgeny vovchenko" <evgenyvovche...@gmail.com>
wrote:
> Send me erb-file you use.
> I copy text from your message to my erb-page and do not see any messagebox
> on iPhone
> What should I see?
>
>
>
> -----Original Message-----
> From: gurudas [mailto:gurudas.p...@gmail.com]
> Sent: Thursday, November 26, 2009 6:15 PM
> To: rhomobile
> Subject: [rhomobile] Re: Calling webservice(JSON) from javascript not
>
> working in Blackberry but working on iPhone
>
> Hi Adam,
>
> Please any Update on my issues  ??????
>
> On Nov 25, 3:10špm, gurudas <gurudas.p...@gmail.com> wrote:
> > I also found one more issue in black berry simulator that once I tried
> > to call webservice/http request. Its giving a issue like Proxy
> > Authentication Required. Access to the web proxy filter is denied
> > error.
>
> > but same url I can access through ie and other browswer but is only
> > giving issue while running the app by rhodes.
> > pls let me know what its the issue. which url rhodes trying to access?
>
> > Thanks
>
> > Gurudas Pise
>
> > On Nov 24, 6:50špm, gurudas <gurudas.p...@gmail.com> wrote:
>
> > > Hi Adam
> > > I am trying to execute following code which present in index.erb
> > > file on blackberry platform. But my application gets hanged once
> > > alert message "In Result" is displayed. Same javascript code working
> > > successfully if tried on blackberry browser and if I test the appl.
> > > on iphone then its working fine.
>
> > > Here is the code from index.erb file (Ref for service
> > > -http://developer.yahoo.com/common/json.html)
>
> > > <script type="text/javascript">
> > > function ws_results(obj) {
> > > š š š š try{
>
> > > š š š š alert("In result");
> > > š š š š alert(obj.ResultSet.totalResultsAvailable);
> > > š š š š }catch (ex)
> > > š š š š {
>
> > > š š š š š š š š alert("Error: š"+ex+" š Code = š "+ex.code+" š
> > > Message = "+ex.message);
>
> > > š š š š }}
>
> > > </script>
> > > <script type="text/javascript" src="http://search.yahooapis.com/
> > > ImageSearchService/V1/imageSearch?
> > > appid=YahooDemo&query=Madonna&output=json&callback=ws_results"></
> > > script>
>
> > > š š š š <h1 id="pageTitle">
> > > š š š š š š š š MyThirdApp
> > > š š š š </h1>
> > > </div>
>
> > > <ul id="home" selected="true" title="MyThirdApp">
> > > š š š š <li>Add links here...</li>
> > > </ul>
>
> > > So please let us know how can we resolve this issue?
> > > Below I am giving few end lines from log file
>
> > > T 11/24/2009 12:11:46:397 eb8e2000 š RhoConnection|
> > > getResponseCode200 T 11/24/2009 12:11:46:397 eb8e2000 š
> > > RhoConnection| getURL:http://localhost:8080/app/index_erb.iseq
> > > T 11/24/2009 12:11:46:397 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:397 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/appT 11/24/2009 12:11:46:413 eb8e2000 š
> > > RhoConnection| getURL:http://localhost:8080/app/index_erb.iseq
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getLength: 965 T
> > > 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > Accept-Charset
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHost:
> > > localhost T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection|
> > > getRequestProperty: referer
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > x- rim-original-encoding T 11/24/2009 12:11:46:413 eb8e2000 š
> > > RhoConnection| getHeaderField:
> > > default-style
> > > T 11/24/2009 12:11:46:413 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:428 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/app/index_erb.iseq
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > setRequestProperty: key = x-rim-request-priority; value = 1 T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| setRequestField:
> > > key = x-rim-request-priority; value = 1 T 11/24/2009 12:11:46:444
> > > eb8e2000 š RhoConnection| setRequestMethod:
> > > GET
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/public/css/base.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > processRequest:http://localhost:8080/public/css/base.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| httpServeFile: /
> > > apps/public/css/base.css T 11/24/2009 12:11:46:444 eb8e2000 š
> > > RhoConnection| getResponseCode200 T 11/24/2009 12:11:46:444 eb8e2000 š
> > > RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > setRequestProperty: key = x-rim-request-priority; value = 1 T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| setRequestField:
> > > key = x-rim-request-priority; value = 1 T 11/24/2009 12:11:46:444
> > > eb8e2000 š RhoConnection| setRequestMethod:
> > > GET
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/public/css/blackberry.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > processRequest:http://localhost:8080/public/css/blackberry.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| httpServeFile: /
> > > apps/public/css/blackberry.css T 11/24/2009 12:11:46:459 eb8e2000 š
> > > RhoConnection| getResponseCode200 T 11/24/2009 12:11:46:459 eb8e2000 š
> > > RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:459 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:459 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > I 11/24/2009 12:11:46:459 eb8e2000 š
> NetworkAccess|http://search.yahooapis.com/ImageSearchService/V1/imageSearch?
> appid=Y...
> > > I 11/24/2009 12:12:06:569 eb8e2000 š
> NetworkAccess|http://search.yahooapis.com/ImageSearchService/V1/imageSearch?
> appid=Y...
> > > I 11/24/2009 12:12:18:510 3cc7c000 š š š š š šSync| addSyncCommand:
> > > 2 I 11/24/2009 12:12:18:557 eb758000 š š š š š šSync| Sync all
> > > sources started.
> > > T 11/24/2009 12:12:18:557 eb758000 š š š DbAdapter| executeSQL:
> > > SELECT source_id,source_url,token,name from sources ORDER BY
> > > source_id T 11/24/2009 12:12:18:557 eb758000 š š š DbAdapter|
> > > executeSQL: SELECT session FROM sources WHERE session IS NOT NULL I
> > > 11/24/2009 12:12:18:557 eb758000 š š š š š šSync| Status: Sync
> > > failed for Amitmodel. Details: Client is not logged in. No sync will
> > > be performed.
> > > I 11/24/2009 12:12:18:557 eb758000 š š š š š šSync| Sync engine
> > > blocked for 300 seconds...
> > > T 11/24/2009 12:12:27:905 eb8e2000 š RhoConnection| setRequestMethod:
> > > GET
> > > T 11/24/2009 12:12:27:905 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/app/index_erb.iseq
> > > I 11/24/2009 12:12:27:905 eb8e2000 š RhoConnection|
> > > processRequest:http://localhost:8080/app/index_erb.iseq
> > > I 11/24/2009 12:12:27:905 eb8e2000 š RhoConnection| dispatch start I
> > > 11/24/2009 12:12:27:921 eb8e2000 š š š š š š APP| RhoApplication:
> > > Using menu - {"Home"=>:home, "Refresh"=>:refresh, "Sync"=>:sync,
> > > "Options"=>:options, "Log"=>:log, :separator=>nil, "Close"=>:close}
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: Home, value: home
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: Refresh, value: refresh
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: Sync, value: sync
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: Options, value: options
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: Log, value: log
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: separator, value: NilClasscom.xruby.runtime.lang.RubyConstant
> > > $3@2603b378
> > > T 11/24/2009 12:12:27:921 eb8e2000 RhodesApplicati| Adding menu item:
> > > label: Close, value: close
> > > I 11/24/2009 12:12:27:921 eb8e2000 š š š š WebView| set_menu_items
> > > end I 11/24/2009 12:12:27:921 eb8e2000 š š š š š š APP| inside
> > > RHO.serve_index: /apps/app/index_erb.iseq T 11/24/2009 12:12:27:921
> > > eb8e2000 š šClassFactory| createRhoRubyHelper T 11/24/2009
> > > 12:12:27:921 eb8e2000 š šClassFactory| createRhoRubyHelper T
> > > 11/24/2009 12:12:27:921 eb8e2000 š RhoConnection| <!DOCTYPE html
> > > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > > š š š š š"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > > <html xmlns="http://www.w3.org/1999/xhtml">
> > > š š š š <head>
> > > š š š š š š š š <title>MyThirdApp</title>
> > > š š š š š š š š <link href="/public/css/base.css" type="text/css"
> > > rel="stylesheet"/
>
> > > š š š š š š š š š š š š š š š š <link href="/public/css/blackberry.css"
> type="text/css"
> > > rel="stylesheet"/>
>
> > > š š š š </head>
> > > š š š š <body>
>
> > > <script type="text/javascript">
> > > function ws_results(obj) {
> > > š š š š try{
>
> > > š š š š alert("In result");
> > > š š š š alert(obj.ResultSet.totalResultsAvailable);
> > > š š š š }catch (ex)
> > > š š š š {
>
> > > š š š š š š š š alert("Error: š"+ex+" š Code = š "+ex.code+" š
> > > Message = "+ex.message);

evgeny vovchenko

unread,
Nov 27, 2009, 9:10:10 AM11/27/09
to rhom...@googlegroups.com
I try to see Alert on iPhone simulator 3.1, but without success.
Did you change some simulator\phone settings to make it work?
> > > RhoConnection| eb8e2000 š
> > > RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > setRequestProperty: key = x-rim-request-priority; value = 1 T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| setRequestField:
> > > key = x-rim-request-priority; value = 1 T 11/24/2009 12:11:46:444
> > > eb8e2000 š RhoConnection| setRequestMethod:
> > > GET
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/public/css/blackberry.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > processRequest:http://localhost:8080/public/css/blackberry.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| httpServeFile:
> > > / apps/public/css/blackberry.css T 11/24/2009 12:11:46:459
> > > eb8e2000 š
> > > RhoConnection| getResponseCode200 T 11/24/2009 12:11:46:459
> > > RhoConnection| eb8e2000 š

evgeny vovchenko

unread,
Nov 27, 2009, 9:36:03 AM11/27/09
to evgeny vovchenko, rhom...@googlegroups.com
OK. I make it work on iPhone

-----Original Message-----
From: evgeny vovchenko [mailto:evgenyv...@gmail.com]
Sent: Friday, November 27, 2009 5:10 PM
To: 'rhom...@googlegroups.com'
Subject: RE: [rhomobile] Re: Calling webservice(JSON) from javascript not
working in Blackberry but working on iPhone

I try to see Alert on iPhone simulator 3.1, but without success.
Did you change some simulator\phone settings to make it work?

-----Original Message-----
From: gurudas [mailto:guruda...@gmail.com]
> > > RhoConnection| eb8e2000 š
> > > RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| getType T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| getHeaderField:
> > > content-type
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > setRequestProperty: key = x-rim-request-priority; value = 1 T
> > > 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| setRequestField:
> > > key = x-rim-request-priority; value = 1 T 11/24/2009 12:11:46:444
> > > eb8e2000 š RhoConnection| setRequestMethod:
> > > GET
> > > T 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > getURL:http://localhost:8080/public/css/blackberry.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection|
> > > processRequest:http://localhost:8080/public/css/blackberry.css
> > > I 11/24/2009 12:11:46:444 eb8e2000 š RhoConnection| httpServeFile:
> > > / apps/public/css/blackberry.css T 11/24/2009 12:11:46:459
> > > eb8e2000 š
> > > RhoConnection| getResponseCode200 T 11/24/2009 12:11:46:459
> > > RhoConnection| eb8e2000 š

evgeny vovchenko

unread,
Nov 27, 2009, 9:42:24 AM11/27/09
to rhom...@googlegroups.com
Here is the ticket for BB
https://rhomobile.lighthouseapp.com/projects/17413-rhodes/tickets/1245-bb-br
owser-stop-responding-if-erb-page-display-javascript-alerts

Does it show stopper for you?
As I understand you need alerts just for debugging?
Reply all
Reply to author
Forward
0 new messages