December 2002
Intermediate to advanced
1050 pages
24h 49m
English
The onMessage method shown below is used to handle the incoming messages for movies orders. The method receives the SOAP message as a parameter. By making a call to retrieve the SOAP part of the message and to retrieve the content of the message, we are able to retrieve an XML document that represents the message. Embedded within this XML document (as a subtree) is the XML document which represents our movies order.
Four lines of Java code are then used to convert the source object, an object that implements javax.xml.transform.Source, into a string representation of the XML document. This is done by creating a ByteArrayInputStream and wrapping it with a StreamResult (javax.transform.stream.StreamResult ...
Read now
Unlock full access