- Why JAXM?
- What's In a SOAP Message?
- Synchronous and Asynchronous Messaging
- Are Message Providers Necessary?
Are Message Providers Necessary?
When delivering SOAP messages in a Web Services context, a messaging provider may not be required. If a client simply wants to interact directly with a Web Service, it can do so by using a JAXM SOAPConnection. The advantages of using a simple SOAPConnection are the following:
The application can be written using the J2SE platform.
The application isn't required to be deployed in a Servlet or a J2EE container.
No configuration is required: It's just create and send.
However, the tradeoffs are the following:
The client can send only request-response messages.
The client can act only as a client; it cannot also assume a server role.
Thus, if you want to provide a Web Service, which implies the capability to get and save requests sent to you, then use a JAXM messaging provider. When using a provider, your application must be run in a Servlet or J2EE container, which provides the messaging infrastructure used by the provider. Also, messaging providers provide the flexibility to assume both the client and service roles, and let you send one-way messages. For services that require additional protocols such as ebXML or SOAP-RPC, the additional quality-of-service features available in the JAXM API can be a great plus.