Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Este conteúdo não está disponível no idioma selecionado.
37.4. Sort Messages by Operation Name
The operationName header Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
When the WS endpoint parses an incoming operation invocation in POJO mode, it automatically sets the
operationName header to the name of the invoked operation. You can then use this header to sort messages by operation name.
Sorting by operation name Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
For example, the
customer-ws-camel-cxf-pojo demonstration defines the following route, which uses the content-based router pattern to sort incoming messages, based on the operation name. The when predicates check the value of the operationName header using simple language expressions, sorting messages into invocations on the updateCustomer operation, the lookupCustomer operation, or the getCustomerStatus operation.
Beans as endpoints Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Note how the preceding route uses a convenient shortcut to divert each branch of the
choice DSL to a different processor bean. The DSL for sending exchanges to producer endpoints (for example, <to uri="Destination"/>) is integrated with the bean registry: if the Destination does not resolve to an endpoint or a component, the Destination is used as a bean ID to look up the bean registry. In this example, the exchange is routed to processor beans (which implement the org.apache.camel.Processor interface).