|
Page Edited :
SM :
servicemix-cxf-bc
servicemix-cxf-bc has been edited by Guillaume Nodet (Jan 21, 2008). Content:servicemix-cxf-bcServiceMix ships with a JBI compliant HTTP/SOAP binding component named servicemix-cxf-bc which use apache cxf Here are the main features:
InstallationInstalling the servicemix-cxf-bc component can be done in several ways:
Note that when using ant tasks, the component is not started, you will have to start it manually using ant tasks or a console. XBean deploymentYou can deploy Service Units containing a file named xbean.xml for activating consumer and provider endpoints. <beans xmlns:http="http://servicemix.apache.org/cxfbc/1.0"> ... </beans> Any numbers of endpoints can be specified in the xbean.xml file.
The targetService, targetEndpoint and targetInterfaceName attributes can be used to specify the routing method to use (routing by interface, service or endpoint) and is also useful to allow several proxy endpoints to be created for the same JBI endpoint.
Provider endpointA provider endpoint is a client-side jbi endpoint which can receive requests from the NMR and send them to a given url where the service is provided. Here is an example of an http provider endpoint: <cxfbc:provider wsdl="/wsdl/calculator.wsdl" locationURI="http://localhost:9001/bridgetest" service="calculator:CalculatorService" endpoint="CalculatorPortProxy" interfaceName="calculator:CalculatorPortType" > </cxfbc:provider>
It is important to note that you need to include the classpath element in your xbean.xml if you are deploying the Cxf Provider in a service unit so that the wsdl can correctly find the classpath element. Also you need to ensure that the service name and endpoint match the service and port elements of the WSDL that you wish to use to correctly return WSDL for the endpoint, remembering that the service name will use the targetNamespace for the WSDL. Lightweight modeThe servicemix-cxf-bc component can also be configured in a spring/xbean configuration file, for use in an embedded ServiceMix. <sm:activationSpec> <sm:component> <cxfbc:component> <cxfbc:consumer wsdl="/wsdl/calculator.wsdl" service="calculator:CalculatorService" endpoint="CalculatorPort" targetEndpoint="CalculatorPortProxy" targetService="calculator:CalculatorService" targetInterface="calculator:CalculatorPortType"> </cxfbc:consumer> <cxfbc:provider wsdl="/wsdl/calculator.wsdl" locationURI="http://localhost:9001/bridgetest" service="calculator:CalculatorService" endpoint="CalculatorPortProxy" interfaceName="calculator:CalculatorPortType" > </cxfbc:provider> </cxfbc:component> </sm:component> </sm:activationSpec>
WS-AddressingWhen used on a SOAP consumer endpoint, servicemix-http handles the WS-Adressing Action and To headers. wsa:ActionThe wsa:Action header can be used to specify the target interface name and operation to use for the JBI exchange. The header uses the following syntax: [target namespace][delimiter][interface name][delimiter][operation name]
where:
For example, the following header <wsa:Action>http://example.com/stockquote/StockQuoteInterface/GetLastTradePrice</wsa:Action> will be used to address the JBI exchange with the following properties:
wsa:ToThe wsa:To header specifies the target JBI service name and endpoint name. The header uses the following syntax: [target namespace][delimiter][service name][delimiter][endpoint name] where:
For example, the following header <wsa:To>urn:example:stockquote:StockQuoteService:JBIEndpoint</wsa:To> will be used to address the JBI exchange with the following properties:
WS-PolicyYou can find a WS-Policy test caseMore about Cxf WS-Policy
|
Unsubscribe or edit your notifications preferences
