Hi all,
I'd be grateful for any insights on this problem, seen using Hessian
3.0.20 with Sun's Wireless Toolkit 2.5 and a Nokia SDK/emulator.
I've extracted the following Hessian classes into a jar, as recommended:
com.caucho.hessian.micro.MicroInputHessian
com.caucho.hessian.micro.MicroOutputHessian
com.caucho.hessian.io.HessianRemote
com.caucho.hessian.io.HessianProtocolException
com.caucho.hessian.io.HessianServiceException
and included this jar in my Midlet application without any problems
apart from obfuscation (but that's another story). I connect to a web
service and call a method ("giveMeSomeStrings") returning a Vector,
like so:
HttpConnection hc = (HttpConnection) Connector.open(url);
hc.setRequestMethod(HttpConnection.POST);
OutputStream os = hc.openOutputStream();
MicroHessianOutput mhOut = new MicroHessianOutput(os);
mhOut.startCall("giveMeSomeStrings");
mhOut.completeCall();
os.flush();
os.close();
InputStream in = hc.openInputStream();
MicroHessianInput mhIn = new MicroHessianInput(in);
mhIn.startReply();
Vector reply = (Vector)mhIn.readObject( Vector.class );
mhIn.completeReply();
I can see the response using the Diagnostics tool in WTK and the raw
data seems to be what I expect, but on the call to "readObject" in the
emulator I get a NoClassDefFoundError, as follows:
Emulator command:
C:\WTK25\wtklib\devices\Nokia_S40_DP20_SDK_1_1\bin\S40_DP20_1_1_em.exe
-parent_port 2810 -classpath
"C:\WTK25\apps\VortixDemo\classes;C:\WTK25\apps\VortixDemo\res;C:\WTK25\apps\VortixDemo\tmplib\micro_hessian.jar"
"C:\WTK25\apps\VortixDemo\bin\VortixDemo.jad"
Using Trusted simulated domain
at com.caucho.hessian.micro.MicroHessianInput.readObject(+626)
at com.vortix.VortixMIDlet.sayHelloVectors(+143)
at com.vortix.VortixMIDlet.access$000(+4)
at com.vortix.VortixMIDlet$1.run(+7)
WARNING: [MIDlet] java.lang.NoClassDefFoundError: com/caucho/util/CharBuffer
I don't understand why it's looking for com.caucho.util.CharBuffer
(and I can't include this in my jar as it's non-J2ME compliant).
Many thanks for any help,
Jazz
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest