Basic Steps

Probably the best way to introduce JAXM is to examine a simple, synchronous request/response-style interaction. Here is the algorithm from the perspective of a sender, or message producer:

1.
Create a connection. This encapsulates the message transport.
2.
Create an endpoint. An endpoint represents a service. They describe the ultimate destination of a message.
3.
Create a message factory. This is a simple factory-pattern object. Message factories create empty message templates that implement different profiles.
4.
Construct a request message requesting a service. The application populates the message template with relevant data, using interfaces the profile implements.
5.
Send the request message to its destination; synchronously ...

Get Java™ Web Services Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.