Feature
The SOAP component is a Binding Component (BC) which enables to interact with external Web Services and to expose JBI services as Web Services.
In provider role, when a JBI MessageExchange is sent to a ServiceEndpoint (mapped to a Web Service), it is transformed into a SOAP message and sent to the linked external Web Service. In consumer role, when a SOAP message is received on an exposed Web Service, transformed into a JBI MessageExchange and sent to the corresponding JBI ServiceEndpoint.
The SOAP component is based on Apache Axis2 v1.4.1 (http://ws.apache.org/axis2/) and Mortbay Jetty v6.1.9 (http://jetty.codehaus.org/jetty/). It provides the following features :
- Expose JBI Services as Web Services
- Expose Web Services as JBI Services
- Handle SOAP attachments. The attachments of the incoming SOAP message are placed into the JBI message as attachments; the JBI attachments are placed in the outgoing SOAP message as attachments.
| All attachment are processed by using XOP rules.(XML-binary Optimized Packaging : http://www.w3.org/TR/xop10/ ) |
Exposing an external Web Service as a JBI service endpoint
In provide mode, the component exposes an external Web Service in the JBI environment to send SOAP requests to the external Web Service.
Usage
Configuration
| Parameter | Description |
Default |
Required |
|---|---|---|---|
| provides | Describe the JBI service that will be exposed into the JBI bus. Interface (QName), Service (QName) and Endpoint (String) attributes are required. | - | Yes |
Service Unit attributes to provide services
| Attribute | Description | Default value | Required | ||
|---|---|---|---|---|---|
| soap-version | The SOAP version used to create SOAP messages. Possible values are 1.1 and 1.2. |
1.1
|
Yes
|
||
| address | Address of the external Web Service to send JBI messages to. | Yes
|
|||
| chunked-mode | Activate the HTTP chunked mode on Web Service calls. Possible values are: true, false. |
false
|
Yes
|
||
| synchronous-timeout | The timeout value when invoking a a service in the JBI bus.
|
No
|
|||
| cleanup-transport | Cleanup the transport after the call of the external Web Service. Not cleaning up the transport can cause timeouts on large number of calls. Possible values are: true, false. |
true
|
Yes
|
||
| mode | The mode to be used to send SOAP message to the specified address. Possible values are: SOAP for basic Web Service calls, JSON for JSON service calls and REST for REST service calls. |
SOAP
|
Yes
|
||
| enable-compatibility-for | Enables the compatibility with a specified Web Service stack. Possible values are: AXIS1 for Axis 1 Web Service stack. |
No
|
|||
| proxy-host | The proxy host name. If it is not set, the proxy mode will be disabled and all others proxy parameters are ignored. |
No
|
|||
| proxy-port | The proxy host port. | No
|
|||
| proxy-user | The proxy user. | No
|
|||
| proxy-password | The proxy password. | No
|
|||
| proxy-domain | The proxy domain. | No
|
|||
| rest-http-method | The HTTP method to be used in REST mode. Possible values are: GET for the HTTP method GET, POST for the HTTP method POST, PUT for the HTTP method PUT and DELETE for the HTTP method DELETE |
No
|
|||
| wsa-to | Default address of the external Web Service to send JBI messages to. |
No
|
|||
| wsa-replyto | Address of an external Web Service to add to the WSA header wsa:ReplyTo. | No
|
|||
| wsa-from | Address of an external Web Service to add to the WSA header wsa:From. | No
|
|||
| wsa-faultto | Address of an external Web Service to add to the WSA header wsa:FaultTo. | No
|
|||
| headers-filter | A value used to filter Normalized Message properties to be added to the outgoing SOAP message. All the normalized message properties which are org.w3c.dom.DocumentFragment instances. These values can be filtered at the Service Unit level with the headers-filter property. If the headers-filter property is set to 'org.ow2.petals.foo., org.ow2.petals.soap.bar', all the DocumentFragment properties which are starting with 'org.ow2.petals.soap.foo.' and with 'org.ow2.petals.soap.bar' will be added to the outgoing SOAP Header (as children). | No
|
|||
| inject-headers | Inject some additional headers to the outgoing SOAP message. All the elements of the org.w3c.dom.DocumentFragment Map which is available in the javax.jbi.messaging.protocol.headers message properties will be added if the Service Unit level property inject-headers is set to true. | No
|
|||
| headers-to-inject | Set of XML headers (CDATA) to be injected into the outgoing SOAP message (in SOAP Headers). | No
|
Service Unit descriptor
The service unit is configurable via its extensions in the jbi.xml file:
Service Unit content
The Service Unit has to contain the following elements, packaged in an archive:
- The META-INF/jbi.xml descriptor file, has described above,
- An optional imported WSDL file describing the partner service
Exposing an internal JBI service endpoint as a Web Service
In consumer mode, the component exposes an internal JBI service outside the bus to transfer incoming SOAP requests to the internal service.
Usage
Configuration
| Parameter | Description | Default | Required |
|---|---|---|---|
| consumes | Refer JBI service to invoke into the JBI bus. You can define an explicit endpoint: interface (QName) / Service (QName) / Endpoint (String) attributes. Or define implicit endpoint, to let the container routing according to QOS configurations (HA...): -by Interface attribute (QName) -by Service attribute (QName) |
- | Yes |
| Parameter | Description | Default | Required |
|---|---|---|---|
| mep | Message exchange pattern abbreviation. This parameter can be used in conjunction with the method of the CDK Listeners: createMessageExchange(Extensions extensions). This method returns a CDK Exchange corresponding to the type of the specified pattern. |
- | Yes |
| operation | Operation to call on a service. This parameter can be used in conjunction with the sending methods of the Listeners. If no operation is specified in the Message Exchange to send, this parameter will be used. | - | No |
| timeout | Timeout in milliseconds of a synchronous send. This parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout. | 30000 | No |
Service Unit attributes to consume services
| Attribute | Description | Default value | Required | |
|---|---|---|---|---|
| service-name | No
|
|||
| soap-action | No
|
|||
| synchronous-timeout | No
|
|||
| mode | SOAP
|
Yes
|
||
| enable-compatibility-for | Enables the compatibility with a specified Web Service stack. Possible values are: AXIS1 for Axis 1 Web Service stack. |
No
|
||
| enable-http-transport | true
|
No
|
||
| enable-jms-transport | false
|
No
|
||
| http-services-redirection | No
|
|||
| service-parameters | No
|
|||
| modules | No
|
|||
| address | No
|
|||
| rest-add-namespace-uri | No
|
|||
| rest-add-namespace-prefix | soapbc
|
No
|
||
| rest-remove-prefix-on-response | No
|
Service Unit descriptor
The service unit is configurable via its extensions in the jbi.xml file:
Service Unit content
The Service Unit has to contain the following elements, packaged in an archive:
- The META-INF/jbi.xml descriptor file, has described above