LibraryLink ToToggle FramesPrintFeedback

Configuring Consumer Endpoints

JAX-WS consumer endpoints are configured using the jaxws:client element. The element's attributes provide the basic information necessary to create a consumer.

To add other functionality, like WS-RM, to the consumer you add children to the jaxws:client element. Child elements are also used to configure the endpoint's logging behavior and to inject other properties into the endpoint's implementation.

The attributes described in Table 1.4 provide the basic information necessary to configure a JAX-WS consumer. You only need to provide values for the specific properties you want to configure. Most of the properties have sensible defaults, or they rely on information provided by the endpoint's contract.

Table 1.4. Attributes Used to Configure a JAX-WS Consumer

AttributeDescription
address Specifies the HTTP address of the endpoint where the consumer will make requests. This value overrides the value set in the contract.
bindingId Specifies the ID of the message binding the consumer uses. A list of valid binding IDs is provided in Appendix A.
bus Specifies the ID of the Spring bean configuring the bus managing the endpoint.
endpointName Specifies the value of the wsdl:port element's name attribute for the service on which the consumer is making requests. It is specified as a QName using the format ns:name, where ns is the namespace of the wsdl:port element.
serviceName Specifies the value of the wsdl:service element's name attribute for the service on which the consumer is making requests. It is specified as a QName using the format ns:name where ns is the namespace of the wsdl:service element.
username Specifies the username used for simple username/password authentication.
password Specifies the password used for simple username/password authentication.
serviceClass Specifies the name of the service endpoint interface(SEI).
wsdlLocation Specifies the location of the endpoint's WSDL contract. The WSDL contract's location is relative to the folder from which the client is deployed.
name Specifies the stringified QName of the wsdl:port element for the service on which the consumer is making requests. It is specified as a QName using the format {ns}localPart, where ns is the namespace of the wsdl:port element and localPart is the value of the wsdl:port element's name attribute.
abstract Specifies if the bean is an abstract bean. Abstract beans act as parents for concrete bean definitions and are not instantiated. The default is false. Setting this to true instructs the bean factory not to instantiate the bean.
depends-on Specifies a list of beans that the endpoint depends on being instantiated before it can be instantiated.
createdFromAPI

Specifies that the user created that bean using Fuse Services Framework APIs like Service.getPort().

The default is false.

Setting this to true does the following:

  • Changes the internal name of the bean by appending .jaxws-client to its id

  • Makes the bean abstract


In addition to the attributes listed in Table 1.4, it might be necessary to use multiple xmlns:shortName attributes to declare the namespaces used by the endpointName and the serviceName attributes.

To add functionality to your consumer or to perform advanced configuration, you must add child elements to the configuration.

Child elements allow you to do the following:

Table 1.5 describes the child element's you can use to configure a JAX-WS consumer.

Table 1.5. Elements For Configuring a Consumer Endpoint

ElementDescription
jaxws:binding Specifies a bean configuring the message binding used by the endpoint. Message bindings are configured using implementations of the org.apache.cxf.binding.BindingFactory interface.[a]
jaxws:dataBinding Specifies the class implementing the data binding used by the endpoint. You specify this using an embedded bean definition. The class implementing the JAXB data binding is org.apache.cxf.jaxb.JAXBDataBinding.
jaxws:features Specifies a list of beans that configure advanced features of Fuse Services Framework. You can provide either a list of bean references or a list of embedded beans.
jaxws:handlers Specifies a list of JAX-WS Handler implementations for processing messages.
jaxws:inInterceptors Specifies a list of interceptors that process inbound responses. For more information see Developing Apache CXF Interceptors.
jaxws:inFaultInterceptors Specifies a list of interceptors that process inbound fault messages. For more information see Developing Apache CXF Interceptors.
jaxws:outInterceptors Specifies a list of interceptors that process outbound requests. For more information see Developing Apache CXF Interceptors.
jaxws:outFaultInterceptors Specifies a list of interceptors that process outbound fault messages. For more information see Developing Apache CXF Interceptors.
jaxws:properties Specifies a map of properties that are passed to the endpoint.
jaxws:conduitSelector Specifies an org.apache.cxf.endpoint.ConduitSelector implementation for the client to use. A ConduitSelector implementation will override the default process used to select the Conduit object that is used to process outbound requests.

[a] The SOAP binding is configured using the soap:soapBinding bean.


Example 1.4 shows a simple consumer configuration.