diff options
Diffstat (limited to '')
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/EmailGatewayImpl.java | 36 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/pom.xml (renamed from sandbox/travelsample/contributions/emailgateway-contribution/pom.xml) | 4 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java) | 5 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/main/resources/EmailGateway.wsdl (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/main/resources/EmailGateway.wsdl) | 0 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/main/resources/META-INF/sca-contribution.xml (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/META-INF/sca-contribution.xml) | 5 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java) | 20 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/client/impl/EmailGatewayClientImpl.java (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/client/EmailGatewayClientImpl.java) | 6 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/test/resources/META-INF/sca-contribution.xml (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/main/resources/META-INF/sca-contribution.xml) | 5 | ||||
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/test/resources/emailgateway.composite (renamed from sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/emailgateway.composite) | 4 |
9 files changed, 23 insertions, 62 deletions
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/EmailGatewayImpl.java b/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/EmailGatewayImpl.java deleted file mode 100644 index 6b950e669b..0000000000 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/EmailGatewayImpl.java +++ /dev/null @@ -1,36 +0,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.
- */
-
-package scatours.emailgateway;
-
-import org.osoa.sca.annotations.Service;
-
-
-/**
- *
- */
-@Service(EmailGateway.class)
-public class EmailGatewayImpl implements EmailGateway {
-
- public String sendEmail(EmailType email) {
- System.out.println("Sending mail to " + email.getTo());
- return "SENT";
- }
-
-}
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/pom.xml b/sandbox/travelsample/contributions/emailgateway/pom.xml index f3ed7db79e..edb7143f7b 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/pom.xml +++ b/sandbox/travelsample/contributions/emailgateway/pom.xml @@ -26,7 +26,7 @@ <!--relativePath>../../pom.xml</relativePath-->
</parent>
<version>1.0-SNAPSHOT</version>
- <artifactId>scatours-emailgateway-contribution</artifactId>
+ <artifactId>scatours-contribution-emailgateway</artifactId>
<name>Apache Tuscany SCA Tours Email Gateway Contribution</name>
<dependencies>
@@ -118,7 +118,7 @@ <goal>wsimport</goal>
</goals>
<configuration>
- <packageName>scatours.emailgateway</packageName>
+ <packageName>com.tuscanyscatours.emailgateway</packageName>
<wsdlDirectory>${basedir}/src/main/resources
</wsdlDirectory>
<wsdlFiles>
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java b/sandbox/travelsample/contributions/emailgateway/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java index 6b950e669b..3f561bfe70 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java +++ b/sandbox/travelsample/contributions/emailgateway/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java @@ -17,11 +17,12 @@ * under the License.
*/
-package scatours.emailgateway;
+package com.tuscanyscatours.emailgateway.impl;
+import com.tuscanyscatours.emailgateway.EmailGateway;
+import com.tuscanyscatours.emailgateway.EmailType;
import org.osoa.sca.annotations.Service;
-
/**
*
*/
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/main/resources/EmailGateway.wsdl b/sandbox/travelsample/contributions/emailgateway/src/main/resources/EmailGateway.wsdl index 44867f794c..44867f794c 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/main/resources/EmailGateway.wsdl +++ b/sandbox/travelsample/contributions/emailgateway/src/main/resources/EmailGateway.wsdl diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/META-INF/sca-contribution.xml b/sandbox/travelsample/contributions/emailgateway/src/main/resources/META-INF/sca-contribution.xml index b963b082cb..6c14befa9d 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/META-INF/sca-contribution.xml +++ b/sandbox/travelsample/contributions/emailgateway/src/main/resources/META-INF/sca-contribution.xml @@ -18,5 +18,6 @@ * under the License.
-->
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0">
- <import.java package="scatours.emailgateway"/>
-</contribution>
\ No newline at end of file + <export.java package="com.tuscanyscatours.emailgateway" />
+ <export.java package="com.tuscanyscatours.emailgateway.impl" />
+</contribution>
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java b/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java index bb3bd4db40..9d16b30cab 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java +++ b/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java @@ -19,7 +19,11 @@ package scatours.emailgateway;
+import com.tuscanyscatours.emailgateway.EmailGateway;
+import com.tuscanyscatours.emailgateway.EmailType;
+import com.tuscanyscatours.emailgateway.ObjectFactory;
import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
import org.junit.AfterClass;
@@ -38,7 +42,9 @@ public class EmailGatewayTestCase { @BeforeClass
public static void setUpBeforeClass() throws Exception {
SCANodeFactory factory = SCANodeFactory.newInstance();
- node = factory.createSCANodeFromClassLoader("emailgateway.composite", EmailGateway.class.getClassLoader());
+ node = factory.createSCANode("emailgateway.composite",
+ new SCAContribution("emailgateway", "./target/classes"),
+ new SCAContribution("emailgateway-test", "./target/test-classes"));
node.start();
}
@@ -54,18 +60,6 @@ public class EmailGatewayTestCase { System.out.println(cc.sendEmail(email));
}
- @Test
- //@Ignore
- public void testWaitForInput() {
- System.out.println("Press a key to end");
- /* try {
- System.in.read();
- } catch (Exception ex) {
- }
- System.out.println("Shutting down");
-*/
- }
-
/**
* @throws java.lang.Exception
*/
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/client/EmailGatewayClientImpl.java b/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/client/impl/EmailGatewayClientImpl.java index 96f2d52c0d..10d4984665 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/client/EmailGatewayClientImpl.java +++ b/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/client/impl/EmailGatewayClientImpl.java @@ -17,13 +17,13 @@ * under the License.
*/
-package scatours.emailgateway.client;
+package scatours.emailgateway.client.impl;
import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Service;
-import scatours.emailgateway.EmailGateway;
-import scatours.emailgateway.EmailType;
+import com.tuscanyscatours.emailgateway.EmailGateway;
+import com.tuscanyscatours.emailgateway.EmailType;
/**
*
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/main/resources/META-INF/sca-contribution.xml b/sandbox/travelsample/contributions/emailgateway/src/test/resources/META-INF/sca-contribution.xml index 5057591679..47a544538e 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/main/resources/META-INF/sca-contribution.xml +++ b/sandbox/travelsample/contributions/emailgateway/src/test/resources/META-INF/sca-contribution.xml @@ -18,5 +18,6 @@ * under the License.
-->
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0">
- <export.java package="scatours.emailgateway"/>
-</contribution>
\ No newline at end of file + <import.java package="com.tuscanyscatours.emailgateway" />
+ <import.java package="com.tuscanyscatours.emailgateway.impl" />
+</contribution>
diff --git a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/emailgateway.composite b/sandbox/travelsample/contributions/emailgateway/src/test/resources/emailgateway.composite index 9cd794dad8..f2ed1f345c 100644 --- a/sandbox/travelsample/contributions/emailgateway-contribution/src/test/resources/emailgateway.composite +++ b/sandbox/travelsample/contributions/emailgateway/src/test/resources/emailgateway.composite @@ -23,13 +23,13 @@ targetNamespace="http://creditcard"
name="emailgateway">
<component name="EmailGatewayClient">
- <implementation.java class="scatours.emailgateway.client.EmailGatewayClientImpl" />
+ <implementation.java class="scatours.emailgateway.client.impl.EmailGatewayClientImpl" />
<reference name="emailGateway">
<binding.ws uri="http://localhost:8088/EmailGateway" />
</reference>
</component>
<component name="EmailGateway">
- <implementation.java class="scatours.emailgateway.EmailGatewayImpl" />
+ <implementation.java class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl" />
<service name="EmailGateway">
<binding.ws uri="http://localhost:8088/EmailGateway" />
</service>
|