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.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 9. Consumer Endpoints
Abstract
Overview Link kopierenLink in die Zwischenablage kopiert!
Figure 9.1. Consumer Endpoint
Procedure Link kopierenLink in die Zwischenablage kopiert!
- Add a
consumer
element to yourxbean.xml
file. - Add a
wsdl
attribute to theconsumer
element. - If your WSDL defines more than one service, you will need to specify a value for the
service
attribute. - If the service you choose defines more than one endpoint, you will need to specify a value for the
endpoint
attribute. - Specify the details for the target of the requests received by the endpoint.
- If your endpoint is going to be receiving binary attachments set its
mtomEnabled
attribute totrue
. - If your endpoint does not need to process the JBI wrapper set its
useJbiWrapper
attribute tofalse
. - If you are using any of the advanced features, such as WS-Addressing or WS-Policy, specify a value for the
busCfg
attribute.
Specifying the WSDL Link kopierenLink in die Zwischenablage kopiert!
wsdl
attribute is the only required attribute to configure a consumer endpoint. It specifies the location of the WSDL document that defines the endpoint being exposed. The path used is relative to the top-level of the exploded service unit.
Example 9.1. Minimal Consumer Endpoint Configuration
Specifying the endpoint details Link kopierenLink in die Zwischenablage kopiert!
service
element you will need to specify a value for the consumer's service
attribute. The value of the consumer's service
attribute is the QName of the WSDL service
element that defines the desired service in the WSDL document. For example, if you wanted your endpoint to use the WidgetSalesService in the WSDL shown in Example 9.2, “WSDL with Two Services” you would use the configuration shown in Example 9.3, “Consumer Endpoint with a Defined Service Name”.
Example 9.2. WSDL with Two Services
Example 9.3. Consumer Endpoint with a Defined Service Name
endpoint
attribute. The value of the endpoint
attribute corresponds to the value of the WSDL port
element's name
attribute. For example, if you wanted your endpoint to use the WidgetEasternSalesPort in the WSDL shown in Example 9.4, “Service with Two Endpoints” you would use the configuration shown in Example 9.5, “Consumer Endpoint with a Defined Endpoint Name”.
Example 9.4. Service with Two Endpoints
Example 9.5. Consumer Endpoint with a Defined Endpoint Name
Specifying the target endpoint Link kopierenLink in die Zwischenablage kopiert!
- If you explicitly specify an endpoint using both the
targetService
attribute and thetargetEndpoint
attribute, the ESB will use that endpoint. - If you only specify a value for the
targetService
attribute, the ESB will attempt to find an appropriate endpoint on the specified service. - If you specify an the name of an interface that can accept the message using the
targetInterface
attribute, the ESB will attempt to locate an endpoint that implements the specified interface and direct the messages to it. - If you do not use any of the target attributes, the ESB will use the values used in configuring the endpoint's service name and endpoint name to determine the target endpoint.
Example 9.6. Consumer Endpoint Configuration Specifying a Target Endpoint