2 Replies Latest reply on Jul 10, 2012 12:35 PM by dward

    Missing xmlns on generated switchyard.xml

    edevera

      Hello,

       

      We are currently running into a problem when generating the switchyard.xml file using the switchyard-maven-plugin.

       

      Our set up is as follows:

       

      project-model-a: where we have different entities we need to pass as arguments of our interfaces.

      project-model-b: the transformed representations of the entities.

      project-api: the definition of the API, that is the interface of the Switchyard service.

      project-impl: the implementation of the Switchyard service, containing classes with the @Service annotations, the maven-switchyard-plugin and the original switchyard.xml file based on the camel-jms-binding quickstart example.

       

      When we run mvn clean package we get the following switchyard configuration file inside the generated jar file:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <switchyard xmlns="urn:switchyard-config:switchyard:1.0">

          <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="camel-jms-binding" targetNamespace="urn:com:zimory:cloud:connect:central:dataservices:basic:producers:cmdb:1.0.0">

              <service name="iTopDataService" promote="iTopDataService">

                  <camel:binding.camel xmlns:camel="urn:switchyard-component-camel:config:1.0" configURI="jms://CMDBDataServicesQueue?connectionFactory=#ConnectionFactory">

                      <camel:operationSelector operationName="save"/>

                  </camel:binding.camel>

              </service>

              <component name="iTopDataService">

                  <implementation.bean xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" class="com.edevera.CMDBDataServiceImpl"/>

                  <service xmlns="" name="iTopDataService">

                      <interface.java xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" interface="com.edevera.CMDBDataService"/>

                  </service>

              </component>

          </composite>

      </switchyard>

       

      I have bolded out the part that is wrong and that causes the following message when deployed in JBoss7 AS:

       

      WARN  [org.switchyard.config.model.composite.v1.V1CompositeServiceModel] (MSC service thread 1-3) missing component service for component [iTopDataService]

       

      For the same of completeness, I attach here the pom file of the project that produces the switchyard.xml configuration file as well as the tree structure of this project:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <project xmlns="http://maven.apache.org/POM/4.0.0"

               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

          <modelVersion>4.0.0</modelVersion>

       

       

          <parent>

              <groupId>com.edevera</groupId>

              <artifactId>edevera-cloud-basic</artifactId>

              <version>1.0.0-SNAPSHOT</version>

          </parent>

       

       

          <groupId>com.edevera</groupId>

          <artifactId>edevera-impl</artifactId>

          <version>1.0.0-SNAPSHOT</version>

          <description>Implementation of the driver for the interaction with the itop database</description>

          <inceptionYear>2012</inceptionYear>

          <properties>

              <version.switchyard>0.4.0.Final</version.switchyard>

              <version.jms>1.1</version.jms>

              <version.hornetq>2.2.11.Final</version.hornetq>

              <version.netty>3.2.1.Final</version.netty>

              <version.naming>5.0.5.Final</version.naming>

              <version.weld>1.1.0.Final</version.weld>

              <version.slf4j>1.6.1</version.slf4j>

          </properties>

          <dependencyManagement>

              <dependencies>

                  <dependency>

                      <groupId>org.jboss.weld.se</groupId>

                      <artifactId>weld-se-core</artifactId>

                      <version>${version.weld}</version>

                      <exclusions>

                          <exclusion>

                              <groupId>org.slf4j</groupId>

                              <artifactId>slf4j-api</artifactId>

                          </exclusion>

                          <exclusion>

                              <groupId>org.slf4j</groupId>

                              <artifactId>slf4j-ext</artifactId>

                          </exclusion>

                          <exclusion>

                              <groupId>ch.qos.cal10n</groupId>

                              <artifactId>cal10n-api</artifactId>

                          </exclusion>

                      </exclusions>

                      <scope>provided</scope>

                  </dependency>

                  <dependency>

                      <groupId>org.switchyard</groupId>

                      <artifactId>switchyard-api</artifactId>

                      <version>${version.switchyard}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.switchyard</groupId>

                      <artifactId>switchyard-plugin</artifactId>

                      <version>${version.switchyard}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.switchyard.components</groupId>

                      <artifactId>switchyard-component-camel</artifactId>

                      <version>${version.switchyard}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.switchyard.components</groupId>

                      <artifactId>switchyard-component-bean</artifactId>

                      <version>${version.switchyard}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.switchyard</groupId>

                      <artifactId>switchyard-test</artifactId>

                      <version>${version.switchyard}</version>

                  </dependency>

                  <dependency>

                      <groupId>javax.jms</groupId>

                      <artifactId>jms</artifactId>

                      <version>${version.jms}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.hornetq</groupId>

                      <artifactId>hornetq-core</artifactId>

                      <version>${version.hornetq}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.hornetq</groupId>

                      <artifactId>hornetq-core-client</artifactId>

                      <version>${version.hornetq}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.hornetq</groupId>

                      <artifactId>hornetq-jms-client</artifactId>

                      <version>${version.hornetq}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.hornetq</groupId>

                      <artifactId>hornetq-jms</artifactId>

                      <version>${version.hornetq}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.jboss.netty</groupId>

                      <artifactId>netty</artifactId>

                      <version>${version.netty}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.jboss.naming</groupId>

                      <artifactId>jnpserver</artifactId>

                      <version>${version.naming}</version>

                  </dependency>

                  <dependency>

                      <groupId>org.slf4j</groupId>

                      <artifactId>slf4j-api</artifactId>

                      <version>${version.slf4j}</version>

                  </dependency>

              </dependencies>

          </dependencyManagement>

          <dependencies>

              <dependency>

                  <groupId>com.edevera.api</groupId>

                  <artifactId>edevera-api</artifactId>

                  <version>1.0.0-SNAPSHOT</version>

                  <scope>provided</scope>

              </dependency>

              <dependency>

                  <groupId>org.switchyard</groupId>

                  <artifactId>switchyard-api</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.switchyard</groupId>

                  <artifactId>switchyard-plugin</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.switchyard.components</groupId>

                  <artifactId>switchyard-component-camel</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.switchyard.components</groupId>

                  <artifactId>switchyard-component-bean</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.switchyard</groupId>

                  <artifactId>switchyard-test</artifactId>

              </dependency>

              <dependency>

                  <groupId>javax.jms</groupId>

                  <artifactId>jms</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.hornetq</groupId>

                  <artifactId>hornetq-core-client</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.hornetq</groupId>

                  <artifactId>hornetq-core</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.hornetq</groupId>

                  <artifactId>hornetq-jms</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.hornetq</groupId>

                  <artifactId>hornetq-jms-client</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.jboss.netty</groupId>

                  <artifactId>netty</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.jboss.naming</groupId>

                  <artifactId>jnpserver</artifactId>

              </dependency>

              <dependency>

                  <groupId>org.mockito</groupId>

                  <artifactId>mockito-all</artifactId>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.hamcrest</groupId>

                  <artifactId>hamcrest-all</artifactId>

                  <scope>test</scope>

              </dependency>

          </dependencies>

          <build>

              <plugins>

                  <plugin>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <configuration>

                          <source>1.6</source>

                          <target>1.6</target>

                      </configuration>

                  </plugin>

       

       

                  <plugin>

                    <groupId>org.codehaus.mojo</groupId>

                    <artifactId>exec-maven-plugin</artifactId>

                    <configuration>

                        <executable>java</executable>

                        <classpathScope>test</classpathScope>

                        <mainClass>edevera.impl.HornetQClient</mainClass>

                    </configuration>

                  </plugin>

                   <plugin>

                       <groupId>org.switchyard</groupId>

                       <artifactId>switchyard-plugin</artifactId>

                       <version>${version.switchyard}</version>

                       <executions>

                           <execution>

                               <goals>

                                   <goal>configure</goal>

                               </goals>

                               <configuration>

                                   <scannerClassNames>

                                       <param>org.switchyard.component.bean.config.model.BeanSwitchYardScanner</param>

                                       <param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>

                                   </scannerClassNames>

                               </configuration>

                           </execution>

                       </executions>

                   </plugin>

                  <plugin>

                      <groupId>org.jboss.as.plugins</groupId>

                      <artifactId>jboss-as-maven-plugin</artifactId>

                      <version>7.1.0.Final</version>

                      <configuration>

                          <hostname>localhost</hostname>

                          <port>9999</port>

                          <filename>${project.build.finalName}.jar</filename>

                      </configuration>

                  </plugin>

                  <plugin>

                      <artifactId>maven-jar-plugin</artifactId>

                      <configuration>

                          <archive>

                              <manifestEntries>

                                  <Dependencies>

                                      org.jboss.as.naming,

                                      org.hornetq,

                                      deployment.edevera-a-1.0.0-SNAPSHOT.jar,

                                      deployment.edevera-b-1.0.0-SNAPSHOT.jar,

                                      deployment.edevera-c-1.0.0-SNAPSHOT.jar,

                                      deployment.edevera-api-1.0.0-SNAPSHOT.jar

                                  </Dependencies>

                              </manifestEntries>

                          </archive>

                      </configuration>

                  </plugin>

              </plugins>

          </build>

      </project>

       

      And the tree structure of the project is:

       

      ├── pom.xml

      ├── src

      │   ├── main

      │   │   ├── java

      │   │   │   └── com

      │   │   │       └── edevera

      │   │   │           └── a

      │   │   │               └── b

      │   │   │                   └── c

      │   │   │                       └── d

      │   │   │                           └── e

      │   │   │                               └── f

      │   │   │                                   └── g

      │   │   │                                       └── h

      │   │   │                                           ├── dao

      │   │   │                                           │   ├── AbstractGenericDao.java

      │   │   │                                           │   ├── HostDaoImpl.java

      │   │   │                                           │   └── VirtualMachineDaoImpl.java

      │   │   │                                           ├── services

      │   │   │                                           │   └── CMDBDataServiceImpl.java

      │   │   │                                           └── transformers

      │   │   │                                               ├── HostToCmdbHostBean.java

      │   │   │                                               └── VmToCmdbVmBean.java

      │   │   └── resources

      │   │       ├── META-INF

      │   │       │   ├── beans.xml

      │   │       │   ├── corrected_generated_switchyard.xml

      │   │       │   ├── forge.xml

      │   │       │   └── switchyard.xml

      │   │       └── itop_init.mysql

      │   └── test

      │       ├── java

      │       │   └── com

      │       │       └── edevera

      │       │           └── a

      │       │               └── b

      │       │                   └── c

      │       │                       └── d

      │       │                           └── e

      │       │                               └── f

      │       │                                   └── g

      │       │                                       └── impl

      │       │                                           ├── CamelJMSBindingTestIT.java

      │       │                                           └── HornetQClient.java

      │       └── resources

      │           ├── camel-jms-binding-hornetq-jms.xml

      │           ├── hornetq-configuration.xml

      │           ├── hornetq-jms.xml

      │           ├── log4j.xml

      │           └── test.txt

      └── edevera-impl.iml

       

      Does anybody know why I am running into such a problem? Thanks in advance!