JBI Support deprecated in Apache ServiceMix 4
JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project. Take a look at our technology selection guidelines for more information.
servicemix-http
Overview
ServiceMix ships with a JBI compliant HTTP/SOAP binding component named servicemix-http.
Here are the main features:
JBI compliant Binding Component
Usable in a lightweight mode in servicemix.xml configuration files
Integrated HTTP server based on Jetty 6
HTTP Client using Jakarta Commons HTTP Client
Highly performant and scalable using Jetty 6 continuations
SOAP 1.1 and 1.2 support
MIME attachments
WS-Addressing support
WSDL based and XBean based deployments
Support for all MEPs as consumers or providers
SSL support
WS-Security support
Namespace and xbean.xml
The namespace URI for the servicemix-bean JBI component is http://servicemix.apache.org/http/1.0. This is an example of an xbean.xml file with a namespace definition with prefix bean.
<beans xmlns:http="http://servicemix.apache.org/http/1.0">
<!-- add http:consumer, http:soap-consumer
http:provider and http soap:provider definitions here -->
</beans>
Endpoint types
The servicemix-http component defines four endpoint type:
http:consumer :: This endpoint allows you to expose a service in the ESB to the outside world over HTTP. Whenever it receives an HTTP request, it will interact with the configured services on the ESB to provide the HTTP response.
http:soap-consumer :: Similar to http:consumer, but specifically geared towards handing SOAP requests and responses
http:provider :: This endpoint allows you to access remote services from within the ESB. It will perform an external HTTP request whenever it receives a JBI MessageExchange
http:soap-provider :: Similar to http:provider, but specifically geared towards performing SOAP requests
It also provides one additional legacy endpoints, which are still available to ease migration from ServiceMix 3:
http:endpoint :: (Deprecated) Legacy endpoint, capable to acting as a consumer or provider based on the configuration
http:endpoint
Endpoint properties
Property Name | Type | Description |
---|---|---|
authMethod | java.lang.String | a string naming the scheme used for authenticating users |
basicAuthentication | org.apache.servicemix.http.BasicAuthCredentials | authentication data for using basic HTTP authentication. |
binding | javax.wsdl.extensions.ExtensibilityElement | |
defaultMep | java.net.URI | |
defaultOperation | javax.xml.namespace.QName | |
description | org.w3c.dom.Document | |
dynamic | boolean | |
endpoint | java.lang.String | The name of the endpoint. |
interfaceName | javax.xml.namespace.QName | The qualified name of the interface exposed by the endpoint. |
locationURI | java.lang.String | the URI to which a provider endpoint sends requests |
policies | (java.lang.Object)\* | |
proxy | org.apache.servicemix.http.ProxyParameters | configuration used to establish a proxy for sending HTTP requests. This configuration overrides that which is set at the component level. |
responseContentTypeCheck | boolean | Specifies if the http provider checks the response content type for the |
role | java.lang.String | HTTP endpoints can be either consumers or providers. Specifying |
roleAsString | java.lang.String | |
service | javax.xml.namespace.QName | The qualified name of the service the endpoint exposes. |
soap | boolean | |
soapAction | java.lang.String | |
soapVersion | java.lang.String | |
ssl | org.apache.servicemix.http.SslParameters | a bean containing the SSL configuration properties |
synchronous | boolean | |
targetEndpoint | java.lang.String | |
targetInterfaceName | javax.xml.namespace.QName | |
targetService | javax.xml.namespace.QName | |
timeout | int | the number of milliseconds before the endpoint times out. The default value is 0 which means that the endpoint will never timeout. |
wantContentTypeHeaderFromExchangeIntoHttpRequest | boolean | Specifies if the HTTP provider will copy the HTTP request headers into the JBI |
wsdlResource | org.springframework.core.io.Resource |
http:consumer
Endpoint properties
Property Name | Type | Description |
---|---|---|
authMethod | java.lang.String | a string naming the scheme used for authenticating users |
component | org.apache.servicemix.common.DefaultComponent | |
defaultMep | java.net.URI | a URI representing the endpoint's default MEP. The default is |
endpoint | java.lang.String | The name of the endpoint. |
interfaceName | javax.xml.namespace.QName | The qualified name of the interface exposed by the endpoint. |
locationURI | java.lang.String | the URI at which the endpoint listens for requests |
marshaler | org.apache.servicemix.http.endpoints.HttpConsumerMarshaler | the bean used to marshal HTTP messages. The default is a |
service | javax.xml.namespace.QName | The qualified name of the service the endpoint exposes. |
serviceUnit | org.apache.servicemix.common.ServiceUnit | |
ssl | org.apache.servicemix.http.SslParameters | a bean containing the SSL configuration properties |
targetEndpoint | java.lang.String | the name of the endpoint to which requests are sent |
targetInterface | javax.xml.namespace.QName | the QName of the interface to which requests are sent |
targetOperation | javax.xml.namespace.QName | the QName of the operation to which requests are sent |
targetService | javax.xml.namespace.QName | the QName of the service to which requests are sent |
targetUri | java.lang.String | Set the target service/endpoint/interface using a URI. |
timeout | long | the timeout is specified in milliseconds. The default value is 0 which |
http:provider
Endpoint properties
Property Name | Type | Description |
---|---|---|
clientSoTimeout | int | the number of milliseconds the endpoint will block while attempting to read a request. The default value is 60000. Setting this to 0 specifies that the endpoint will never timeout. |
component | org.apache.servicemix.common.DefaultComponent | |
credentials | java.lang.String | The authentication credentials |
endpoint | java.lang.String | The name of the endpoint. |
expectGzippedResponse | boolean | If true, the accept-encoding http header will be set to gzip and the response will be un-gzipped. |
gzipRequest | boolean | If true, the request content will be gzipped and sent over the wire. The content-encoding http header will also be set to gzip. |
interfaceName | javax.xml.namespace.QName | The qualified name of the interface exposed by the endpoint. |
locationURI | java.lang.String | the URI to which the endpoint sends requests |
marshaler | org.apache.servicemix.http.endpoints.HttpProviderMarshaler | the bean used to marshal HTTP messages. The default is a |
principal | java.lang.String | The authentication principal |
providerExpirationTime | int | the number of milliseconds to wait for a response before expiring. |
proxyHost | java.lang.String | the host name of the HTTP proxy |
proxyPassword | java.lang.String | the password for the HTTP proxy authentication |
proxyPort | int | the host port of the HTTP proxy (defaults to 80) |
proxyUsername | java.lang.String | the user name for the HTTP proxy authentication |
service | javax.xml.namespace.QName | The qualified name of the service the endpoint exposes. |
serviceUnit | org.apache.servicemix.common.ServiceUnit | |
ssl | org.apache.servicemix.http.SslParameters | the SSL parameters |
http:soap-consumer
Endpoint properties
Property Name | Type | Description |
---|---|---|
authMethod | java.lang.String | a string naming the scheme used for authenticating users |
component | org.apache.servicemix.common.DefaultComponent | |
defaultMep | java.net.URI | a URI representing the endpoint's default MEP. The default is |
endpoint | java.lang.String | The name of the endpoint. |
interfaceName | javax.xml.namespace.QName | The qualified name of the interface exposed by the endpoint. |
locationURI | java.lang.String | the URI at which the endpoint listens for requests |
marshaler | org.apache.servicemix.http.endpoints.HttpConsumerMarshaler | the bean used to marshal HTTP messages. The default is a |
policies | (org.apache.servicemix.soap.api.Policy)\* | a list of interceptors that will process messages |
service | javax.xml.namespace.QName | The qualified name of the service the endpoint exposes. |
serviceUnit | org.apache.servicemix.common.ServiceUnit | |
soapVersion | java.lang.String | Specifies the SOAP version to use when generating a wsdl binding for |
ssl | org.apache.servicemix.http.SslParameters | a bean containing the SSL configuration properties |
targetEndpoint | java.lang.String | the name of the endpoint to which requests are sent |
targetInterface | javax.xml.namespace.QName | the QName of the interface to which requests are sent |
targetOperation | javax.xml.namespace.QName | the QName of the operation to which requests are sent |
targetService | javax.xml.namespace.QName | the QName of the service to which requests are sent |
targetUri | java.lang.String | Set the target service/endpoint/interface using a URI. |
timeout | long | the timeout is specified in milliseconds. The default value is 0 which |
useJbiWrapper | boolean | Specifies if the JBI wrapper is sent in the body of the message. Default is |
validateWsdl | boolean | Specifies if the WSDL is checked for WSI-BP compliance. Default is <code>true</code>. |
wsdl | org.springframework.core.io.Resource | the URL of the WSDL document defining the endpoint's messages |
http:soap-provider
Endpoint properties
Property Name | Type | Description |
---|---|---|
clientSoTimeout | int | the number of milliseconds the endpoint will block while attempting to read a request. The default value is 60000. Setting this to 0 specifies that the endpoint will never timeout. |
component | org.apache.servicemix.common.DefaultComponent | |
credentials | java.lang.String | The authentication credentials |
endpoint | java.lang.String | The name of the endpoint. |
expectGzippedResponse | boolean | If true, the accept-encoding http header will be set to gzip and the response will be un-gzipped. |
gzipRequest | boolean | If true, the request content will be gzipped and sent over the wire. The content-encoding http header will also be set to gzip. |
interfaceName | javax.xml.namespace.QName | The qualified name of the interface exposed by the endpoint. |
locationURI | java.lang.String | the URI to which the endpoint sends requests |
marshaler | org.apache.servicemix.http.endpoints.HttpProviderMarshaler | the bean used to marshal HTTP messages. The default is a |
policies | (org.apache.servicemix.soap.api.Policy)\* | a list of interceptors that will process messages |
principal | java.lang.String | The authentication principal |
providerExpirationTime | int | the number of milliseconds to wait for a response before expiring. |
proxyHost | java.lang.String | the host name of the HTTP proxy |
proxyPassword | java.lang.String | the password for the HTTP proxy authentication |
proxyPort | int | the host port of the HTTP proxy (defaults to 80) |
proxyUsername | java.lang.String | the user name for the HTTP proxy authentication |
service | javax.xml.namespace.QName | The qualified name of the service the endpoint exposes. |
serviceUnit | org.apache.servicemix.common.ServiceUnit | |
ssl | org.apache.servicemix.http.SslParameters | the SSL parameters |
useJbiWrapper | boolean | Specifies if the JBI wrapper is sent in the body of the message. Default is |
validateWsdl | boolean | Specifies if the WSDL is checked for WSI-BP compliance. Default is <code>true</code> |
wsdl | org.springframework.core.io.Resource | the URL of the WSDL document defining the endpoint's messages |