Hello Emil,

I outline problem again as in previous email. However I have made
progress and need some pointers, read on...........


For example using Hessian I expose this interface as a HessianServlet
(server side)

public interface RemoteService
{
  public void sendScript(Script script);

  public Script getScript(int scriptId);
}

My Script object for this example is relatively simple (getters and
setters omitted for clarity)

public class Script implements Serializable
{
  private int scriptId;
  private List questions;
}

....where questions is a List of Question objects

public class Question implements Serializable
{
  private String question;
}


Using JDK1.4.2 and Hessian 2.1.12 all works great.

Using JDK1.5.0 and Hessian 3.1.3 all works great.


Now where I get a problem is when I install my HessianClient as an OSGi
bundle on Knopflerfish.

Using JDK1.4.2 and Hessian 2.1.12 my server receives correctly
constructed Script objects no problem from the Hessian client via
sendScript(Script). However the client receives Script objects via
getScript() from the server but the questions property in the Script
object is a List of HashMaps and not a list of Question objects??


Using JDK1.5.0 and Hessian 3.1.3 I cannot start my Hessian Client (OSGi
bundle). The Hessian library is trying to proxy the RemoteService
interface but its class loader cannot find it even though it is part of
the bundle jar. Class loading must be done differently in Hessian 2.1.12
and Hessian 3.1.3? Can you clarify?

Hence I am a bit stuck? Any ideas how to take this forward? Basically I
want to use Hessian on a PDA device (using OSGi) talking to Hessian
Servlet on the backend.

For the tests I made sure the Knopflerfish OSGi framework was started
with the correct JDK version depending on the test above. I'm a bit lost
now!!


Thanks

Paul

-----Original Message-----
From: Emil Ong [mailto:[EMAIL PROTECTED] 
Sent: 11 October 2007 16:51
To: Paul French; [email protected]
Subject: Re: [Hessian-interest] What objects cannot be sent over the
wire + bizarre marshalling and unmarshalling

--- Paul French <[EMAIL PROTECTED]> wrote:

> I am using JDK 1.4.2 (i.e. no generics) and Hessian 2.1.12

Hi Paul,

The behavior you're seeing sounds like a bug.  Have you tried a newer
version of hessian?  The default builds are targeted at 1.5, so you
might try downloading a source version and building a 1.4 targeted
jar.  Grab the Resin source and edit build.xml to add 

  <property name="javac.target" value="1.4"/>

at the top near the other javac properties.  Then run "ant" and "ant
dist" to get a hessian jar.  You'll need the 1.5 compiler to do this
step, but the resulting jar should work with your 1.4 code
afterwards.  It will be in the RESIN/dist directory.

Best,
Emil

============================================================

Emil Ong
Software Engineer
Caucho Technology, Inc.
Tel. (858) 456-0300
mailto:[EMAIL PROTECTED]

Caucho: Reliable Open Source
--> Resin: application server
--> Quercus: PHP in Java
--> Hessian Web Services

__________ NOD32 2586 (20071011) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to