Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

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.

Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat