You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Samudra Gupta <gu...@samudra.fsworld.co.uk> on 2001/12/21 17:21:40 UTC

A suggestion for writing custom Serializers

Hello all,

While writing our own Custom Serializers, all of us must have noticed that in our overridden marshall() method, we have to add a line, 

sink.write("</" + context + '>')

Where sink is the Writer object. In my understanding, this is required in order to close the XML element tags that are being created in the process of marshaling the objects. (Follow the example of the LineItemSerializer in the apache SOAP examples).

If we miss this line, then there will be erros while parsing the SOAP Envelope. 

But really and truly, this job should have been taken care of by the XMLJavaMappingRegistry object as it creates the XML elements itself and outside that we do not bother about creating XML elements in a well-formed manner.

I am waiting for the response from the community and wish to forward it as a suggestion to the Apache SOAP API developer community.

Thanks and regards

Samudra Gupta

Samudra Gupta
93,Marks Court
Southend on sea
Essex
SS1 2RQ
United Kingdom

(44) 1702 329 496 (R)
(44) 7799790846 (Mobile)

_______________________________________________________________________
Never pay another Internet phone bill!
Freeserve AnyTime, for all the Internet access you want, day and night, only £12.99 per month.
Sign-up at http://www.freeserve.com/time/anytime