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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 18
Registered: ‎10-23-2012
My Device: 9500
My Carrier: Airtel

Web Service is Not Working..

Hi, i am useing this code to call a link, but not getting any responce..?

can any one help me..?

public class ConnectWebService
{
String _node,_element;
Connection _connectionthread;
String page;
String[] CategoryID_value = null;
String[] Date_value = null;

String str_value;
String str_name ;
String str_vanue ;
String str_start ;
String str_end ;

String[] _start = null;
String[] _end = null;
String[] _name = null;
String[] _venue = null;

public ConnectWebService()
{
}

public void WebServiceConnect(String page)
{
this.page = page;
_connectionthread = new Connection(page);
_connectionthread.start();
}

private class Connection extends Thread
{
String page;
public Connection(String page)
{
super();
this.page = page;
}

public void run()
{

Document doc;
StreamConnection conn;
try
{
String connectLink = "";
if(page.equals("News"))
connectLink = "http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=YahooDemo&query=umbrella&results=10";

System.out.println("Link:: "+connectLink);
conn=(StreamConnection)Connector.open(connectLink);
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder= docBuilderFactory.newDocumentBuilder();
docBuilder.isValidating();
doc = docBuilder.parse(conn.openInputStream());
doc.getDocumentElement().normalize();

NodeList CatIDlist = null;
CatIDlist = doc.getElementsByTagName("title");

NodeList DateIDlist = null;
DateIDlist = doc.getElementsByTagName("Date");

_node=new String();
_element = new String();

CategoryID_value = new String[CatIDlist.getLength()];
Date_value = new String[DateIDlist.getLength()];

_start = new String[CatIDlist.getLength()];
_end = new String[CatIDlist.getLength()];
_name = new String[CatIDlist.getLength()];
_venue = new String[CatIDlist.getLength()];

Object obj = Application.getEventLock();
for (int i=0;i<CatIDlist.getLength();i++)
{
synchronized(obj)
{
Element myNode = (Element) CatIDlist.item(i);
str_name = myNode.getAttribute("Name");
str_vanue = myNode.getAttribute("Venue");
str_start = myNode.getAttribute("Start_time");
str_end = myNode.getAttribute("End_time");
}
_start[i] = str_start;
_end[i] = str_end;
_name[i] = str_name;
_venue[i] = str_vanue;
/*System.out.println("str_name " + str_name);
System.out.println("str_vanue " + str_vanue);
System.out.println("str_value " + str_start);
System.out.println("str_value " + str_end);*/
}

conn.close();
}
catch (Exception e)
{
System.out.println(e.toString());
}
if(page.equals("Conf"))
{
UiApplication.getUiApplication().invokeLater(new Runnable()
{

public void run()
{
// ConferenceListView clv = new ConferenceListView(_start,_end,_name,_venue);
//UiApplication.getUiApplication().pushScreen(clv);
}
});
}
}
}
}

Contributor
Posts: 18
Registered: ‎10-23-2012
My Device: 9500
My Carrier: Airtel

Re: Web Service is Not Working..

 

"http://feeds.feedburner.com/snmsiteupdates" this address in geeting problem to call

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Web Service is Not Working..

well, if you open the url in the browser it says "the service has been shut down", sounds like an explaination to me
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 18
Registered: ‎10-23-2012
My Device: 9500
My Carrier: Airtel

Re: Web Service is Not Working..

HI simon,

 

i didn't get it..

this web address is correctly working with android .but not working in blackberry. .

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Web Service is Not Working..

Just tried this URL:

http://feeds.feedburner.com/snmsiteupdates

on by BB device, got some data with the following error message:

 

This page contains the following errors:

 

error on line 486 at column 68:xmlParseEntityRef: no name.

 

Perhaps you are getting data and the data is not valid?

Developer
Posts: 72
Registered: ‎12-31-2010
My Device: 9800
My Carrier: Airtel

Re: Web Service is Not Working..

when i call the url, its showing error.
<Error>
The following errors were detected:
<Message>The service has been shut down. For further details, please see the Deprecated Services blog post http://developer.yahoo.com/blogs/ydn/posts/2010/08/api_updates_and_changes</Message></Error><!-- ws02.ydn.ac4.yahoo.com uncompressed/chunked Mon Feb 18 00:10:52 PST 2013 -->

Please check your url
R33