It is in this context that the relationship
between Java and XML in the ServiceMix context needs attention.
This chapter will provide a brief introduction to Java XML binding and to the
concepts and technologies that it employs.
So we will cover the following in this chapter:
Java XML binding in general
Java XML binding frameworks including XStream
XStream integration with the ServiceMix ESB
Working code sample showing XStream in action in ServiceMix
??? ??? ??? ???
Java XML Binding Using XStream
[ 222 ]
Java XML Binding
Java XML binding deals with transforming the XML instances to the Java instances and
vice versa. Even though we can do this by writing Java code from scratch against the
XML APIs, today we have multiple tools and frameworks which will do the same.
The above figure shows a typical scenario we might come across in B2B interactions.
Leave the advanced validations or CRUD operations one can do in the XML
documents alone, we are interested in the marshalling and unmarshalling
functionality of the JAXB. XML is the de-facto wire format in SOA and SOI. If we
need to process the XML data from within our Java components, we have to do some
form of XML binding.
Pages:
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312