Ce contenu n'est pas disponible dans la langue sélectionnée.
19.2. Descriptor Configuration Example
Here's an example of what a SwitchYard descriptor looks like:
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:soap="urn:switchyard-component-soap:config:1.0"> <sca:composite name="orders" targetNamespace="urn:switchyard-quickstart-demo:orders:0.1.0"> <sca:service name="OrderService" promote="OrderService"> <soap:binding.soap> <soap:socketAddr>:18001</soap:socketAddr> <soap:wsdl>wsdl/OrderService.wsdl</soap:wsdl> </soap:binding.soap> </sca:service> <sca:component name="InventoryService"> <bean:implementation.bean class="org.switchyard.quickstarts.demos.orders.InventoryServiceBean"/> <sca:service name="InventoryService"> <sca:interface.java interface="org.switchyard.quickstarts.demos.orders.InventoryService"/> </sca:service> </sca:component> <sca:component name="OrderService"> <bean:implementation.bean class="org.switchyard.quickstarts.demos.orders.OrderServiceBean"/> <sca:service name="OrderService"> <sca:interface.java interface="org.switchyard.quickstarts.demos.orders.OrderService"/> </sca:service> <sca:reference name="InventoryService"> <sca:interface.java interface="org.switchyard.quickstarts.demos.orders.InventoryService"/> </sca:reference> </sca:component> </sca:composite> <transforms xmlns="urn:switchyard-config:transform:1.0"> <transform.java bean="Transformers" from="{urn:switchyard-quickstart-demo:orders:1.0}submitOrder" to="java:org.switchyard.quickstarts.demos.orders.Order"/> <transform.java bean="Transformers" from="java:org.switchyard.quickstarts.demos.orders.OrderAck" to="{urn:switchyard-quickstart-demo:orders:1.0}submitOrderResponse"/> </transforms> <validates> <validate.java bean="Validators" name="java:org.switchyard.quickstarts.demos.orders.Order"/> <validate.java bean="Validators" name="java:org.switchyard.quickstarts.demos.orders.OrderAck"/> </validates> </switchyard>
Note
Do not edit the
SwitchYard.xml
file directly. Red Hat recommends using the JBoss Developer Studio SwitchYard Editor to edit the SwitchYard.xml
file.