httpwebrequest in blackberry application - blackberry

I am newbie to blackberry application development.
I want to make an HTTPWebRequest to my server for login process with database.
SO i am trying to do following:
conn = (HttpConnection) Connector.open("http://url.com/Login.ashx?EmailId=dummy#gmail.com&Password=dummy");
conn.setRequestMethod(HttpConnection.GET);
int s= conn.getResponseCode();
but when i am debugging it,i am gettin error on conn.getResponseCode() line.
and Eclipse show me following error:
Source Not Found
Please help me to solve this issue.
If you can suggest me any better link which explains it clear then it would be best.
Thanks in Advance.

Have you tried searching on "BlackBerry Source Not Found"?
The first try gives the answer: Debugging blackberry application in eclipse "source not found" problem

Related

Unable to run my MVC application in chrome/fire fox:

Can any one help me to resolve the below problem:
My mvc application is unabale to run on any website getting the error like "This site can’t be reached localhost refused to connect" .Please find the below screenshot for the same:
enter image description here
enter image description here
I Also tried with below solution which i got :
enter image description here
Thanks,
Akarsha R
If you are using Visual 2017 means that is difficult to solve the problem. Because google clients side are trying to solve it. So better to use fiddler for avoiding such issues.

Delphi 2010 Class TraCoreModule not found

When i run my application it tells me that "Class TraCoreModule not found". I tried to google witch class this is or where it comes from but no results.
Can anyone tell me what module this is or why i get this error please?
The application connects to a sql server database and updates a few fields.
It also uses ActiveX to send emails.
I am using Woll2Woll.
I wish i could provide more information but this is all i have.
I tried to locate the error in my code by printing debug messages in a memmo but this does not help.
So i figured out the issue. The TppReport was corrupted...

Getting error while execution through universal g code sender

I am trying to create a CNC machine and using GRBL 0.9i Firmware and universal g code sender. after creating the gcode in inkspace and sending the gcode to machine
,
I am getting error as following
An error was detected while sending 'M18': error: Unsupported command. Streaming has been paused.
**** Pausing file transfer. ****"
I am quite new to this and any help would be wonderful and greatly appreciated.
Thanks
Jaideep
GRBL does not support M18 (Spindle Orient) so you will need to remove all M18s from your program before running it. If you you can't prevent inkspace (I'm not familiar with it) from using that code you might have to use a text editor to replace all M18

How to pass data in body of a HttpConnection in blackberry

Actually I want to pass data in body of a httpconnection.
Using apache httpclient library in blackberry, integrated jar file in my project but getting compilation error while running my project.
Kindly updated me on the same.
I have not tried using Apache HttpClient lib in a BB project before, because I did not for a moment think it would work...
In short, you need the code to be compatible with J2ME, and compilable using the RIM tool chain. And then we get into other problems....
First of, be aware that networking in BlackBerry is NOT as straightforward as one might wish.
Have a look at this video for the back ground theory: Networking Transports on the BB Platform
Ok, then for some code (I assume here you already went through the trouble of obtaining an HttpConnection):
byte [] bodyBytes = getBodyBytesFromSomewhere();
OutputStream out = httpConnection.openOutputStream();
out.write(bodyBytes);
out.flush();
out.close();//If you are done, which I'm guessing you are
The above code is of course very simplistic, and completely ignores all the many, many errors that will occur during network IO.
I would suggest you also look at this API,this forum entry,and this one. OS6.0 also introduced a new HTTP Connection API - can't find a link for that right now (sorry!)

Try to connect to server with XMPP Connection

I am trying to connect from a blackberry device to an XMPP server. I searched over the web and found the smack.jar file that has the XMPP classes ready for use. So I created a new project and added the smack.jar file to the imported jar files. Then in the project I added the following:
public void login(String userName, String password) throws XMPPException {
ConnectionConfiguration config = new ConnectionConfiguration(IP, PORT, "gmail.com");
connection = new XMPPConnection(config);
connection.connect();
connection.login(userName, password);
}
The build is successful. Now when running the simulator and starting the project, i am getting the following error:
Error starting test: Module 'smack-3.1.0' not found
So I removed the smack.jar file from the imported jar files and added it manually to the classes of the project by adding a new file and selecting the smack.jar. When building the project I am getting this error:
org.jivesoftware.smack.AccountManager: Error!: Missing stack map in: supportsAccountCreation at label: 9
How to resolve this? How to connect to an XMPP server? Maybe smack isn't the right way!!
Please I need some help here
It looks like smack is from the andtalk project. Quickly browsing the site, I don't see any claims of Java-ME support. BlackBerry devices do not run full Java SE code, they can only run Java ME code, so most libraries won't work. It looks like this is one of them that won't work.
Jxa is an XMPP client library that works in Blackberry: http://sourceforge.net/projects/jxa/

Resources