Author: veithen
Date: Wed Sep 19 10:39:59 2012
New Revision: 1387517

URL: http://svn.apache.org/viewvc?rev=1387517&view=rev
Log:
Moved the integration guide samples to their own Maven module and added a 
couple of tests.

Added:
    axis/axis1/java/trunk/samples/integrationguide-sample/   (with props)
    axis/axis1/java/trunk/samples/integrationguide-sample/pom.xml   (with props)
    axis/axis1/java/trunk/samples/integrationguide-sample/src/
    axis/axis1/java/trunk/samples/integrationguide-sample/src/main/
    axis/axis1/java/trunk/samples/integrationguide-sample/src/main/java/
    axis/axis1/java/trunk/samples/integrationguide-sample/src/main/java/samples/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/main/java/samples/integrationGuide/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/main/java/samples/integrationGuide/example1/
      - copied from r1387504, 
axis/axis1/java/trunk/distribution/src/main/files/samples/integrationGuide/example1/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/main/java/samples/integrationGuide/example2/
      - copied from r1387504, 
axis/axis1/java/trunk/distribution/src/main/files/samples/integrationGuide/example2/
    axis/axis1/java/trunk/samples/integrationguide-sample/src/test/
    axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/
    axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/VerifyFilesTest.java
   (with props)
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/VerifyFilesTest.java
   (with props)
    axis/axis1/java/trunk/samples/integrationguide-sample/src/test/wsdl/
    
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/wsdl/hello.wsdl
Removed:
    
axis/axis1/java/trunk/distribution/src/main/files/samples/integrationGuide/example1/
    
axis/axis1/java/trunk/distribution/src/main/files/samples/integrationGuide/example2/
Modified:
    axis/axis1/java/trunk/distribution/src/main/assembly/bin.xml
    axis/axis1/java/trunk/samples/pom.xml

Modified: axis/axis1/java/trunk/distribution/src/main/assembly/bin.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/distribution/src/main/assembly/bin.xml?rev=1387517&r1=1387516&r2=1387517&view=diff
==============================================================================
--- axis/axis1/java/trunk/distribution/src/main/assembly/bin.xml (original)
+++ axis/axis1/java/trunk/distribution/src/main/assembly/bin.xml Wed Sep 19 
10:39:59 2012
@@ -81,6 +81,10 @@
             <outputDirectory>samples/handler</outputDirectory>
         </fileSet>
         <fileSet>
+            
<directory>../samples/integrationguide-sample/src/main/java</directory>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+        <fileSet>
             <directory>../samples/jaxm-sample/src/main/java</directory>
             <outputDirectory>/</outputDirectory>
         </fileSet>

Propchange: axis/axis1/java/trunk/samples/integrationguide-sample/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep 19 10:39:59 2012
@@ -0,0 +1,4 @@
+.classpath
+.project
+target
+.settings

Added: axis/axis1/java/trunk/samples/integrationguide-sample/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/integrationguide-sample/pom.xml?rev=1387517&view=auto
==============================================================================
--- axis/axis1/java/trunk/samples/integrationguide-sample/pom.xml (added)
+++ axis/axis1/java/trunk/samples/integrationguide-sample/pom.xml Wed Sep 19 
10:39:59 2012
@@ -0,0 +1,84 @@
+<?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.axis</groupId>
+        <artifactId>samples</artifactId>
+        <version>1.4.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>integrationguide-sample</artifactId>
+    <name>Integration Guide Sample</name>
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>1.4</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <!-- We run this in process-test-classes so that we 
can run unit tests that verify the output. -->
+                        <phase>process-test-classes</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target>
+                                <mkdir 
dir="${project.build.directory}/work/example1" />
+                                <!-- Need fork="true" here because WSDL2Java 
calls System.exit -->
+                                <java 
classname="samples.integrationGuide.example1.MyWSDL2Java" fork="true" 
classpathref="maven.test.classpath">
+                                    <arg value="src/test/wsdl/hello.wsdl" />
+                                    <arg value="-o" />
+                                    <arg 
value="${project.build.directory}/work/example1" />
+                                </java>
+                                
+                                <mkdir 
dir="${project.build.directory}/work/example2" />
+                                <java 
classname="samples.integrationGuide.example2.WSDL2Useless" fork="true" 
classpathref="maven.test.classpath">
+                                    <arg value="src/test/wsdl/hello.wsdl" />
+                                    <arg value="-o" />
+                                    <arg 
value="${project.build.directory}/work/example2" />
+                                    <arg value="-s" /> <!-- MyDeployWriter is 
only invoked when generating server side code -->
+                                    <arg value="-g" />
+                                    <arg value="work" />
+                                </java>
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: axis/axis1/java/trunk/samples/integrationguide-sample/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/VerifyFilesTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/VerifyFilesTest.java?rev=1387517&view=auto
==============================================================================
--- 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/VerifyFilesTest.java
 (added)
