If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

yes any website is opening  , but my   app is not working   

 

 

I  did'nt get you

 

"If you continue to have problems, please post the contents of the String you are using as the URL in the application - I suggest you use System.out.println to dump it out to make sure it is exactly what you think it is.  . "

 

 

 

Thanks

 

 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

yes even the contents i.e url's inside  my app's url are also working on the browser.

 

 

 

thanks

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

Assuming you are still using the code you have previously referenced, this is your communication code:

 

			try {
				con = (HttpConnection)Connector.open("http://yupptv.com/mobile/symbianxmlnew.aspx");
				ins = con.openInputStream();           
				parser.parse(ins, handler);
			 } catch (Exception e) { 

I would like you to run 3 tests:

 

1) Put a break point on the two lines:

con = (HttpConnection)Connector.open..

and

ins = con.openInputStream();

and run your test.  And tell us

a) Got to line starting "con..." - your answer will be "yes" or "no"

b) Got to line starting "ins"- your answer will be "yes" or "no"

c) if your answer to (b) is no, then please indicate the Exception that was thrown.

 

2) Change your connection code to this:

 

con = (HttpConnection)Connector.open("http://www.google.com");

but leave the break ponts in place and run your test.  And tell us

a) Got to line starting "con..." - your answer will be "yes" or "no"

b) Got to line starting "ins"- your answer will be "yes" or "no"

c) if your answer to (b) is no, then please indicate the Exception that was thrown.

 

3) Then change your connection to the following:

con = (HttpConnection)Connector.open("http://yupptv.com/mobile/symbianxmlnew.aspx;deviceside=true");

but leave the break ponts in place and run your test.  And tell us

a) Got to line starting "con..." - your answer will be "yes" or "no"

b) Got to line starting "ins"- your answer will be "yes" or "no"

c) if your answer to (b) is no, then please indicate the Exception that was thrown.

 

So I am expecting answer to fill in a table like this:

 

1.a) Yes/No

1.b) Yes/No

1.c) Excpetion thrown was....

2.a) Yes/No

2.b) Yes/No

3.c) Excpetion thrown was....

3.a) Yes/No

3.b) Yes/No

3.c) Excpetion thrown was....

 

Once you have done these tests, tell us what conclusion you can draw from the results?

 

OK?

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

Ok thank you for the support you are giving. I will follow what ever you have said and Update you. Thanks
Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

Output of Result to 1st test

 

 

try {
BreakPoint1   con = (HttpConnection)Connector.open("http://yupptv.com/mobile/symbianxmlnew.aspx");
BreakPoint2   ins = con.openInputStream();
parser.parse(ins, handler);
} catch (Exception e) {
form.append(e.toString());

 

Result:

 

a) no

 

b) no

 

 

fledge screenshot.jpg

 

 

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

Is that what you had expected?  That indicates it is not even trying to connect doesn't it?  Or it is trying to connect but not using this code.

 

Of course it could also mean that you have not installed the break points correctly.  I would put a break point in some part of the process that you know to be being used and then step through to see where the processing actually goes. 

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

[ Edited ]

Result of 3rd test

 

 

a) no      but showing channel names and details      as in my url 

 

http://www.y.com-----------------/symbianxmlnew.aspx

 

 

 

 

 

b) no

 

 

Output

 

fledge screenshot2.jpg

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

So what do you think this testing is showing you?

Please use plain text.
Developer
srk2012
Posts: 672
Registered: ‎12-04-2012
My Device: BlackBerry 8520
My Carrier: Airtel

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

we are coming closer to the  Targets and knowing where we went wrong  .Thank you

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can anyone help me parse my the contents contained in the" url" named as xml.aspx using pure Java Application

[ Edited ]

Why do you say that?

 

I am not convinced that you are debugging correctly - if your processing is going through the code then you should hit the break points, yet you say you are not.  Why is that?

Please use plain text.