Ce contenu n'est pas disponible dans la langue sélectionnée.

4.2.19. Advice on Adding Data to the Body of a Message


By default, every component (including actions, listeners, gateways, routers and notifiers) set data on the message via the MessagePayloadProxy. This class handles the default settings but it also allows you to over-ride the defaults. .
Alternatively, you can also override the "get" and "set" settings by configuring the following properties:
  • get-payload-location: this is the location from which to obtain the message payload.
  • set-payload-location: this where you set the location for the message payload to go.
You can use the add method to attach more complex content to the payload, which supports named objects. Using <name, Object> pairs allows for a finer granularity of data access. Arbitrary objects can be added to the payload; they do not need to be Java serializable. However, if you add non-serializable objects, you must provide the JBoss Enterprise SOA Platform with the ability to marshal and unmarshal the message when it flows across the network.

Note

If no name has been supplied for "setting" or "getting," then that which was defined against the DEFAULT_LOCATION setting will be utilised.

Note

Be careful when using serialized Java objects in messages as they constrain the service implementation.
It is easiest to work with the message body through the named object approach. You can add, remove and inspect individual data items without having to decode the entire message body. Furthermore, you can combine named objects with the byte array within the payload.

Note

In the current release of the JBoss Enterprise SOA Platform, you can only attach Java serialized objects. This restriction may be removed in a subsequent release.

Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat