Apache SOAP Type Mapping

Maybe you’re familiar with this story. XML Web Services API implementations make it really easy for you to create servers based on an object. but what about objects for which you already have an XML schema?

The only good way to do this is by custom serialization. This article in IBM’s developerWorks teaches you how to do your own serialization. This is something that I always found kind of interesting. Developers usually fall for the immediate Gee-Whiz factor and fail to mention some of the cooler features of the architecture they wrote.

For example, in Apache SOAP and Axis,
you can write your own serialization. But the typical tutorials only cover the happy paths and assume no legacy stuff.

Next thing you know, you commited yourself to some project, thought it was going to be really easy because you wouldn’t have to do any marshaling yourself, and now you’re stuck.

If you have gotten yourself in this situation,
the SOAP mapping article in IBM’s developerWorks is your ticket out. It describes how to write a custom serializer/deserializer, and Part two teaches you how to embed castor or your own existing xml serialization framework based on schemas into the mix..