J2ME and SOAP

A

Altman

I am using netbeans to consume a web service written in VB.net. I am
having a problem getting this to work. I first tried doing this with
JSR 172 but got the error "Missing SOAP Body or Envelope." I did a
search on that and found that other people had this problem with no
idea how to fix it.
http://forums.java.sun.com/thread.jspa?threadID=520204&tstart=240 I
then tried using ksoap2. I downloaded the zip file and renamed it to a
jar file. I added the jar file to the library and the intellisense
shows that it is there but if I try to use any of the classes it says
that the class is missing or invalid. What am I doing wrong? how can
I get web services to work with J2ME?
 
A

Altman

Alright I got a little further with the kSoap (I think) but now it is
saying "Cannot find class java/io/FileReader" How can I get this class
available?
 
A

Altman

OK it was a mess to figure out, but I just took out driver.class in the
kObjects jar file I was then able to get it to work.
 
D

Darryl Pierce

Altman said:
Alright I got a little further with the kSoap (I think) but now it is
saying "Cannot find class java/io/FileReader" How can I get this class
available?

You can't. java.io.FileReader is not a part of the MIDP and you cannot
(both legally and also be prevented by the MIDP implementation) add it
to your project. kSOAP shouldn't be using FileReader anyway, since it's
designed for the MIDP. Is the include in your code or the kSOAP code?
 
A

Altman

The Driver.class that was in the kObjects jar file was trying to access
the filereader class. The kObject.jar is needed for ksoap to work. I
don't know why the driver.class is included in it, or what it does but
after I removed this class from the jar file it compiled just fine. I
just hope the Driver.class isn't needed for anything. Also in reading
up on it, filereader is available in CDC but not CLDC. And of course I
am using CLDC.
 
D

Darryl Pierce

Altman said:
The Driver.class that was in the kObjects jar file was trying to access
the filereader class. The kObject.jar is needed for ksoap to work. I
don't know why the driver.class is included in it, or what it does but
after I removed this class from the jar file it compiled just fine. I
just hope the Driver.class isn't needed for anything. Also in reading
up on it, filereader is available in CDC but not CLDC. And of course I
am using CLDC.

Trying putting the source code for kSOAP into your project, rather than
the JAR files, and compiling them along with your application. That way,
you'll get only those classes that are directly needed and can avoid
this kind of problem in future.
 
A

Altman

I did, the kSoap project you can put the code directly into your
project. But they rely on 2 jar libraries, kXml and kObjects. These 2
libraries are only available in jar files. The kObjects jar file had a
class in it that tried to use filereader which I took out of the jar
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top