KSOAP in MIDP
im new to MIDO. im developing a MIDP using kSOAP. My service returning arrays. How to do I use those arrays ? as Netbeans also not allowing to use split function to convert that string into array.
I stumbled over the same thing...
There are people out there developing - there has to be an answer to this!
Or is it too simple?
I don't get it though...
Similar Messages
-
Hi
SOAP communication + JAXM and RPC use to communicate on XML base messaging and attachments.
What is ksoap?Can soap run on midp emulators and palm tops?
What is KXML?
What is the status of kxml and ksoap ?? (relesed or still beta versions)
ThanksSee http://ksoap.enhydra.org
kSOAP provides a SOAP runtime for MIDP.
I've used kSOAP 1.0 and it seems pretty stable.
kXML is an XML Parser for MIDP, which kSOAP uses. -
MIDP 1.0: Image to byte[] or serializing...
I would like to extract pixels from a MIDP 1.0 "Image" object through any means possible. I am currently under the impression that "Image.toString()" would just do something lame, like giving me a string like "Image@1234" that identifies the class and the instance -- which could in principle be used for mere instance comparison. Anyhow, if I could serialize an Image object to a file, and then read back the file in to a byte array, then I would be delighted. I want to stress that I don't care how convoluted the approach may be, as long as it is in plain-vanilla J2ME Java code for MIDP 1.0 and is capable of working on an actual device (as opposed to an emulator). Can I cast the Image to Object, and then somehow convert to byte[]? I don't care if I have to get down and dirty, hacking the platform-specific bytes of the full Object manifestation of the Image. Anyhow, I want to make it clear that any hard core hack, doing all kinds of things that would break on different VMs, etc, is totally fine. Messy is fine. I just want access to the binary data of the entire Image object, or, even better (but only icing on the proverbial cake), access to pixel data. If I can get the byte[] representation of Image, then I can hack the rest myself.
My goal was do a capture of the way things actually rendered on a device, kind of like a "screen capture", only a little more indirect (since I don't think there is a way to get access to the pixels of the LCD). What I have to do is render to an off-screen Image object and then retrieve pixel data from it using the platform-dependent getPixels() supplied by Motorola. You're going to think I'm crazy, but I send this image data to a web server via POSTs, which get collected and stored as a single file on my web server. Voila! A screen capture of how things actually render to an Image object on an actual device.
Everything works, except...
I can't get the Motorola "getPixels()" method to work in their emulator, so I'm worried
that it won't work on my Motorola T720 (something I haven't actually tried, though).
I get a "Uncaught Exception: java/lang/Error" message from the T720 emulator
when I run one of the Motorola demos (built using their scripts) when I add the
following code to the Canvas paint() method:
if (0 == iDidThis) { iDidThis = 1;
try
{ javax.microedition.lcdui.Image temp = Image.createImage( 120, 160 );
int [] rgbData = new int [120*160];
com.motorola.game.ImageUtil.getPixels ( temp, 0, 0, 1, 1, rgbData );
System.out.println("Captured Data");
catch( java.lang.ArrayIndexOutOfBoundsException e )
{ e.printStackTrace(); } }
This code runs only once, when the paint() method of the Canvas object is called for
the first time. Okay, I get the error message, but the "Bounce" demo (to which I added
the code block above) goes on to run just fine. (NOTE: The message "Captured Data"
is NOT printed in this scenario.)
I don't understand why the public static "com.motorola.game.ImageUtil.getPixels()"
method causes the "java/lang/Error" exception. (By the way, if I comment out the
call to this method, the code totally works without error, and I see the printed
statement "Captured Data" in the command window associated with the emulator.)
If my getPixels() call resulted in bad array access, then I would get the
java.lang.ArrayIndexOutOfBoundsException exception. But apparently this is
not what is going on.
I am really rusty with J2ME, so I don't even know the meaning of "java/lang/Error".
I assume it is different from a "class not found" exception, but I suspect that my
problem has to do with a fault in the emulator trying to execute the code for the
"com.motorola.game.ImageUtil.getPixels()" method.
My Motorola emulator (v7.5) is from around December, 2002, so it may be really old, and
maybe this was a known issue at that time that has since been resolved. I'm just never
tried to use platform-specific J2ME APIs before, so I don't know if what I am observing
is my fault, or is an emulator issue.
I'd be grateful for any ideas about what might be going wrong and for ideas about
possible solutions. -
Hi all,
I've a few questions on MIDP security to seek help:
1) Suppose I have a midlet to store confidential details on the mobile phone, if it doesn't make any connections to the internet, would anyone be able to retrieve the information I'd on the RMS?
2) Again, assuming no internet connection is made by the midlet. Suppose I've a login screen that prompts for a password & uses MD5. Can anyone crack it?
3) Is it possible to retrieve the midlet from the mobile phone itself onto a desktop?
Thanks for the help!Yes, it is possible to retrieve the data stored in
RMS.
Just try it on a Nokia S60 phone:
1. download and install FExplorer (free file
explorer)
2. go to: c:\system\midp\<vendor>\untrusted\<midlet
name>\<?????> folder
3. select rms.db
3. choose options/send/SMS|MMS|e-mail|bluetooth|irda
Of course cracking is a harder work...does this means that I can follow your step 1 & goto whichever midlet that I'm interested in & send the JAR/JAD file via SMS/MMS/Email/BlueTooth/IRDA? -
How to change the midp version in ktoolbar of wireless toolkit 2.1
Hi
How to change the version of midp in ktoolbar of wireless tool kit 2.1
though i tried to change the platform by selecting midp1.0 from settings
dialog box iam geeting alert:BadVersion Error
and the application is terminated abruptly
do i need to change any configuration files
please suggest me
as it is very urgentThe version of Java inside the database? If so - Not recommended at all ... the environment is NOT the same as your grandfathers JRE and there are a few noteworthy conditions.
How much of the Oracle Java Developer's Guide have you reviewed? http://www.oracle.com/pls/db102/to_toc?pathname=java.102%2Fb14187%2Ftoc.htm&remark=portal+%28Books%29 -
How to open files in MIDP (from the jar file)?
Hello,
I can't seem to figure out how to open a file that is in my MIDP applications jar-File.
From what I've found via Google, I assume that the way to do it should be by using
Connector.openInputStream("file:{path_to_my_file}")
but I only get the error
java.lang.ClassNotFoundException: com.sun.midp.io.j2me.file.Protocol
(Running the Emulator from Suns WTK 2.0 with DefaultColorPhone)
I've also tried file:// with the same result.
Any ideas?
Many thanks in advance!
BjoernI think I've found something that looks promising now:
Class.getResourceAsStream() -
What's a good MIDP 2.0 implementation? Not Nokia 6600!
Hi All,
My company is developing an mobile application that connects to a server over HTTP... Nothing new. But we need the features of MIDP 2.0 and MMAPI because we take photos of items and upload these to the server, as well as some CustomItem for displaying these in a grid-like format.
The only one matching this profile (according to http://jal.sun.com/webapps/device/device?api=61) is the Nokia 6600. So we brought one. Unfortunately, it has a lot of bugs which make us unable to use these features. CustomItems don't display on the screen until they are forced to refresh (by moving over them, etc.) Changing Forms (using setDisplay) causes the app to 'randomly' crash. The ChoiceItem as type POPUP doesn't respond to the change event so they are practicly useless. To work around these we had to make a CustomForm class which recorded the state of the current form & cleared it as a new form for use by another 'screen'. Change the popups into opening another form for selection.
We also had to make the camera capture as a Form item (to prevent changing Displayables and causing random crashes). But the picture about to be taken would only update if you moved the cursor right or left (suprisingly up & down didn't do anything).
In the end it basically became unusable because of all these changes & work-a-rounds just to avoid the bugs in the implementation. Nokia weren't of much help either!
I really like the MIDP 2.0 profile, Sun's SDK is excellent, and was very quick & easy to get used too. So since a lot of the code already exists in J2ME and our server side is also J2EE, I would like to continue developement in this environment.
So I guess the purpose of writing this message is two-fold... 1) If you are thinking of serious MIDP 2.0 developement, don't use the 6600 and 2) Can anyone please tell me if there is a decent implementation of MIDP 2.0 & MMAPI out on the market? We really need to know as we don't want to go to other alternatives (like Microsoft) but we will if there are no other choices....
Thanks in advance for any help at all.Hi, What I am providing is not really a solution to your problems.
In fact I am asking questions, currently I want to do the same thing as you i.e. uploading and downloading medias files to and from a Server, therefore my questions are:
-Can You access the default media files folders (Image, sounds and videos) ?
-Is it in these folders that you store the downloaded media files ? or are you obliged to store them elsewhere (RMS in particular ).
I am currently using Symbian C++ as developing langage but if I could move to Java It would be great because It's too hard to master symbian C++ (every thing is a nightmare...).
Thanks in advance for your anwser
Have a nine day -
hi,
Im Rahulya, i'm final year student of b.e. computer.
I am working on my project ,which requires me to port midp on linux, and i guess anybody might have already ported midp,so i expect some help from u.
I have already ported KVM on redhat linux, now im porting midp on redhat linux. Almost it's done , but i have problem in midp event handling.
I have written stubs for the native functions which have not been defined in the midp/src/platform/native directory.(Eg. Java_com_sun_cldc_io_j2me_events_PrivateInputStream_readInt()
,this function is called in midpEvents.c)
In midpEvents.c the function
void Java_com_sun_midp_lcdui_Events_readInt(void)
calls the function
Java_com_sun_cldc_io_j2me_events_PrivateInputStream_readInt()
but the function is undefined. And i am not able to find anything related to how to port these native functions or how to implement these function.
So, if u have any idea about this ,please let me know
Help me out.
Thanks in advance.hi
i'm having the same problem. -
Hello.
I am trying to develope a "simple" MP3 playback application using "Java(TM) ME platform SDK 3.0, EA", but I have a problem.
I need to write the program for a device that has CLDC 1.1 and MIDP 2.0 configuration, with optional JSR-75 and JSR-135 packages.
When I start a new MIDP application project, I can choose the platform. Then I have 3 options:
DefaultCldcMsaPhone 1&2 --- CLDC-1.1 & MIDP-2.1 with MMAPI and File Connection (among others)
DefaultCldcPhone 1&2 --- CLDC-1.1 & MIDP-2.1 with MMAPI and File Connection (among others)
DefaultCldcJtwiPhone 1&2 --- CLDC-1.1 & MIDP-2.0 with only MMAPI and Wireless Messaging.
The other options are greyed, so I can not select a combination that has CLDC-1.1, MIDP-2.0, MMAPI and File Connect at the same time... I have tryied switching to the full NetBeans and then I have more flexibility choosing the device configuration and profile, using "Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC" emulator platform. But when I run my application in the emulator, it takes some seconds to start playing the MP3. When I change to SDK 3.0, it plays inmediately.
So my question is, can I create a custom device that has everyting I need with "Java(TM) ME platform SDK 3.0, EA"?
Thank you in advance.
Marc Vallribera i RosHi,
This problem is known and will be resolved in Final Release of SDK.
Now you can try to change configuration in <your_project_path>/project.properties file.
platform.bootclasspath and platform.profile parameters should be changed.
Igor -
application is developed in cldc/midp environment , will it run in pda devices which also has cldc configuration...
pl help me in this....
Thnaks in advanceCLDC will support jdk1.2 that's Personal java. So if you develope program using jdk1.2 it will support pda computer. Before u run this program using Pjee(personal java emulatior enivronment).
u run this program using "pjava file name" -
How Can I create a dictionary file (dicionary.dat) in MIDP
Hi All,
I need your help.
Let me explain clearly my problem so u can advise me what to do.
In fact, I have a text file of words called (words.txt) and I would like to create a dictionary file (dict.dat)of those words and be able to load that dictionary so that I can read it.
Can you help how I can do that in MIDP. I am using Wireless Toolkit 2.5.
I need hint so I can do that.
ThanksHi All,
I need your help.
Let me explain clearly my problem so u can advise me
what to do.
In fact, I have a text file of words called
(words.txt) and I would like to create a dictionary
file (dict.dat)of those words and be able to load
that dictionary so that I can read it.
Can you help how I can do that in MIDP. I am using
Wireless Toolkit 2.5.
I need hint so I can do that.
Thankshello theotime,
did you find a way to do that?
I've got a problem similar to your: a list of 3000 wines to filter in a reasonable fast time.
how big is your dictionary?
with a text file encoded in UTF-8 I take about 60 seconds on the emulator, maybe with a binary format the search can be done faster...
before reading your post i've started this thread:
http://forum.java.sun.com/thread.jspa?threadID=5184516
...not very helpfull...right now...
please, let me know!!!
thank-you in advance,
daniele -
Midp guide, how to use it.
Hi,
I like to make midp programs for my mobile device, but my mobile device supports only midp 1.0.
I was wondering is there a way to install midp 2.0 or above and how ?
Edited by: GNU_D on Jul 16, 2008 4:28 AM
wrong bold beginning tag.Can I make something like a remote control through bluetooth, my goal is next>
a list of items represents a name of commands
play(p)
pause(b)
stop(h)
seek(f)
next(nx)
previus(pv)
shutdown(pd)
exit(x), when I press the item it must send a string to bluetooth, on the other side on a computer a server is reading the string, depending of a content it do some actions.
Now, about the bluetooth api, is it available in midp 1.0 ? -
MIDP 2.0 reference Implementation Strange code
I' ve found a strange code in the http/Protocol.java of the Reference MIDP 2.0 Implementation.
Line 139 in the static initializer.
prop = Configuration.getProperty(
"com.sun.midp.io.http.max_persistent_connections");
if (prop != null) {
try {
temp = Integer.parseInt(prop);
if (temp <= 0) { //!!!!
maxNumberOfPersistentConnections = temp;
} catch (NumberFormatException nfe) {
// keep the default
}Can somebody explain me, why it looks so? It must be ">".
Additionally, it looks like WTK22 emulator don't understands the property.No ideas?
-
Re: Playing of MP3 audio format in MIDP 2.0
I have the same error ?
Has anybody found a solution ?
thx a lot
NikoThe MIDP 2.0 reference platform does not support MP3 playback.
The supported formats are noted in the MMADemo.html document that comes with the Wireless Toolkit:
"MMAPI supported formats in the J2ME Wirless Toolkit are:
Audio (same for full and Audio Building Block): PCM and WAV audio of all types.
MIDI: Type 0, Type 1 MIDI, and SP-MIDI" -
Multiple socket connections with MIDP
dear experts,
I have a simple problem and I hope someone can help me to solve it.
I need to open a socket connection from multiple MIDlets on the same port.
This error occours when I try to make a socket push registration from the second (or third, or fourth...) midlet (I'm able to connect to the socket correctly from the first midlet that makes a push registration):
PushProcessor.run Exceptionjava.io.IOException: ServerSocket Open
java.io.IOException: ServerSocket Open
at com.sun.midp.io.j2me.serversocket.Socket.open(+39)
at com.sun.midp.io.j2me.socket.Protocol.openPrim(+127)
at javax.microedition.io.Connector.openPrim(+121)
at javax.microedition.io.Connector.open(+15)
at javax.microedition.io.Connector.open(+6)
at javax.microedition.io.Connector.open(+5)
at it.myprj.midp.BasicPushMIDlet$PushProcessor.run(+16)
I would know if push registry API allows to have multiple connection on the same socket port.
any help is appreciated!
giovanniin my opinion,
due to the fact when an app binds one port and a second app tries to bind the same (@same time) there will ever be a exception (from my point of view)!
an no i think that push registry cant register two apps on same port (eg datagram://5060)
hope this helps
chris
Maybe you are looking for
-
How to correct "An incompatible audio signal" with Apple TV and HD signal
I have an Apple tv2(mc572Ll/a) running version 4.4.4 of the software, connecting to an older Sharp Aquos LCD-26d6u TVvia a regular HDMI cable. I used to be able to watch a rented movie until my onsitel technician/ teenager adjusted something. Now whe
-
Hello I have just sold my old macbook and so transfered all my data to my newer macbook using transfer manager. This allowed my to login on the newer computer under either the old or new username so I could access both computers' data on my newer co
-
Authorization problems after upgrade
After upgrading to the new version of iTunes, I was prompted to reauthorize my pc. It will not accept my old aol screename and password (no longer with aol), and when I created a new screename with apple, it did not copy 410 songs over. So I'm stuck.
-
Nokia e90 and polar axn700 infrared using MobileLi...
Dear Nokia Support, I was wondering if it would be possible somehow to connect a polar heartrate watch such as for example the AXN700 to Polar Sports software for Nokia using infrared. The software seems to crash when trying to connect and at the pol
-
I bought an Apple TV and when I rent a movie, I get a display saying that no HDCP is available. How can I solve this problem?