Show TOC

Adding PutPayloadValueBean in the Module ProcessorLocate this document in the navigation structure

Prerequisites

You have configured a communication channel and are on the Module tab page in change mode.

Context

Use PutPayloadValueBean to enrich the message with values from a module context. You can use this module in combination with GetPayloadValueBean to enrich a response message with information from the request. Normally you use GetPayloadValueBean to extract values from a message, then execute an adapter module (example, synchronous SOAP call) and finally use PutPayloadValueBean to enrich the response with stored values.

Procedure

  1. Enter the module name AF_Modules/PutPayloadValueBean after the module name of the adapter.
  2. The Module Type is Local Enterprise Bean .
  3. The system proposes a Module Key.
  4. Under Parameter Name, enter put:[XPath] . Use this parameter to specify XPath which points to a value you would like to put into the message. Parameter Value determines which value from the module's context will be used (the value is stored by GetPayloadValueBean). You can define multiple put parameters with different XPath names (i.e. put:/a/b, put:/a/c etc). You can combine configuration of GetPayloadValueBean and PutPayloadValueBean under the same module key.
  5. Under Parameter Name, enter xmlns. Use this parameter to define all xml namespaces used in your XPath expressions.

Example

Example

In a following example a message is enriched with a 'chNFe' value from the module context. XPath name used is /nfe2:nfeDadosMsg/nfe:chNFe. Namespaces are declared by a corresponding parameter.

Module Name

Type

Module Key

AF_Modules/GetPayloadValueBean

Local Enterprise Bean

Payload

Module Key

Parameter Name

Parameter Value

Payload

put:/nfe2:nfeDadosMsg/nfe:chNFe

chNFe

Payload

xmlns

xmlns:nfe2 = "http://www.portalfiscal.inf.br/ nfe/wsdl/NfeConsulta2" xmlns:nfe = "http://www.portalfiscal.inf.br/nfe"