+++ 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/VerifyFilesTest.java
 Wed Sep 19 10:39:59 2012
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package samples.integrationGuide.example1;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+
+public class VerifyFilesTest extends TestCase {
+    public void testDeployUseless() throws Exception {
+        File file = new File(System.getProperty("basedir", "."), 
"target/work/example1/com/examples/www/wsdl/HelloService_wsdl/Hello_Service.lst");
+        assertTrue(file.exists());
+        assertEquals("Hello_Port", FileUtils.readFileToString(file).trim());
+    }
+}
\ No newline at end of file

Propchange: 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example1/VerifyFilesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/VerifyFilesTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/VerifyFilesTest.java?rev=1387517&view=auto
==============================================================================
--- 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/VerifyFilesTest.java
 (added)
+++ 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/VerifyFilesTest.java
 Wed Sep 19 10:39:59 2012
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package samples.integrationGuide.example2;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+
+public class VerifyFilesTest extends TestCase {
+    public void testDeployUseless() throws Exception {
+        File file = new File(System.getProperty("basedir", "."), 
"target/work/example2/com/examples/www/wsdl/HelloService_wsdl/deploy.useless");
+        assertTrue(file.exists());
+        assertEquals("Hi ho!  Hi ho!  It's off to work we go.", 
FileUtils.readFileToString(file).trim());
+    }
+}
\ No newline at end of file

Propchange: 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/java/samples/integrationGuide/example2/VerifyFilesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/wsdl/hello.wsdl
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/integrationguide-sample/src/test/wsdl/hello.wsdl?rev=1387517&view=auto
==============================================================================
--- 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/wsdl/hello.wsdl 
(added)
+++ 
axis/axis1/java/trunk/samples/integrationguide-sample/src/test/wsdl/hello.wsdl 
Wed Sep 19 10:39:59 2012
@@ -0,0 +1,49 @@
+<definitions name="HelloService"
+   targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl";
+   xmlns="http://schemas.xmlsoap.org/wsdl/";
+   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+   xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl";
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+ 
+   <message name="SayHelloRequest">
+      <part name="firstName" type="xsd:string"/>
+   </message>
+   <message name="SayHelloResponse">
+      <part name="greeting" type="xsd:string"/>
+   </message>
+
+   <portType name="Hello_PortType">
+      <operation name="sayHello">
+         <input message="tns:SayHelloRequest"/>
+         <output message="tns:SayHelloResponse"/>
+      </operation>
+   </portType>
+
+   <binding name="Hello_Binding" type="tns:Hello_PortType">
+   <soap:binding style="rpc"
+      transport="http://schemas.xmlsoap.org/soap/http"/>
+   <operation name="sayHello">
+      <soap:operation soapAction="sayHello"/>
+      <input>
+         <soap:body
+            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
+            namespace="urn:examples:helloservice"
+            use="encoded"/>
+      </input>
+      <output>
+         <soap:body
+            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
+            namespace="urn:examples:helloservice"
+            use="encoded"/>
+      </output>
+   </operation>
+   </binding>
+
+   <service name="Hello_Service">
+      <documentation>WSDL File for HelloService</documentation>
+      <port binding="tns:Hello_Binding" name="Hello_Port">
+         <soap:address
+            location="http://www.examples.com/SayHello/"/>
+      </port>
+   </service>
+</definitions>
\ No newline at end of file

Modified: axis/axis1/java/trunk/samples/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/pom.xml?rev=1387517&r1=1387516&r2=1387517&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/pom.xml (original)
+++ axis/axis1/java/trunk/samples/pom.xml Wed Sep 19 10:39:59 2012
@@ -38,6 +38,7 @@
         <module>encoding-sample</module>
         <module>faults-sample</module>
         <module>handler-sample</module>
+        <module>integrationguide-sample</module>
         <module>jaxm-sample</module>
         <module>jaxrpc-sample</module>
         <module>message-sample</module>


Reply via email to