Jump to content

Java API for XML Messaging: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Citation bot (talk | contribs)
Add: title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by BrownHairedGirl | Linked from User:BrownHairedGirl/Articles_with_bare_links | #UCB_webform_linked 794/2189
Line 4: Line 4:


==Overview==
==Overview==
The [[List of Java APIs|Java API]] for XML Messaging (JAXM) enables developers to use [http://www.ibm.com/developerworks/library/co-tutintro.html XML messaging] using the Java platform. Developers can create and send XML messages over the internet using the JAXM API.<ref>http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM.html</ref>
The [[List of Java APIs|Java API]] for XML Messaging (JAXM) enables developers to use [http://www.ibm.com/developerworks/library/co-tutintro.html XML messaging] using the Java platform. Developers can create and send XML messages over the internet using the JAXM API.<ref>{{Cite web|url=http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM.html|title = Java API for XML Messaging}}</ref>
[[File:B2B Messaging Conceptual Model.png|thumbnail|The following figure presents a conceptual relationship between JAXM and other architectural elements required in web-based, business-to-business messaging.]]
[[File:B2B Messaging Conceptual Model.png|thumbnail|The following figure presents a conceptual relationship between JAXM and other architectural elements required in web-based, business-to-business messaging.]]


Line 13: Line 13:
*Reliable messaging with features such as guaranteed delivery
*Reliable messaging with features such as guaranteed delivery


The complete JAXM API comes with two packages:<ref>http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM.html</ref>
The complete JAXM API comes with two packages:<ref>{{Cite web|url=http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM.html|title = Java API for XML Messaging}}</ref>
*[http://docs.oracle.com/javaee/7/api/index.html?javax/xml/soap/package-summary.html '''javax.xml.soap:'''] This package contains the API for creating and populating a SOAP message.
*[http://docs.oracle.com/javaee/7/api/index.html?javax/xml/soap/package-summary.html '''javax.xml.soap:'''] This package contains the API for creating and populating a SOAP message.
*[https://mq.java.net/nonav/javadoc/5.0/javadoc/index.html?javax/xml/messaging/package-summary.html '''javax.xml.messaging:'''] This package allows one to send one-way messages via a messaging provider.
*[https://mq.java.net/nonav/javadoc/5.0/javadoc/index.html?javax/xml/messaging/package-summary.html '''javax.xml.messaging:'''] This package allows one to send one-way messages via a messaging provider.
Line 28: Line 28:
===SOAP Connection===
===SOAP Connection===
{{see also|SOAP with Attachments API for Java}}
{{see also|SOAP with Attachments API for Java}}
A SOAPConnection is a point-to-point connection for sending messages directly to a remote party.<ref>http://docs.oracle.com/javaee/5/api/javax/xml/soap/SOAPConnection.html</ref> A SOAPConnection object, which represents a point-to-point connection, is simple to create and use. You do not have to do any configuration to use a SOAPConnection object because it does not need to run in a servlet container (like Tomcat) or in a J2EE server. It is the only way for a client to have a connection without a service provider.<ref>http://docs.oracle.com/javaee/1.3/tutorial/doc/JAXM3.html</ref>
A SOAPConnection is a point-to-point connection for sending messages directly to a remote party.<ref>{{Cite web|url=http://docs.oracle.com/javaee/5/api/javax/xml/soap/SOAPConnection.html|title = SOAPConnection (Java EE 5 SDK)}}</ref> A SOAPConnection object, which represents a point-to-point connection, is simple to create and use. You do not have to do any configuration to use a SOAPConnection object because it does not need to run in a servlet container (like Tomcat) or in a J2EE server. It is the only way for a client to have a connection without a service provider.<ref>{{Cite web|url=http://docs.oracle.com/javaee/1.3/tutorial/doc/JAXM3.html|title=Overview of JAXM}}</ref>


===Provider Connection===
===Provider Connection===
A ProviderConnection object represents a connection to a messaging provider. (The next section explains more about messaging providers.) When you send a message via a ProviderConnection object, the message goes to the messaging provider. The messaging provider forwards the message, following the message's routing instructions, until the message gets to the ultimate recipient's messaging provider, which in turn forwards the message to the ultimate recipient.<ref>http://docs.oracle.com/javaee/1.3/tutorial/doc/JAXM3.html</ref>
A ProviderConnection object represents a connection to a messaging provider. (The next section explains more about messaging providers.) When you send a message via a ProviderConnection object, the message goes to the messaging provider. The messaging provider forwards the message, following the message's routing instructions, until the message gets to the ultimate recipient's messaging provider, which in turn forwards the message to the ultimate recipient.<ref>{{Cite web|url=http://docs.oracle.com/javaee/1.3/tutorial/doc/JAXM3.html|title=Overview of JAXM}}</ref>


==Messaging Providers==
==Messaging Providers==
Line 47: Line 47:
*The application can be written using the J2SE platform
*The application can be written using the J2SE platform
*The application is not required to be deployed in a servlet container or a J2EE container
*The application is not required to be deployed in a servlet container or a J2EE container
*No configuration is required<ref>http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM2.html#63942</ref>
*No configuration is required<ref>{{Cite web|url=http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/doc/JAXM2.html#63942|title=Overview of JAXM}}</ref>


==References==
==References==

Revision as of 12:42, 15 February 2022

The Java API for XML Messaging (JAXM) enables distributed software applications to communicate using XML (and SOAP). JAXM supports both asynchronous and synchronous messaging.

JAXM is one of the Java XML programming APIs

Overview

The Java API for XML Messaging (JAXM) enables developers to use XML messaging using the Java platform. Developers can create and send XML messages over the internet using the JAXM API.[1]

The following figure presents a conceptual relationship between JAXM and other architectural elements required in web-based, business-to-business messaging.

Also, Java API for XML Messaging has several advantages over Remote Procedure Call such as the following:

  • One-way (asynchronous) messaging
  • Routing of a message to more than one party
  • Reliable messaging with features such as guaranteed delivery

The complete JAXM API comes with two packages:[2]

  • javax.xml.soap: This package contains the API for creating and populating a SOAP message.
  • javax.xml.messaging: This package allows one to send one-way messages via a messaging provider.

Messages

Messages in JAXM are XML messages that follow the prescribed SOAP format and standards. There are two main types of SOAP messages: those that have attachments and those that do not. For example, if you want your message to contain an image, you must send an attachment with the message. The SAAJ API provides the AttachmentPart class for attachments in SOAP messages.[3]

Connections

A connection is required to send and receive all SOAP messages. The connection can go to a messaging provider or a particular destination.[4] The JAXM API provides the class and interface to represent two kinds of connections:

SOAP Connection

A SOAPConnection is a point-to-point connection for sending messages directly to a remote party.[5] A SOAPConnection object, which represents a point-to-point connection, is simple to create and use. You do not have to do any configuration to use a SOAPConnection object because it does not need to run in a servlet container (like Tomcat) or in a J2EE server. It is the only way for a client to have a connection without a service provider.[6]

Provider Connection

A ProviderConnection object represents a connection to a messaging provider. (The next section explains more about messaging providers.) When you send a message via a ProviderConnection object, the message goes to the messaging provider. The messaging provider forwards the message, following the message's routing instructions, until the message gets to the ultimate recipient's messaging provider, which in turn forwards the message to the ultimate recipient.[7]

Messaging Providers

A messaging provider keeps track of messages and routes them to the correct destination or destinations. It is a service that handles the transmission and routing of messages.[8]

When to use a Messaging Provider

A JAXM client may or may not use a messaging provider. Generally, you do not need a messaging provider if you just want to be a consumer of Web services. Some limitations of not using a messaging provider are the following:

The client can send only request-response messages The client can act in the client role only

Some advantages to not using a messaging provider are the following:

  • The application can be written using the J2SE platform
  • The application is not required to be deployed in a servlet container or a J2EE container
  • No configuration is required[9]

References

  1. ^ "Java API for XML Messaging".
  2. ^ "Java API for XML Messaging".
  3. ^ http://www.tecnun.es/asignaturas/InteInfo/Recursos/Xml/docs/tutorial/doc/JAXM3.html#63936
  4. ^ http://www.tecnun.es/asignaturas/InteInfo/Recursos/Xml/docs/tutorial/doc/JAXM3.html#63936
  5. ^ "SOAPConnection (Java EE 5 SDK)".
  6. ^ "Overview of JAXM".
  7. ^ "Overview of JAXM".
  8. ^ http://www.tecnun.es/asignaturas/InteInfo/Recursos/Xml/docs/tutorial/doc/JAXM3.html#63936
  9. ^ "Overview of JAXM".

See also