You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Shimon Crown <sh...@equipnet.co.il> on 2000/09/14 15:16:53 UTC

Writing your own serializer / deserializer - problem with beanserializer

The demos supplied with Apache SOAP all rely on the bean
serializer/deserializer. Unfortunately my classes aren't recognized as
legitimate beans by the bean serializer. Part of the problem is that my
class doesn't actually hold a member variable for every set/get method. The
bean serializer refuses to handle classes as beans even though I believe
that they are legal beans.

In any event I am not sure that I want to use the bean serializer for
everything, so I would like to spin my own. However there doesn't seem to be
much about how to write your own serializer/deserializer so it will take me
a lot of trial and error. Before I go ahead and break my head on this,
perhaps someone could post an example or give me pointers to the correct way
to go.

Shimon



Re: Writing your own serializer / deserializer - problem with beanserializer

Posted by Cory Isaacson <ci...@capita2.com>.
Shimon,

There was someone earlier (Eric Dashofy) who mentioned this and wrote a
generic serializer. The text of his original email follows:

Hello fellow SOAPers:

(Am I on my SOAPbox now?  Hmm...)

I've finally posted alpha releases of my Java<->XML serializer and the
stubber-package that gives you RMI-like ease of use in a SOAP-ful world,
called "Hermit" (the HTTP-Enhanced Remote Method Invocation Technique).  As
I said, it's an alpha release, which means I'm not done with it, it's
possibly broken, and I reserve the right to change it at any time.  This is
something that was built on top of the Java SOAP 2.0 release, and I'm not
posting this for inclusion in the codebase, although I'm not opposed to that
idea....

<OLD-INFO>
If you missed the original discussion, the Reader's Digest version is:  This
package is a serializer for Java objects that makes it really easy to take a
Java object you've written, convert it to XML, and vice-versa.  Included in
the package is a wrapper, called ObjectSerializer, that is a proper Apache
SOAP serializer that uses this technology.  Additionally, I have implemented
a stubber that allows you to make a SOAP client for (almost) any Java
interface, much like an RMI stub.
</OLD-INFO>

If you want to use the Hermit service (the RMI-like stubbing) then you have
to use a slightly modified version of the SOAP 2.0 jar file that I've also
posted.  It is the same SOAP 2.0 you download from Apache, only with the
addition of a single patch I posted here a couple of days ago that hasn't
been included in a distribution yet.  If you just want to use the Java<->XML
serializer, you can use regular old SOAP 2.0, but you do need the latest
Xerces no matter what (obviously).

Anyway, if you're interested in taking a look at it, .class files, source,
and Javadoc are all available at:

http://www.ics.uci.edu/~edashofy/index-research.html

(Look in the 'Hermit' section.)

If you have questions, comments, rude gestures, bug reports or whatnot don't
hesitate to send me an email, or, better yet, post it on the list so the
group may benefit.

Best Regards,
-----
  Eric M. Dashofy <ed...@ics.uci.edu>
  Graduate Student Researcher, Information & Computer Science
  University of California, Irvine
  http://www.ics.uci.edu/~edashofy


----- Original Message -----
From: "Shimon Crown" <sh...@equipnet.co.il>
To: <so...@xml.apache.org>
Sent: Thursday, September 14, 2000 9:16 AM
Subject: Writing your own serializer / deserializer - problem with
beanserializer


> The demos supplied with Apache SOAP all rely on the bean
> serializer/deserializer. Unfortunately my classes aren't recognized as
> legitimate beans by the bean serializer. Part of the problem is that my
> class doesn't actually hold a member variable for every set/get method.
The
> bean serializer refuses to handle classes as beans even though I believe
> that they are legal beans.
>
> In any event I am not sure that I want to use the bean serializer for
> everything, so I would like to spin my own. However there doesn't seem to
be
> much about how to write your own serializer/deserializer so it will take
me
> a lot of trial and error. Before I go ahead and break my head on this,
> perhaps someone could post an example or give me pointers to the correct
way
> to go.
>
> Shimon
>
>


Re: Writing your own serializer / deserializer - problem with beanserializer

Posted by Cory Isaacson <ci...@capita2.com>.
Shimon,

There was someone earlier (Eric Dashofy) who mentioned this and wrote a
generic serializer. The text of his original email follows:

Hello fellow SOAPers:

(Am I on my SOAPbox now?  Hmm...)

I've finally posted alpha releases of my Java<->XML serializer and the
stubber-package that gives you RMI-like ease of use in a SOAP-ful world,
called "Hermit" (the HTTP-Enhanced Remote Method Invocation Technique).  As
I said, it's an alpha release, which means I'm not done with it, it's
possibly broken, and I reserve the right to change it at any time.  This is
something that was built on top of the Java SOAP 2.0 release, and I'm not
posting this for inclusion in the codebase, although I'm not opposed to that
idea....

<OLD-INFO>
If you missed the original discussion, the Reader's Digest version is:  This
package is a serializer for Java objects that makes it really easy to take a
Java object you've written, convert it to XML, and vice-versa.  Included in
the package is a wrapper, called ObjectSerializer, that is a proper Apache
SOAP serializer that uses this technology.  Additionally, I have implemented
a stubber that allows you to make a SOAP client for (almost) any Java
interface, much like an RMI stub.
</OLD-INFO>

If you want to use the Hermit service (the RMI-like stubbing) then you have
to use a slightly modified version of the SOAP 2.0 jar file that I've also
posted.  It is the same SOAP 2.0 you download from Apache, only with the
addition of a single patch I posted here a couple of days ago that hasn't
been included in a distribution yet.  If you just want to use the Java<->XML
serializer, you can use regular old SOAP 2.0, but you do need the latest
Xerces no matter what (obviously).

Anyway, if you're interested in taking a look at it, .class files, source,
and Javadoc are all available at:

http://www.ics.uci.edu/~edashofy/index-research.html

(Look in the 'Hermit' section.)

If you have questions, comments, rude gestures, bug reports or whatnot don't
hesitate to send me an email, or, better yet, post it on the list so the
group may benefit.

Best Regards,
-----
  Eric M. Dashofy <ed...@ics.uci.edu>
  Graduate Student Researcher, Information & Computer Science
  University of California, Irvine
  http://www.ics.uci.edu/~edashofy


----- Original Message -----
From: "Shimon Crown" <sh...@equipnet.co.il>
To: <so...@xml.apache.org>
Sent: Thursday, September 14, 2000 9:16 AM
Subject: Writing your own serializer / deserializer - problem with
beanserializer


> The demos supplied with Apache SOAP all rely on the bean
> serializer/deserializer. Unfortunately my classes aren't recognized as
> legitimate beans by the bean serializer. Part of the problem is that my
> class doesn't actually hold a member variable for every set/get method.
The
> bean serializer refuses to handle classes as beans even though I believe
> that they are legal beans.
>
> In any event I am not sure that I want to use the bean serializer for
> everything, so I would like to spin my own. However there doesn't seem to
be
> much about how to write your own serializer/deserializer so it will take
me
> a lot of trial and error. Before I go ahead and break my head on this,
> perhaps someone could post an example or give me pointers to the correct
way
> to go.
>
> Shimon
>
>