Tutorials
Java SOAThe servicemix-http components supports the XBean-based deployment. Since the servicemix-http component can be configured in both the consumer and provider roles, we have two sets of configuration parameters for the component. Let us look into the main configuration parameters:
The following table gives the explanation for the main configuration parameters:
| Attribute Name | Type | Description | Mandatory or Not |
| service | QName | Service name of the proxy endpoint | Mandatory |
| endpoint | String | Endpoint name of the proxy endpoint | Mandatory |
| interfaceName | QName | Interface name of the proxy endpoint | Not Mandatory |
| targetService | QName | Service name of the target endpoint | Not Mandatory. Default is the value of the service attribute |
| targetEndpoint | String | Endpoint name of the target endpoint | Not Mandatory. Default is the value of the endpoint attribute |
| role | String | Whether a consumer or a provider | Mandatory. Value should be consumer |
| locationURI | URI | Http URL where this proxy endpoint will be exposed so that the ESB clients can access the proxy service. | Mandatory |
| defaultMEP | URI | The MEP URI by which clients interact with the consumer component | Not Mandatory |
| soap | boolean | If it is true, the component will parse the SOAP envelope and pass the contents to the NMR | Not Mandatory. Default value is false. |
| wsdlResource | Spring Resource | If it is set, the WSDL will be retrieved from this configured Spring resource. | Not Mandatory |
Thus, the locationURI attribute in the servicemix-http consumer refers to the Http URL where this proxy endpoint is exposed, so that the ESB clients can access the proxy service. Later we will look at how to generate static client stubs out of this proxy URI.
Now, while configuring the provider component you need to ensure that the service (IHelloWebService) and the endpoint (HelloWebService) match the service name and port elements of the WSDL that you use to correctly return the WSDL for the endpoint. Moreover, the service name will use the targetNamespace for the WSDL (http://AxisEndToEnd.axis.apache.binildas.com).
A sample servicemix-http provider component configuration is shown as follows:
The following table the gives the explanation for the main configuration parameters:
| Attribute Name | Type | Description | Mandatory or Not |
| service | QName | Service name of the exposed endpoint | Mandatory |
| endpoint | String | Endpoint name of the exposed endpoint | Mandatory |
| interfaceName | QName | Interface name of the exposed endpoint | Not Mandatory |
| role | String | Whether a consumer or a provider | Mandatory. Value should be provider |
| locationURI | URI | Http URL of the target service. | Mandatory |
| Attribute Name | Type | Description | Mandatory or Not |
| soap | boolean | If it is true, the component will parse the SOAP envelope and pass the contents to the NMR | Not Mandatory. Default value is false. |
| soapAction | String | The SOAPAction header to be send over HTTP when invoking theweb service | Not Mandatory. Default value is "". |
| wsdlResource | Spring Resource | If it is set, the WSDL will be retrieved from this configured Spring resource. | Not Mandatory |