Re: How to write an own Serializer? Or is any Serializer for a bean available?

Stefan Haustein <[email protected]> Thu, 30 Jan 2003 20:15:45 +0100
Newsgroups gmane.comp.java.enhydra.ksoap
Organization Univ. Dortmund FB 4 LS 8
Message-ID <[email protected]>

Hans Kaiser wrote:

> Apache SOAP has a nice Serializer, the BeanSerializer. Is an BeanSerializer
> also under kSOAP available?
> If not, how could I implement my own one?
> Is there any example Code available?

For CLDC environments, it is not possible to create a BeanSerializer because
of the missing reflection capabilities. However, for CDC and J2SE, I think
it would be great to have one. I was planning to add one to kSOAP 2, but
till now, I did not find the time.

Building your own Bean serializer should be possible based on the
Marshal interface.

However, it would still be necessary to register all classes
to be (de)serialized with the SoapSerializationEnvelope in
order to inform kSOAP about the correct mapping between XML
namespaces and names and Java class names using the addMapping
method of SoapSerializationEnvelope.

Best,
Stefan


-- 
Stefan Haustein
Univ. Dortmund, FB 4, LS 8   tel: +49 231 755 2499
Baroper Str. 301             fax: +49 231 755 5105
D-44221 Dortmund (Germany)   www-ai.cs.uni-dortmund.de