You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by lh...@apache.org on 2008/06/14 00:35:09 UTC

svn commit: r667682 - in /servicemix/smx3/trunk/archetypes: ./ servicemix-validation-service-unit/ servicemix-validation-service-unit/src/ servicemix-validation-service-unit/src/main/ servicemix-validation-service-unit/src/main/resources/ servicemix-va...

Author: lhein
Date: Fri Jun 13 15:35:09 2008
New Revision: 667682

URL: http://svn.apache.org/viewvc?rev=667682&view=rev
Log:
- added new archetype for servicemix-validation

Added:
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/pom.xml   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/archetype.xml   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/pom.xml   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/address.xsd   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/schema.xsd   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml   (with props)
Modified:
    servicemix/smx3/trunk/archetypes/pom.xml

Modified: servicemix/smx3/trunk/archetypes/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/pom.xml?rev=667682&r1=667681&r2=667682&view=diff
==============================================================================
--- servicemix/smx3/trunk/archetypes/pom.xml (original)
+++ servicemix/smx3/trunk/archetypes/pom.xml Fri Jun 13 15:35:09 2008
@@ -64,6 +64,7 @@
         <module>servicemix-osworkflow-service-unit</module>
         <module>servicemix-mail-service-unit</module>
         <module>servicemix-scripting-service-unit</module>
+        <module>servicemix-validation-service-unit</module>
         <module>servicemix-archetype-catalog</module>
         <module>servicemix-project-root</module>
         <module>servicemix-archetypes-itests</module>

Added: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/pom.xml?rev=667682&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/pom.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/pom.xml Fri Jun 13 15:35:09 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<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>org.apache.servicemix</groupId>
+    <artifactId>archetypes</artifactId>
+    <version>3.3-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.servicemix.tooling</groupId>
+  <artifactId>servicemix-validation-service-unit</artifactId>
+  <name>ServiceMix :: Archetypes :: ValidationServiceUnit</name>
+
+</project>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/archetype.xml?rev=667682&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/archetype.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/archetype.xml Fri Jun 13 15:35:09 2008
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<archetype>
+  <id>servicemix-su</id>
+  <resources>
+    <resource>src/main/resources/xbean.xml</resource>   
+    <resource>src/main/resources/address.xsd</resource>
+    <resource>src/main/resources/schema.xsd</resource>
+  </resources>
+</archetype>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/META-INF/maven/archetype.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/pom.xml?rev=667682&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/pom.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/pom.xml Fri Jun 13 15:35:09 2008
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<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>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>jbi-service-unit</packaging>
+  <version>${version}</version>
+  <name>A validation service unit</name>
+  <url>http://www.myorganization.org</url>
+  @{repositories}
+  <properties>
+    <servicemix-version>@{servicemix-version}</servicemix-version>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-core</artifactId>
+      <version>${servicemix-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-validation</artifactId>
+      <version>${servicemix-version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.servicemix.tooling</groupId>
+        <artifactId>jbi-maven-plugin</artifactId>
+        <version>${servicemix-version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <type>service-unit</type>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/address.xsd
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/address.xsd?rev=667682&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/address.xsd (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/address.xsd Fri Jun 13 15:35:09 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+  <xsd:complexType name="USAddress">
+    <xsd:sequence>
+      <xsd:element name="name" type="xsd:string"/>
+      <xsd:element name="street" type="xsd:string"/>
+      <xsd:element name="city" type="xsd:string"/>
+      <xsd:element name="state" type="xsd:string"/>
+      <xsd:element name="zip" type="xsd:decimal"/>
+    </xsd:sequence>
+    <xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/>
+  </xsd:complexType>
+
+</xsd:schema>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/address.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/schema.xsd
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/schema.xsd?rev=667682&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/schema.xsd (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/schema.xsd Fri Jun 13 15:35:09 2008
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+  <xsd:annotation>
+    <xsd:documentation xml:lang="en">
+     Purchase order schema for Example.com.
+     Copyright 2000 Example.com. All rights reserved.
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:include schemaLocation="address.xsd"/>
+
+  <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
+
+  <xsd:element name="comment" type="xsd:string"/>
+
+  <xsd:complexType name="PurchaseOrderType">
+    <xsd:sequence>
+      <xsd:element name="shipTo" type="USAddress"/>
+      <xsd:element name="billTo" type="USAddress"/>
+      <xsd:element ref="comment" minOccurs="0"/>
+      <xsd:element name="items" type="Items"/>
+    </xsd:sequence>
+    <xsd:attribute name="orderDate" type="xsd:date"/>
+  </xsd:complexType>
+
+  <xsd:complexType name="Items">
+    <xsd:sequence>
+      <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="productName" type="xsd:string"/>
+            <xsd:element name="quantity">
+              <xsd:simpleType>
+                <xsd:restriction base="xsd:positiveInteger">
+                  <xsd:maxExclusive value="100"/>
+                </xsd:restriction>
+              </xsd:simpleType>
+            </xsd:element>
+            <xsd:element name="USPrice" type="xsd:decimal"/>
+            <xsd:element ref="comment" minOccurs="0"/>
+            <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
+          </xsd:sequence>
+          <xsd:attribute name="partNum" type="SKU" use="required"/>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <!-- Stock Keeping Unit, a code for identifying products -->
+  <xsd:simpleType name="SKU">
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="\d{3}-[A-Z]{2}"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+</xsd:schema>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/schema.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml?rev=667682&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml Fri Jun 13 15:35:09 2008
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<beans xmlns:validation="http://servicemix.apache.org/validation/1.0"
+       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
+       xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://servicemix.apache.org/validation/1.0 http://servicemix.apache.org/schema/servicemix-validation-@{servicemix-version}.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" >
+       
+	<validation:endpoint service="replaceMe:service" 
+    					 endpoint="endpoint" 
+            			 schemaResource="classpath:schema.xsd"
+            			 handlingErrorMethod="FAULT_FLOW"/>
+            							 
+	<validation:endpoint service="replaceMe:service2" 
+    					 endpoint="endpoint" 
+    					 schemaResource="classpath:schema.xsd"
+    					 handlingErrorMethod="FAULT_JBI"/>
+            							 
+	<validation:endpoint service="replaceMe:service3" 
+    					 endpoint="endpoint" 
+    					 schemaResource="classpath:schema.xsd"
+    					 handlingErrorMethod="FAULT_FLOW">
+            							 
+		<property name="errorHandlerFactory">
+			<bean class="org.apache.servicemix.validation.handler.MessageAggregatingErrorHandlerFactory">
+      			<property name="rootPath" value="Fault/payload/messages"/>
+    			<property name="namespace" value="http://www.servicemix.org/fault"/>
+    			<property name="includeStackTraces" value="false"/>
+			</bean>
+		</property>
+    					
+	</validation:endpoint> 
+
+</beans>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-validation-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain