Thanks for answer but i have this error again.
I added binding sca like you wrote i both switchyard.xml
hellosy: switchyard.xml
<?xml version="1.0" encoding="UTF-8"?>
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:sy="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="hellosy" targetNamespace="urn:com.example.hellosy:hellosy:1.0.0-SNAPSHOT">
<sca:composite name="hellosy" targetNamespace="urn:com.example.hellosy:hellosy:1.0.0-SNAPSHOT">
<sca:component name="InternalTestServiceBean">
<bean:implementation.bean class="com.example.hellosy.InternalTestServiceBean"/>
<sca:service name="InternalTestService">
<sca:interface.java interface="com.example.hellosy.InternalTestService"/>
</sca:service>
<sca:reference name="ExternalTestService">
<sca:interface.java interface="com.example.switchyard.switchyard_example.ExternalTestService"/>
</sca:reference>
</sca:component>
<sca:service name="InternalTestService" promote="InternalTestServiceBean/InternalTestService">
<sca:interface.java interface="com.example.hellosy.InternalTestService"/>
</sca:service>
<sca:reference name="ExternalTestService" multiplicity="0..1" promote="InternalTestServiceBean/ExternalTestService">
<sca:interface.java interface="com.example.switchyard.switchyard_example.ExternalTestService"/>
<sca:binding.sca sy:targetNamespace="urn:com.example.switchyard:switchyard-example:1.0"/>
</sca:reference>
</sca:composite>
</switchyard>
sy-example: switchyard.xml
<?xml version="1.0" encoding="UTF-8"?>
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="switchyard-example" targetNamespace="urn:com.example.switchyard:switchyard-example:1.0">
<sca:composite name="switchyard-example" targetNamespace="urn:com.example.switchyard:switchyard-example:1.0">
<sca:component name="ExternalTestServiceBean">
<bean:implementation.bean class="com.example.switchyard.switchyard_example.ExternalTestServiceBean"/>
<sca:service name="ExternalTestService">
<sca:interface.java interface="com.example.switchyard.switchyard_example.ExternalTestService"/>
</sca:service>
</sca:component>
<sca:service name="ExternalTestService" promote="ExternalTestServiceBean/ExternalTestService">
<sca:interface.java interface="com.example.switchyard.switchyard_example.ExternalTestService"/>
<sca:binding.sca/>
</sca:service>
</sca:composite>
</switchyard>
error:
14:14:52,212 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "hellosy.war"
14:14:52,212 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "switchyard-example.jar"
14:14:52,552 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment switchyard-example.jar
14:14:52,555 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment hellosy.war
14:14:52,581 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) JBAS016005: Starting Services for CDI deployment: switchyard-example.jar
14:14:52,600 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: hellosy.war
14:14:52,601 INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900 1.1.10 (Final)
14:14:52,615 INFO [org.switchyard] (MSC service thread 1-8) Deploying SwitchYard application 'switchyard-example.jar'
14:14:52,622 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016008: Starting weld service for deployment switchyard-example.jar
14:14:52,634 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment hellosy.war
14:14:52,807 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."hellosy.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."hellosy.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ExternalTestService] with qualifiers [@Default] at injection point [[field] @Inject com.example.hellosy.InternalTestServiceBean.extTestService]
at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ExternalTestService] with qualifiers [@Default] at injection point [[field] @Inject com.example.hellosy.InternalTestServiceBean.extTestService]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
... 5 more
14:14:52,819 INFO [org.switchyard] (MSC service thread 1-7) Starting SwitchYard service
14:14:52,963 INFO [org.apache.camel.management.ManagementStrategyFactory] (MSC service thread 1-7) JMX enabled.
14:14:52,974 INFO [org.switchyard.security.SecurityProvider] (MSC service thread 1-7) Using SecurityProvider implementation: org.switchyard.security.jboss.JBossJaasSecurityProvider
14:14:52,975 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-7) Apache Camel 0.8.0.Final (CamelContext: camel-1) is starting
14:14:52,976 INFO [org.apache.camel.management.DefaultManagementLifecycleStrategy] (MSC service thread 1-7) StatisticsLevel at All so enabling load performance statistics
14:14:53,049 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-7) Loaded 179 type converters
14:14:53,068 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-7) Total 0 routes, of which 0 is started.
14:14:53,069 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-7) Apache Camel 0.8.0.Final (CamelContext: camel-1) started in 0.093 seconds
14:14:53,076 INFO [org.switchyard.component.sca.deploy.SCAActivator] (MSC service thread 1-7) Unable to resolve cache-container cluster. clustering for <binding.sca> will not be available for services and references.
14:14:53,172 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-7) Loaded 179 type converters
14:14:53,563 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-7) Route: direct:{urn:com.example.switchyard:switchyard-example:1.0}ExternalTestService started and consuming from: Endpoint[direct://%7Burn:com.example.switchyard:switchyard-example:1.0%7DExternalTestService]
14:14:53,659 INFO [org.switchyard.as7.extension.cluster.RemoteEndpointListener] (MSC service thread 1-7) Published Remote Service Endpoint /switchyard-remote
14:14:53,662 INFO [org.jboss.as] (MSC service thread 1-7) JBAS015951: Admin console listening on http://127.0.0.1:9990
14:14:53,663 ERROR [org.jboss.as] (MSC service thread 1-7) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 3375ms - Started 230 of 324 services (20 services failed or missing dependencies, 71 services are passive or on-demand)
14:14:53,865 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "hellosy.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"hellosy.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"hellosy.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ExternalTestService] with qualifiers [@Default] at injection point [[field] @Inject com.example.hellosy.InternalTestServiceBean.extTestService]"}}
14:14:53,867 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "switchyard-example.jar" was rolled back with no failure message
14:14:53,875 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Apache Camel 0.8.0.Final (CamelContext: camel-1) is shutting down
14:14:53,876 INFO [org.apache.camel.impl.DefaultShutdownStrategy] (MSC service thread 1-1) Starting to graceful shutdown 1 routes (timeout 300 seconds)
14:14:53,878 INFO [org.apache.camel.impl.DefaultShutdownStrategy] (Camel (camel-1) thread #1 - ShutdownTask) Route: direct:{urn:com.example.switchyard:switchyard-example:1.0}ExternalTestService shutdown complete, was consuming from: Endpoint[direct://%7Burn:com.example.switchyard:switchyard-example:1.0%7DExternalTestService]
14:14:53,879 INFO [org.apache.camel.impl.DefaultShutdownStrategy] (MSC service thread 1-1) Graceful shutdown of 1 routes completed in 0 seconds
14:14:53,880 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment hellosy.war in 15ms
14:14:53,883 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-1) TypeConverterRegistry utilization[attempts=0, hits=0, misses=0, failures=0] mappings[total=179, misses=0]
14:14:53,885 INFO [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-1) Apache Camel 0.8.0.Final (CamelContext: camel-1) is shutdown in 0.010 seconds. Uptime 0.910 seconds.
14:14:53,886 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016009: Stopping weld service for deployment switchyard-example.jar
14:14:53,893 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment switchyard-example.jar in 24ms
14:14:53,894 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."hellosy.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."hellosy.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ExternalTestService] with qualifiers [@Default] at injection point [[field] @Inject com.example.hellosy.InternalTestServiceBean.extTestService]
14:14:53,896 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was rolled back
14:14:53,897 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"hellosy.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"hellosy.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ExternalTestService] with qualifiers [@Default] at injection point [[field] @Inject com.example.hellosy.InternalTestServiceBean.extTestService]"}}}}
I have also dependency in hellosy pom.xml to switchyard-example to share this interface - just like you wrote in point 3)
hellosy pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.hellosy</groupId>
<artifactId>hellosy</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<switchyard.version>1.0.0.Final</switchyard.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.2.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>4.3.3.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<version>4.3.3.Final</version>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<version>4.3.3.Final</version>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-api</artifactId>
<version>${switchyard.version}</version>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-transform</artifactId>
<version>${switchyard.version}</version>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-validate</artifactId>
<version>${switchyard.version}</version>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-plugin</artifactId>
<version>${switchyard.version}</version>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-test</artifactId>
<version>${switchyard.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.switchyard.components</groupId>
<artifactId>switchyard-component-test-mixin-cdi</artifactId>
<version>${switchyard.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.switchyard.components</groupId>
<artifactId>switchyard-component-bean</artifactId>
<version>${switchyard.version}</version>
</dependency>
<dependency>
<groupId>com.example.switchyard</groupId>
<artifactId>switchyard-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.switchyard.components</groupId>
<artifactId>switchyard-component-sca</artifactId>
<version>${switchyard.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>JBOSS_NEXUS</id>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository</id>
<name>JBoss Public Maven Repository</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>hellosy</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<packagingExcludes>
<!-- -->
WEB-INF/lib/*.jar,
WEB-INF/classes/META-INF/switchyard.xml,
</packagingExcludes>
<webResources>
<resource>
<directory>target/classes/META-INF</directory>
<targetPath>WEB-INF</targetPath>
<includes>
<include>switchyard.xml</include>
</includes>
</resource>
</webResources>
<archive>
<manifestEntries>
<Dependencies>deployment.switchyard-example.jar</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-plugin</artifactId>
<version>${switchyard.version}</version>
<executions>
<execution>
<goals>
<goal>configure</goal>
</goals>
</execution>
</executions>
<configuration>
<scannerClassNames>
<param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>
</scannerClassNames>
</configuration>
</plugin>
</plugins>
</build>
</project>
Please look at this when you can. Maybe i missed something more.