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 "Gopinath M.R." <mr...@yahoo.com> on 2001/02/21 06:53:11 UTC

Issues in Apache SOAP implementation

Hi all,
	I am not use whether this is the right forum to ask the questions. [
should this be posted to soap developers forum??]
I thought there will be many users who would have faced such problems,
hence posting here...
here is my problem..

1. Any object that you put in Body , should that class always implement
Serializer to marshall??
	You can look at source code (SOAP 2.1) org.apache.soap.Body (line 145)
	
          if (Serializer.class.isAssignableFrom(bodyEntry.type)) {
            ((Serializer)bodyEntry.value).marshall(actualEncStyle,
bodyEntry.type, bodyEntry.value,
                                                   null, sink, nsStack,
xjmr, ctx);
          }

	IMO it need not be, I can write one serializer class that handles
serializing of all my classes [like one serializer/deserializer class
for  each group of service which may include many SOAP messages].  If
bodyEntry.type and bodyEntry.value are different classes, then the
serializer class has to be instantiated (using reflection) and the
marshall method with value has to be invoked.
	The bodyEntry.value and bodyEntry.type could be two different classes
and only bodyEntry.type can implement the Serializer interface.

	I don't want to implement Serializer interface for all my classes.  I
want to write one adapter class for apache soap implementation so that I
am not tied up with apache implementation.  If I should use different
SOAP implementation I can write similar adapter class.	The serializer
classes provided with toolkit doesn't suffice my requirements, hence I
am supposed to write my own serializer class.
	Right now I am facing ClassCastException since the object available as
bodyEntry.value doesn't implement the Serializer interface :-(

Is ther any other way to fix this problem without modifying SOAP source
code, please reply back...

Please reply back to my email id also (gopi@aztec.soft.net)

regards,
Gopinath M.R.
Sr.Product Engineer,
Aztec software (www.aztec.soft.net).

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com