diff options
289 files changed, 0 insertions, 20230 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/META-INF/MANIFEST.MF b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/META-INF/MANIFEST.MF deleted file mode 100644 index cdf9a9df05..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/META-INF/MANIFEST.MF +++ /dev/null @@ -1,28 +0,0 @@ -Manifest-Version: 1.0
-Private-Package: calculator;version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: SCATours CreditCard Payment
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Eclipse-LazyStart: false
-Bundle-Version: 1.0.0
-Bnd-LastModified: 1223949424781
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA Calculator OSGi Sample
-Import-Package: javax.jws,
- javax.xml.bind,
- javax.xml.bind.annotation,
- javax.xml.namespace,
- javax.xml.ws,
- org.apache.tuscany.sca.node;version="2.0.0",
- org.oasisopen.sca.annotation;version="2.0.0",
- org.osgi.framework;version="1.4",
- scatours.currency,
- scatours.payment.creditcard
-Bundle-SymbolicName: scatours.creditcard.payment
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 -Bundle-Activator: scatours.payment.creditcard.impl.CreditCardPaymentActivator
-Export-Package: scatours.currency,
- scatours.payment.creditcard
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/OSGI-INF/sca/bundle.componentType b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/OSGI-INF/sca/bundle.componentType deleted file mode 100644 index 847213af37..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/OSGI-INF/sca/bundle.componentType +++ /dev/null @@ -1,34 +0,0 @@ -<?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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1">
-
- <!-- The service elment defines an SCA view of the OSGi service -->
- <service name="CreditCardPayment">
- <!-- The interface will be mapped into the OSGi service class -->
- <interface.java interface="scatours.payment.creditcard.CreditCardPayment"/>
- </service>
-
- <!-- The reference elment defines an SCA proxy to a remote OSGi service -->
- <reference name="currencyConverter">
- <interface.java interface="scatours.currency.CurrencyConverter"/>
- </reference>
-
-</componentType>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/OSGI-INF/sca/bundle.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/OSGI-INF/sca/bundle.composite deleted file mode 100644 index 7b12b36368..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/OSGI-INF/sca/bundle.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://creditcard"
- name="CreditCardPaymentComposite">
-
- <component name="CreditCardPaymentComponent">
- <tuscany:implementation.osgi bundleSymbolicName="scatours.creditcard.payment" bundleVersion="1.0.0" />
- <service name="CreditCardPayment">
- <binding.ws uri="http://localhost:8082/CreditCardPayment"/>
- </service>
- <reference name="currencyConverter">
- <tuscany:binding.rmi uri="rmi://localhost:8089/CurrencyConverter"/>
- </reference>
- </component>
-
-<!-- Other components can be declared here too -->
-<!--
- <component name="CurrencyConverterComponent">
- <implementation.java class="scatours.currency.impl.CurrencyConverterImpl" />
- <service name="CurrencyConverter">
- <tuscany:binding.rmi uri="rmi://localhost:8089/CurrencyConverter" />
- </service>
- </component>
--->
-
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/pom.xml deleted file mode 100644 index 074a6004cb..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/pom.xml +++ /dev/null @@ -1,240 +0,0 @@ -<?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>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>scatours-creditcard-payment-dosgi</artifactId>
- <name>SCATours CreditCard Payment OSGi</name>
-
- <repositories>
- <repository>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <id>java.net</id>
- <name>java.net Maven 1.x Repository</name>
- <url>http://download.java.net/maven/1</url>
- <layout>legacy</layout>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-feature-ejava</artifactId>
- <version>2.0-SNAPSHOT</version>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-feature-webservice</artifactId>
- <version>2.0-SNAPSHOT</version>
- <type>pom</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-launcher-equinox</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl-osgi</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.osgi</groupId>
- <artifactId>services</artifactId>
- <version>3.2.0-v20090520-1800</version>
- </dependency>
-
- <dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-rt</artifactId>
- <version>2.1.7</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <!-- Equinox Declarative Services -->
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>ds</artifactId>
- <version>1.1.0-v20090601</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>util</artifactId>
- <version>1.0.100-v20090520-1800</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>javax.xml.ws</groupId>
- <artifactId>jaxws-api</artifactId>
- <version>2.1</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.1</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>2.1.12</version>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-activation_1.1_spec</artifactId>
- <version>1.0.1</version>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.0_spec</artifactId>
- <version>1.0.1</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Djava.endorsed.dirs=target/endorsed</argLine>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.5.1</version>
- <configuration>
- <buildcommands>
- <buildcommand>org.eclipse.pde.ManifestBuilder</buildcommand>
- <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
- </buildcommands>
- <projectnatures>
- <projectnature>org.eclipse.jdt.core.javanature</projectnature>
- <projectnature>org.eclipse.pde.PluginNature</projectnature>
- </projectnatures>
- <classpathContainers>
- <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
- </classpathContainer>
- </classpathContainers>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>${basedir}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>target/jaxws-source</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jaxws-maven-plugin</artifactId>
- <version>1.12</version>
- <executions>
- <execution>
- <id>wsimport</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>wsimport</goal>
- </goals>
- <configuration>
- <packageName>scatours.payment.creditcard</packageName>
- <wsdlDirectory>${basedir}/src/main/resources
- </wsdlDirectory>
- <wsdlFiles>
- <wsdlFile>CreditCardPayment.wsdl</wsdlFile>
- </wsdlFiles>
- <sourceDestDir>${project.build.directory}/jaxws-source
- </sourceDestDir>
- <verbose>false</verbose>
- <xnocompile>true</xnocompile>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/currency/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/currency/CurrencyConverter.java deleted file mode 100644 index 49e1f6a119..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/currency/CurrencyConverter.java +++ /dev/null @@ -1,33 +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.currency;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * The CurrencyConverter service interface
- */
-@Remotable
-public interface CurrencyConverter {
-
- float getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
-
- float convert(String fromCurrencyCode, String toCurrencyCode, float amount);
-
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterImpl.java deleted file mode 100644 index 2a3ffc1a1e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterImpl.java +++ /dev/null @@ -1,55 +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.currency.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.oasisopen.sca.annotation.Service;
-
-import scatours.currency.CurrencyConverter;
-
-/**
- * An implementation of the CurrencyConverter service
- */
-@Service(CurrencyConverter.class)
-public class CurrencyConverterImpl implements CurrencyConverter {
-
- // currency index
- private Map<String, Integer> currencyIndex = new HashMap<String, Integer>();
-
- // exchange rates
- private final float rates[][] = { {1.00f, 0.50f, 0.66f}, {2.00f, 1.00f, 1.33f}, {1.50f, 0.75f, 1.00f}};
-
- public CurrencyConverterImpl() {
- currencyIndex.put("USD", new Integer(0));
- currencyIndex.put("GBP", new Integer(1));
- currencyIndex.put("EUR", new Integer(2));
- }
-
- public float getExchangeRate(String fromCurrencyCode, String toCurrencyCode) {
- return rates[currencyIndex.get(fromCurrencyCode).intValue()][currencyIndex.get(toCurrencyCode).intValue()];
- }
-
- public float convert(String fromCurrencyCode, String toCurrencyCode, float amount) {
- float converted = amount * getExchangeRate(fromCurrencyCode, toCurrencyCode);
- System.out.println(fromCurrencyCode + amount + "=" + toCurrencyCode + converted);
- return converted;
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentActivator.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentActivator.java deleted file mode 100644 index 9c7364d4d5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentActivator.java +++ /dev/null @@ -1,40 +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.payment.creditcard.impl;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-import scatours.payment.creditcard.CreditCardPayment;
-
-/**
- *
- */
-public class CreditCardPaymentActivator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- System.out.println("[" + context.getBundle().getSymbolicName() + "]: Registering CreditCardPayment service...");
- context.registerService(CreditCardPayment.class.getName(), new CreditCardPaymentImpl(context), null);
- }
-
- public void stop(BundleContext context) throws Exception {
- }
-
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java deleted file mode 100644 index d726b85f9f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java +++ /dev/null @@ -1,97 +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.payment.creditcard.impl;
-
-import java.io.StringWriter;
-import java.util.UUID;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.PropertyException;
-import javax.xml.namespace.QName;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-import scatours.currency.CurrencyConverter;
-import scatours.payment.creditcard.CreditCardDetailsType;
-import scatours.payment.creditcard.CreditCardPayment;
-
-public class CreditCardPaymentImpl implements CreditCardPayment {
- private BundleContext context;
-
- public CreditCardPaymentImpl(BundleContext context) {
- super();
- this.context = context;
- }
-
- public String authorize(CreditCardDetailsType creditCard, float amount) {
- float charge = amount;
- if (creditCard != null) {
- try {
- print(creditCard);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- System.out.println("Credit card: name = " + creditCard.getCardOwner().getName()
- + " number = "
- + creditCard.getCreditCardNumber()
- + " for amount "
- + amount
- + " EUR");
- charge = convertCurrency(amount);
- } else {
- System.out.println("Credit card is null");
- return "FAILURE: Invalid Credit Card Number";
- }
-
- return "SUCCESS: Auth Code=" + UUID.randomUUID() + " (EUR" + amount + "->USD" + charge + ")";
- }
-
- private void print(CreditCardDetailsType creditCard) throws JAXBException, PropertyException {
- JAXBContext context = JAXBContext.newInstance(CreditCardDetailsType.class);
- QName name = new QName("http://ns1", "creditCard");
- JAXBElement<Object> element = new JAXBElement<Object>(name, Object.class, creditCard);
- StringWriter writer = new StringWriter();
- Marshaller marshaller = context.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- context.createMarshaller().marshal(element, writer);
- writer.flush();
- System.out.println("[CreditCard]: ");
- System.out.println(writer.toString());
- }
-
- private float convertCurrency(float amount) {
- ServiceReference ref = context.getServiceReference(CurrencyConverter.class.getName());
- if (ref != null) {
- CurrencyConverter converter = (CurrencyConverter)context.getService(ref);
- if (converter != null) {
- amount = converter.convert("EUR", "USD", amount);
- context.ungetService(ref);
- return amount;
- }
- }
- throw new IllegalArgumentException("Currency cannot be converted");
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index d50a63ac42..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,118 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/">
-
- <xsd:element name="authorize">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="authorizeResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8082/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentClient.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentClient.java deleted file mode 100644 index d41571f679..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentClient.java +++ /dev/null @@ -1,54 +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.payment.creditcard.test;
-
-import scatours.payment.creditcard.CreditCardDetailsType;
-import scatours.payment.creditcard.CreditCardPayment;
-import scatours.payment.creditcard.CreditCardPaymentService;
-import scatours.payment.creditcard.CreditCardTypeType;
-import scatours.payment.creditcard.ObjectFactory;
-import scatours.payment.creditcard.PayerType;
-
-/**
- *
- */
-public class CreditCardPaymentClient {
- static String invoke() {
- CreditCardPaymentService service = new CreditCardPaymentService();
- ObjectFactory objectFactory = new ObjectFactory();
- CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
- ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa"));
- ccDetails.setCreditCardNumber("1234-5678-1234-5678");
- ccDetails.setCVV2("123");
- ccDetails.setExpMonth(12);
- ccDetails.setExpYear(2011);
- PayerType ccOwner = objectFactory.createPayerType();
- ccOwner.setName("Fred");
- ccDetails.setCardOwner(ccOwner);
- CreditCardPayment cc = service.getCreditCardPaymentPort();
- String status = cc.authorize(ccDetails, 100.00f);
- System.out.println("Status of the transaction: " + status);
- return status;
- }
-
- public static void main(String[] args) {
- invoke();
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java deleted file mode 100644 index 98c1fced9d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java +++ /dev/null @@ -1,127 +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.payment.creditcard.test;
-
-import static scatours.payment.creditcard.test.OSGiTestUtils.bundleStatus;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-
-import org.apache.tuscany.sca.node.equinox.launcher.EquinoxHost;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-
-/**
- *
- */
-public class CreditCardPaymentOSGiTestCase {
- private static EquinoxHost host;
- private static BundleContext context;
- private static Bundle ccBundle;
-
- /**
- * @throws java.lang.Exception
- */
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- try {
- host = new EquinoxHost();
- context = host.start();
-
- for (Bundle b : context.getBundles()) {
- System.out.println(b);
- if (b.getSymbolicName().equals("org.eclipse.equinox.ds") || b.getSymbolicName()
- .startsWith("org.apache.tuscany.sca.")) {
- try {
- if (b.getHeaders().get(Constants.FRAGMENT_HOST) == null) {
- // Start the non-fragment bundle
- b.start();
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- System.out.println(bundleStatus(b, false));
- }
- if ("scatours.creditcard.payment".equals(b.getSymbolicName())) {
- ccBundle = b;
- }
- }
-
- if (ccBundle != null) {
- ccBundle.start();
- System.out.println(bundleStatus(ccBundle, false));
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- throw e;
- }
- }
-
- @Test
- // @Ignore("Now we use the testClient")
- public void testWS() throws Exception {
- URL url = new URL("http://localhost:8082/CreditCardPayment?wsdl");
- InputStream is = url.openStream();
- Reader reader = new InputStreamReader(is);
- char[] content = new char[10240]; // 10k
- int len = 0;
- while (true) {
- int size = reader.read(content, len, content.length - len);
- if (size < 0) {
- break;
- }
- len += size;
- }
- Assert.assertTrue(len > 0);
- String str = new String(content, 0, len);
- System.out.println(str);
- Assert.assertTrue(str.indexOf("<wsdl:definitions") != -1);
- }
-
- /**
- * Test the Web service exposed by the Calculator
- */
- @Test
- public void testClient() {
- String status = CreditCardPaymentClient.invoke();
- Assert.assertTrue(status.startsWith("SUCCESS"));
- }
-
- /**
- * @throws java.lang.Exception
- */
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- if (host != null) {
- host.stop();
- host = null;
- context = null;
- }
- }
-
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/OSGiTestUtils.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/OSGiTestUtils.java deleted file mode 100644 index de8a77a818..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/OSGiTestUtils.java +++ /dev/null @@ -1,105 +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.payment.creditcard.test;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import org.osgi.framework.Bundle;
-
-/**
- *
- * Utility class to create OSGi bundles
- *
- * @version $Rev: 758877 $ $Date: 2009-03-26 14:51:19 -0700 (Thu, 26 Mar 2009) $
- */
-public class OSGiTestUtils {
- private static class InvocationHandlerImpl implements InvocationHandler {
- private Object instance;
-
- public InvocationHandlerImpl(Object instance) {
- super();
- this.instance = instance;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- Method m = instance.getClass().getMethod(method.getName(), method.getParameterTypes());
- return m.invoke(instance, args);
- }
-
- }
-
- /**
- * Returns a string representation of the given bundle.
- *
- * @param b
- * @param verbose
- * @return
- */
- public static String bundleStatus(Bundle bundle, boolean verbose) {
- StringBuffer sb = new StringBuffer();
- sb.append(bundle.getBundleId()).append(" ").append(bundle.getSymbolicName());
- int s = bundle.getState();
- if ((s & Bundle.UNINSTALLED) != 0) {
- sb.append(" UNINSTALLED");
- }
- if ((s & Bundle.INSTALLED) != 0) {
- sb.append(" INSTALLED");
- }
- if ((s & Bundle.RESOLVED) != 0) {
- sb.append(" RESOLVED");
- }
- if ((s & Bundle.STARTING) != 0) {
- sb.append(" STARTING");
- }
- if ((s & Bundle.STOPPING) != 0) {
- sb.append(" STOPPING");
- }
- if ((s & Bundle.ACTIVE) != 0) {
- sb.append(" ACTIVE");
- }
-
- if (verbose) {
- sb.append(" ").append(bundle.getLocation());
- sb.append(" ").append(bundle.getHeaders());
- }
- return sb.toString();
- }
-
- /**
- * A utility to cast the object to the given interface. If the class for the object
- * is loaded by a different classloader, a proxy will be created.
- *
- * @param <T>
- * @param obj
- * @param cls
- * @return
- */
- public static <T> T cast(Object obj, Class<T> cls) {
- if (cls.isInstance(obj)) {
- return cls.cast(obj);
- } else {
- return cls.cast(Proxy.newProxyInstance(cls.getClassLoader(),
- new Class<?>[] {cls},
- new InvocationHandlerImpl(obj)));
- }
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/pom.xml deleted file mode 100644 index a7fa84ae74..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?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>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>scatours-creditcard-payment-web</artifactId>
- <packaging>war</packaging>
- <name>SCATours Credit Card Payment Web</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
-
- </dependencies>
- <pluginRepositories>
- <pluginRepository>
- <id>java.net2</id>
- <name>java.net Maven 2.x Repository</name>
- <url>http://download.java.net/maven/2</url>
- </pluginRepository>
- </pluginRepositories>
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>target/jaxws-source</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jaxws-maven-plugin</artifactId>
- <version>1.12</version>
- <executions>
- <execution>
- <id>wsimport</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>wsimport</goal>
- </goals>
- <configuration>
- <packageName>scatours.payment.creditcard</packageName>
- <wsdlDirectory>${basedir}/src/main/resources
- </wsdlDirectory>
- <wsdlFiles>
- <wsdlFile>CreditCardPayment.wsdl</wsdlFile>
- </wsdlFiles>
- <sourceDestDir>${project.build.directory}/jaxws-source
- </sourceDestDir>
- <verbose>false</verbose>
- <xnocompile>true</xnocompile>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index c8660c4ffe..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,116 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/">
-
- <xsd:element name="authorize" type="tns:AuthorizeType"/>
- <xsd:complexType name="AuthorizeType">
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
- <xsd:complexType name="AuthorizeResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8082/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 188c9937f7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://creditcard"
- name="CreditCardPaymentWeb">
-
- <component name="CreditCardPaymentWeb">
- <implementation.web web-uri="" />
- <reference name="service">
- <interface.java interface="scatours.payment.creditcard.CreditCardPayment"/>
- <binding.ws uri="http://localhost:8082/CreditCardPayment" />
- </reference>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 33332936b3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?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.
--->
-<web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
-
- <display-name>Apache Tuscany CreditCard Payment</display-name>
-
- <filter>
- <filter-name>tuscany</filter-name>
- <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>tuscany</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>creditcard.jsp</welcome-file>
- </welcome-file-list>
-
-</web-app>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp deleted file mode 100644 index d40f91eabf..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp +++ /dev/null @@ -1,71 +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.
--->
-
-<%@ page contentType="text/html;charset=UTF-8" language="java"%>
-<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca"%>
-
-<sca:reference name="service"
- type="scatours.payment.creditcard.CreditCardPayment" />
-
-
-<%@page import="scatours.payment.creditcard.CreditCardPaymentService"%>
-<%@page import="scatours.payment.creditcard.ObjectFactory"%>
-<%@page import="scatours.payment.creditcard.CreditCardDetailsType"%>
-<%@page import="scatours.payment.creditcard.CreditCardTypeType"%>
-<%@page import="scatours.payment.creditcard.PayerType"%><html>
-<body>
-
-<h2>SCATours Credit Card Payment Web Application</h2>
-
-<p>
-<form action="creditcard.jsp" method="get">Card Type: <select
- name="type">
- <option value="Visa" selected="selected">Visa</option>
- <option value="MasterCard">MasterCard</option>
- <option value="Amex">Amex</option>
- <option value="Discover">Discover</option>
-</select> <br />
-Card Number: <input type="text" name="cardNumber" /><br />
-Card Holder: <input type="text" name="cardHolder" /><br />
-Amount (EUR): <input type="text" name="amount" /><br />
-<p>
-<input type="submit" name="charge" value="Submit" /></form>
-
-<%
- String c = request.getParameter("charge");
- if (c != null) {
- ObjectFactory objectFactory = new ObjectFactory();
- CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
- ccDetails.setCreditCardType(CreditCardTypeType.fromValue(request.getParameter("type")));
- ccDetails.setCreditCardNumber(request.getParameter("cardNumber"));
- ccDetails.setCVV2("123");
- ccDetails.setExpMonth(12);
- ccDetails.setExpYear(2011);
- PayerType ccOwner = objectFactory.createPayerType();
- ccOwner.setName(request.getParameter("cardHolder"));
- ccDetails.setCardOwner(ccOwner);
- float amount = Float.parseFloat(request.getParameter("amount"));
-%>
-<%=service.authorize(ccDetails, amount)%>
-<%
- }
-%>
-
-</body>
-</html>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/META-INF/MANIFEST.MF b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/META-INF/MANIFEST.MF deleted file mode 100644 index 68c5603763..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/META-INF/MANIFEST.MF +++ /dev/null @@ -1,21 +0,0 @@ -Manifest-Version: 1.0
-Private-Package: calculator;version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: SCATours Currency Converter
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Eclipse-LazyStart: true
-Bundle-Version: 1.0.0
-Bnd-LastModified: 1223949424781
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA Calculator OSGi Sample
-Import-Package: org.oasisopen.sca.annotation;version="2.0.0",
- org.osgi.framework;version="1.4",
- scatours.currency
-Bundle-SymbolicName: scatours.currency.converter
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 -Export-Package: scatours.currency
-Bundle-Activator: scatours.currency.impl.CurrencyConverterActivator
-
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/OSGI-INF/sca/bundle.componentType b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/OSGI-INF/sca/bundle.componentType deleted file mode 100644 index c673715e21..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/OSGI-INF/sca/bundle.componentType +++ /dev/null @@ -1,27 +0,0 @@ -<?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.
--->
-<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903">
-
- <service name="CurrencyConverter">
- <!-- The interface will be mapped into the OSGi service class -->
- <interface.java interface="scatours.currency.CurrencyConverter"/>
- </service>
-
-</componentType>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/OSGI-INF/sca/bundle.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/OSGI-INF/sca/bundle.composite deleted file mode 100644 index b59e8bf248..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/OSGI-INF/sca/bundle.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://currency"
- name="CurrencyConverterComposite">
-
- <component name="CurrencyConverterComponent">
- <tuscany:implementation.osgi bundleSymbolicName="scatours.currency.converter" bundleVersion="1.0.0" />
- <service name="CurrencyConverter">
- <tuscany:binding.rmi uri="rmi://localhost:8089/CurrencyConverter" />
- </service>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/pom.xml deleted file mode 100644 index 6d7388d833..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/pom.xml +++ /dev/null @@ -1,117 +0,0 @@ -<?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>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>scatours-currency-converter-dosgi</artifactId>
- <name>SCATours Currency Converter OSGi</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-feature-ejava</artifactId>
- <version>2.0-SNAPSHOT</version>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-launcher-equinox</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl-osgi</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.osgi</groupId>
- <artifactId>services</artifactId>
- <version>3.2.0-v20090520-1800</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <!-- Equinox Declarative Services -->
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>ds</artifactId>
- <version>1.1.0-v20090601</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>util</artifactId>
- <version>1.0.100-v20090520-1800</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
-
- <plugin>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.5.1</version>
- <configuration>
- <buildcommands>
- <buildcommand>org.eclipse.pde.ManifestBuilder</buildcommand>
- <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
- </buildcommands>
- <projectnatures>
- <projectnature>org.eclipse.jdt.core.javanature</projectnature>
- <projectnature>org.eclipse.pde.PluginNature</projectnature>
- </projectnatures>
- <classpathContainers>
- <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
- </classpathContainer>
- </classpathContainers>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>${basedir}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/CurrencyConverter.java deleted file mode 100644 index 49e1f6a119..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/CurrencyConverter.java +++ /dev/null @@ -1,33 +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.currency;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * The CurrencyConverter service interface
- */
-@Remotable
-public interface CurrencyConverter {
-
- float getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
-
- float convert(String fromCurrencyCode, String toCurrencyCode, float amount);
-
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterActivator.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterActivator.java deleted file mode 100644 index 90b26aa2b3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterActivator.java +++ /dev/null @@ -1,40 +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.currency.impl;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-import scatours.currency.CurrencyConverter;
-
-/**
- *
- */
-public class CurrencyConverterActivator implements BundleActivator {
-
- public void start(BundleContext context) throws Exception {
- System.out.println("[" + context.getBundle().getSymbolicName() + "]: Registering CurrencyConverter service...");
- context.registerService(CurrencyConverter.class.getName(), new CurrencyConverterImpl(), null);
- }
-
- public void stop(BundleContext context) throws Exception {
- }
-
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterImpl.java deleted file mode 100644 index 2a3ffc1a1e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/2.x/currency-converter-dosgi-contribution/src/main/java/scatours/currency/impl/CurrencyConverterImpl.java +++ /dev/null @@ -1,55 +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.currency.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.oasisopen.sca.annotation.Service;
-
-import scatours.currency.CurrencyConverter;
-
-/**
- * An implementation of the CurrencyConverter service
- */
-@Service(CurrencyConverter.class)
-public class CurrencyConverterImpl implements CurrencyConverter {
-
- // currency index
- private Map<String, Integer> currencyIndex = new HashMap<String, Integer>();
-
- // exchange rates
- private final float rates[][] = { {1.00f, 0.50f, 0.66f}, {2.00f, 1.00f, 1.33f}, {1.50f, 0.75f, 1.00f}};
-
- public CurrencyConverterImpl() {
- currencyIndex.put("USD", new Integer(0));
- currencyIndex.put("GBP", new Integer(1));
- currencyIndex.put("EUR", new Integer(2));
- }
-
- public float getExchangeRate(String fromCurrencyCode, String toCurrencyCode) {
- return rates[currencyIndex.get(fromCurrencyCode).intValue()][currencyIndex.get(toCurrencyCode).intValue()];
- }
-
- public float convert(String fromCurrencyCode, String toCurrencyCode, float amount) {
- float converted = amount * getExchangeRate(fromCurrencyCode, toCurrencyCode);
- System.out.println(fromCurrencyCode + amount + "=" + toCurrencyCode + converted);
- return converted;
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/build.xml deleted file mode 100644 index 549f1f740b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/build.xml +++ /dev/null @@ -1,52 +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. ---> -<project name="gettingstarted" default="compile"> - <property environment="env"/> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac srcdir="src/main/java" destdir="target/classes" - debug="on" source="1.5" target="1.5"> - <classpath> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </javac> - </target> - - <target name="runcurrencyconverter"> - <java classname="client.CurrencyConverterClient" fork="true"> - <classpath> - <pathelement path="src/main/resources"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="runtrip"> - <java classname="client.TripClient" fork="true"> - <classpath> - <pathelement path="src/main/resources"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/pom.xml deleted file mode 100644 index 4eb2e218d5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-01</artifactId> - <name>Apache Tuscany SCA Tours Chapter 01 Examples</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/client/CurrencyConverterClient.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/client/CurrencyConverterClient.java deleted file mode 100644 index df6cdc10e1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/client/CurrencyConverterClient.java +++ /dev/null @@ -1,46 +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 client; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import currencyconverter.CurrencyConverter; - -/** - * This shows how to run the CurrencyConverter component. - */ -public class CurrencyConverterClient { - - public final static void main(String[] args) throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("currencyconverter.composite", - null); - node.start(); - - CurrencyConverter currencyConverter = - ((SCAClient)node).getService(CurrencyConverter.class, - "CurrencyConverterComponent"); - - System.out.println(currencyConverter.convert("GBP", "USD", 10.00)); - - node.stop(); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/client/TripClient.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/client/TripClient.java deleted file mode 100644 index f221ac9106..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/client/TripClient.java +++ /dev/null @@ -1,45 +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 client; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import trip.Trip; - -/** - * This shows how to run the CurrencyConverter component. - */ -public class TripClient { - - public final static void main(String[] args) throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("trip.composite", - null); - node.start(); - - Trip trip = ((SCAClient)node).getService(Trip.class, - "TripComponent"); - - System.out.println(trip.getTotalPrice()); - - node.stop(); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/currencyconverter/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/currencyconverter/CurrencyConverter.java deleted file mode 100644 index 95863271c4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/currencyconverter/CurrencyConverter.java +++ /dev/null @@ -1,31 +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 currencyconverter; - -import org.osoa.sca.annotations.Remotable; - -/** - * The CurrencyConverter service interface - */ -@Remotable -public interface CurrencyConverter { - double convert(String fromCurrencyCode, - String toCurrencyCode, - double amount); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/currencyconverter/CurrencyConverterImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/currencyconverter/CurrencyConverterImpl.java deleted file mode 100644 index d5b470ddeb..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/currencyconverter/CurrencyConverterImpl.java +++ /dev/null @@ -1,32 +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 currencyconverter; - - -/** - * An implementation of the CurrencyConverter service - */ -public class CurrencyConverterImpl implements CurrencyConverter { - public double convert(String fromCurrencyCode, - String toCurrencyCode, - double amount){ - // this currency conversion is pretty dumb - return amount * 1.23; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/trip/Trip.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/trip/Trip.java deleted file mode 100644 index c7f930c631..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/trip/Trip.java +++ /dev/null @@ -1,26 +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 trip; - -/** - * The Trip service interface - */ -public interface Trip { - double getTotalPrice(); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/trip/TripImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/trip/TripImpl.java deleted file mode 100644 index 9fe9fb1834..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/java/trip/TripImpl.java +++ /dev/null @@ -1,42 +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 trip; - -import org.osoa.sca.annotations.Reference; - -import currencyconverter.CurrencyConverter; - -/** - * An implementation of the Trip service - */ -public class TripImpl implements Trip { - - @Reference - protected CurrencyConverter currencyConverter; - - private double totalPrice = 100.00; - private String supplierCurrency = "USD"; - private String quoteCurrency = "GBP"; - - public double getTotalPrice(){ - return currencyConverter.convert(supplierCurrency, - quoteCurrency, - totalPrice); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/resources/currencyconverter.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/resources/currencyconverter.composite deleted file mode 100644 index 2a37151e08..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/resources/currencyconverter.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://tuscanyscatours" - xmlns:sample="http://tuscanyscatours" - name="currencyconverter"> - - <component name="CurrencyConverterComponent"> - <implementation.java class="currencyconverter.CurrencyConverterImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/resources/trip.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/resources/trip.composite deleted file mode 100644 index 32a3eed4be..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-01/src/main/resources/trip.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://tuscanyscatours" - xmlns:sample="http://tuscanyscatours" - name="trip"> - - <component name="TripComponent"> - <implementation.java class="trip.TripImpl"/> - <reference name="currencyConverter" target="CurrencyConverterComponent"/> - </component> - - <component name="CurrencyConverterComponent"> - <implementation.java class="currencyconverter.CurrencyConverterImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/build.xml deleted file mode 100644 index a58fed933a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/build.xml +++ /dev/null @@ -1,45 +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.
--->
-
-<project name="scatours-chapter-02" default="compile">
-
- <target name="compile">
- <antcall target="allsubdirs">
- <param name="target" value="compile"/>
- </antcall>
- </target>
-
- <target name="run">
- <ant dir="node" target="run"/>
- </target>
-
- <target name="clean">
- <antcall target="allsubdirs">
- <param name="target" value="clean"/>
- </antcall>
- </target>
-
- <target name="allsubdirs">
- <ant dir="goodvaluetrips-contribution" target="${target}"/>
- <ant dir="tuscanyscatours-contribution" target="${target}"/>
- <ant dir="client-contribution" target="${target}"/>
- <ant dir="node" target="${target}"/>
- </target>
-
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/build.xml deleted file mode 100644 index 17bc0d7d5b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/build.xml +++ /dev/null @@ -1,45 +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.
--->
-
-<project name="scatours-chapter-02-client-contribution" default="compile">
- <property environment="env"/>
-
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- <classpath>
- <pathelement location="../tuscanyscatours-contribution/target/scatours-chapter-02-tuscanyscatours-contribution.jar"/>
- <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/scatours-chapter-02-client-contribution.jar"
- basedir="target/classes"/>
- </target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/pom.xml deleted file mode 100644 index e5982fe7bd..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.6-SNAPSHOT</version>
- <!--relativePath>../../pom.xml</relativePath-->
- </parent>
- <artifactId>scatours-chapter-02-client-contribution</artifactId>
- <name>Apache Tuscany SCA Tours Chapter 02 Test Client Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>1.6-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-chapter-02-tuscanyscatours-contribution</artifactId>
- <version>1.6-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/java/scatours/client/TestClient.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/java/scatours/client/TestClient.java deleted file mode 100644 index cb80368918..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/java/scatours/client/TestClient.java +++ /dev/null @@ -1,46 +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.client;
-
-import com.tuscanyscatours.Bookings;
-import com.tuscanyscatours.Checkout;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-@Service(Runnable.class)
-public class TestClient {
- @Reference
- protected Bookings bookings;
-
- @Reference
- protected Checkout checkout;
-
- public TestClient() {
- }
-
- public void run() {
- String bookingCode = bookings.newBooking("FS1APR4", 1);
- System.out.println("Booking code is " + bookingCode);
-
- checkout.makePayment(1995.00, "1234567843218765 10/10");
- System.out.println("Paid $1995.00");
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 54ae0dbd0a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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.
--->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:client="http://client.scatours/">
- <export namespace="http://client.scatours/" />
- <import.java package="com.tuscanyscatours" />
- <deployable composite="client:Client" />
-</contribution>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/resources/client.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/resources/client.composite deleted file mode 100644 index 05c2755114..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/client-contribution/src/main/resources/client.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://client.scatours/"
- name="Client">
-
- <component name="TestClient">
- <implementation.java class="scatours.client.TestClient" />
- <reference name="bookings" target="TripBooking/Bookings" />
- <reference name="checkout" target="ShoppingCart/Checkout" />
- </component>
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/build.xml deleted file mode 100644 index fa67a921e2..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/build.xml +++ /dev/null @@ -1,44 +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.
--->
-
-<project name="scatours-chapter-02-goodvaluetrips-contribution" default="compile">
- <property environment="env"/>
-
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- <classpath>
- <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/scatours-chapter-02-goodvaluetrips-contribution.jar"
- basedir="target/classes"/>
- </target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/pom.xml deleted file mode 100644 index 5ff8cc8382..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-02-goodvaluetrips-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 02 Good Value Trips Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/java/com/goodvaluetrips/TripProvider.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/java/com/goodvaluetrips/TripProvider.java deleted file mode 100644 index d30046aaef..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/java/com/goodvaluetrips/TripProvider.java +++ /dev/null @@ -1,26 +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 com.goodvaluetrips;
-
-public class TripProvider implements Trips {
- public String checkAvailability(String trip, int people) {
- // call non-SCA code to reserve trip and return booking code
- return "6R98Y";
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/java/com/goodvaluetrips/Trips.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/java/com/goodvaluetrips/Trips.java deleted file mode 100644 index 365a210368..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/java/com/goodvaluetrips/Trips.java +++ /dev/null @@ -1,26 +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 com.goodvaluetrips;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Trips {
- String checkAvailability(String trip, int people);
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 6ed07d5612..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:gvt="http://goodvaluetrips.com/"> - <export namespace="http://goodvaluetrips.com/" /> - <deployable composite="gvt:Trips" /> -</contribution> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/resources/trips.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/resources/trips.composite deleted file mode 100644 index ab173e5ef7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/goodvaluetrips-contribution/src/main/resources/trips.composite +++ /dev/null @@ -1,30 +0,0 @@ -<?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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://goodvaluetrips.com/"
- name="Trips">
-
- <component name="TripProvider">
- <implementation.java class="com.goodvaluetrips.TripProvider" />
- <service name="Trips">
- <interface.java interface="com.goodvaluetrips.Trips" />
- </service>
- </component>
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/build.xml deleted file mode 100644 index 0c3c506b67..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/build.xml +++ /dev/null @@ -1,56 +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. ---> - -<project name="scatours-chapter-02-node" default="compile"> - <property environment="env"/> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src/main/java"/> - <classpath> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src/main/resources"/> - </copy> - <jar destfile="target/scatours-chapter-02-node.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="scatours.LaunchNode"/> - </manifest> - </jar> - </target> - - <target name="run"> - <java classname="scatours.LaunchNode" fork="true"> - <classpath> - <pathelement location="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/pom.xml deleted file mode 100644 index f858f9f7e7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-02-node-jumpstart</artifactId> - <name>Apache Tuscany SCA Tours Chapter 02 Node Jumpstart</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-node-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-chapter-02-goodvaluetrips-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/java/scatours/LaunchNode.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/java/scatours/LaunchNode.java deleted file mode 100644 index b09939e49f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/java/scatours/LaunchNode.java +++ /dev/null @@ -1,53 +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; - -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 com.goodvaluetrips.Trips; - -public class LaunchNode { - - public static void main(String[] args) throws Exception { - try { - SCAContribution gvtContribution = - new SCAContribution("goodvaluetrips", - "../goodvaluetrips-contribution/target/classes"); - SCANode node = SCANodeFactory.newInstance(). - createSCANode("trips.composite", - gvtContribution); - node.start(); - - Trips tripProvider = ((SCAClient)node).getService(Trips.class, - "TripProvider/Trips"); - - System.out.println("Trip boooking code = " + - tripProvider.checkAvailability("FS1APR4", 2)); - - node.stop(); - - } catch (Throwable th) { - th.printStackTrace(); - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e3ac806b9a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:scatours="http://scatours"> - <import namespace="http://tuscanyscatours.com/" /> - <import namespace="http://goodvaluetrips.com/" /> - <import namespace="http://client.scatours/" /> - <deployable composite="scatours:scatours" /> -</contribution> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/resources/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/resources/scatours.composite deleted file mode 100644 index 6524f078f5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/main/resources/scatours.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:client="http://client.scatours/" - xmlns:tours="http://tuscanyscatours.com/" - xmlns:trips="http://goodvaluetrips.com/" - name="scatours"> - - <include name="client:Client" /> - <include name="tours:Tours" /> - <include name="trips:Trips" /> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/test/java/scatours/NodeTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/test/java/scatours/NodeTestCase.java deleted file mode 100644 index 16cff30934..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node-jumpstart/src/test/java/scatours/NodeTestCase.java +++ /dev/null @@ -1,60 +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; - -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.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests all the components and services in chapter 2 - */ -public class NodeTestCase { - - private SCANode node; - - @Before - public void startServer() throws Exception { - try { - node = SCANodeFactory.newInstance().createSCANode("scatours.composite", - new SCAContribution("goodvaluetrips", "../goodvaluetrips-contribution/target/classes"), - new SCAContribution("tuscanyscatours", "../tuscanyscatours-contribution/target/classes"), - new SCAContribution("client", "../client-contribution/target/classes"), - new SCAContribution("node", "./target/classes")); - node.start(); - } catch (Exception ex) { - System.out.println(ex.toString()); - } - } - - @Test - public void testClient() throws Exception { - Runnable runner = ((SCAClient)node).getService(Runnable.class, "TestClient/Runnable"); - runner.run(); - } - - @After - public void stopServer() throws Exception { - node.stop(); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/build.xml deleted file mode 100644 index 0c3c506b67..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/build.xml +++ /dev/null @@ -1,56 +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. ---> - -<project name="scatours-chapter-02-node" default="compile"> - <property environment="env"/> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src/main/java"/> - <classpath> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src/main/resources"/> - </copy> - <jar destfile="target/scatours-chapter-02-node.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="scatours.LaunchNode"/> - </manifest> - </jar> - </target> - - <target name="run"> - <java classname="scatours.LaunchNode" fork="true"> - <classpath> - <pathelement location="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/pom.xml deleted file mode 100644 index 849bfef794..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-02-node</artifactId> - <name>Apache Tuscany SCA Tours Chapter 02 Node</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-node-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/java/scatours/LaunchNode.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/java/scatours/LaunchNode.java deleted file mode 100644 index b7888c8749..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/java/scatours/LaunchNode.java +++ /dev/null @@ -1,52 +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; - -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; - -public class LaunchNode { - - public static void main(String[] args) throws Exception { - LaunchNode.launchFromFileSystemDir(); - } - - // OK for development but you must launch the node from this module - public static void launchFromFileSystemDir(){ - try { - SCANode node = SCANodeFactory.newInstance().createSCANode("scatours.composite", - new SCAContribution("goodvaluetrips", "../goodvaluetrips-contribution/target/classes"), - new SCAContribution("tuscanyscatours", "../tuscanyscatours-contribution/target/classes"), - new SCAContribution("client", "../client-contribution/target/classes"), - new SCAContribution("node", "./target/classes")); - node.start(); - - Runnable runner = ((SCAClient)node).getService(Runnable.class, "TestClient/Runnable"); - runner.run(); - - node.stop(); - - } catch (Throwable th) { - th.printStackTrace(); - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 4a6250ad25..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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.
--->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:scatours="http://scatours">
- <import namespace="http://tuscanyscatours.com/" />
- <import namespace="http://goodvaluetrips.com/" />
- <import namespace="http://client.scatours/" />
- <deployable composite="scatours:scatours" />
-</contribution>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/resources/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/resources/scatours.composite deleted file mode 100644 index a5e26fd7b7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/main/resources/scatours.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://scatours"
- xmlns:client="http://client.scatours/"
- xmlns:tours="http://tuscanyscatours.com/"
- xmlns:trips="http://goodvaluetrips.com/"
- name="scatours">
-
- <include name="client:Client" />
- <include name="tours:Tours" />
- <include name="trips:Trips" />
-
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/test/java/scatours/NodeTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/test/java/scatours/NodeTestCase.java deleted file mode 100644 index d37e52a409..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/node/src/test/java/scatours/NodeTestCase.java +++ /dev/null @@ -1,60 +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;
-
-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.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests all the components and services in chapter 2
- */
-public class NodeTestCase {
-
- private SCANode node;
-
- @Before
- public void startServer() throws Exception {
- try {
- node = SCANodeFactory.newInstance().createSCANode("scatours.composite",
- new SCAContribution("goodvaluetrips", "../goodvaluetrips-contribution/target/classes"),
- new SCAContribution("tuscanyscatours", "../tuscanyscatours-contribution/target/classes"),
- new SCAContribution("client", "../client-contribution/target/classes"),
- new SCAContribution("node", "./target/classes"));
- node.start();
- } catch (Exception ex) {
- System.out.println(ex.toString());
- }
- }
-
- @Test
- public void testClient() throws Exception {
- Runnable runner = ((SCAClient)node).getService(Runnable.class, "TestClient/Runnable");
- runner.run();
- }
-
- @After
- public void stopServer() throws Exception {
- node.stop();
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/pom.xml deleted file mode 100644 index 0132a445e5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-02</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 02 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>goodvaluetrips-contribution</module> - <module>tuscanyscatours-contribution</module> - <module>client-contribution</module> - <module>node</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/build.xml deleted file mode 100644 index d9961176f3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/build.xml +++ /dev/null @@ -1,44 +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.
--->
-
-<project name="scatours-chapter-02-tuscanyscatours-contribution" default="compile">
- <property environment="env"/>
-
- <target name="compile">
- <mkdir dir="target/classes"/>
- <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
- <src path="src/main/java"/>
- <classpath>
- <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/scatours-chapter-02-tuscanyscatours-contribution.jar"
- basedir="target/classes"/>
- </target>
-
- <target name="clean">
- <delete includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-
-</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/pom.xml deleted file mode 100644 index 6296c58e95..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-02-tuscanyscatours-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 02 SCA Tours Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/goodvaluetrips/Trips.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/goodvaluetrips/Trips.java deleted file mode 100644 index 365a210368..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/goodvaluetrips/Trips.java +++ /dev/null @@ -1,26 +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 com.goodvaluetrips;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Trips {
- String checkAvailability(String trip, int people);
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Bookings.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Bookings.java deleted file mode 100644 index 9d54d46bb6..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Bookings.java +++ /dev/null @@ -1,26 +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 com.tuscanyscatours;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Bookings {
- String newBooking(String trip, int people);
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Checkout.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Checkout.java deleted file mode 100644 index 688fc7e83b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Checkout.java +++ /dev/null @@ -1,26 +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 com.tuscanyscatours;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Checkout {
- void makePayment(double amount, String cardInfo);
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/ShoppingCart.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/ShoppingCart.java deleted file mode 100644 index 68bf25a8cd..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/ShoppingCart.java +++ /dev/null @@ -1,28 +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 com.tuscanyscatours;
-
-public class ShoppingCart implements Checkout, Updates {
- public void makePayment(double amount, String cardInfo) {
- // make payment for trips in cart giving card details
- }
- public void addTrip(String resCode) {
- // add the booked trip to the cart
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/TripBooking.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/TripBooking.java deleted file mode 100644 index e64d60545e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/TripBooking.java +++ /dev/null @@ -1,35 +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 com.tuscanyscatours;
-
-import org.osoa.sca.annotations.Reference;
-
-public class TripBooking implements Bookings {
- @Reference
- protected com.goodvaluetrips.Trips mytrips;
-
- @Reference
- protected Updates cart;
-
- public String newBooking(String trip, int people) {
- String resCode = mytrips.checkAvailability(trip, people);
- cart.addTrip(resCode);
- return "GV" + resCode;
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Updates.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Updates.java deleted file mode 100644 index e33b0399cb..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/java/com/tuscanyscatours/Updates.java +++ /dev/null @@ -1,26 +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 com.tuscanyscatours;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Updates {
- void addTrip(String resCode);
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index cf1153ac14..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tst="http://tuscanyscatours.com/"> - <export namespace="http://tuscanyscatours.com/" /> - <export.java package="com.tuscanyscatours" /> - <deployable composite="tst:Tours" /> -</contribution> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/resources/tours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/resources/tours.composite deleted file mode 100644 index f166a1635d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-02/tuscanyscatours-contribution/src/main/resources/tours.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://tuscanyscatours.com/"
- name="Tours">
-
- <component name="TripBooking">
- <implementation.java class="com.tuscanyscatours.TripBooking" />
- <service name="Bookings">
- <interface.java interface="com.tuscanyscatours.Bookings" />
- </service>
- <reference name="mytrips" target="TripProvider/Trips">
- <interface.java interface="com.goodvaluetrips.Trips" />
- </reference>
- <reference name="cart" target="ShoppingCart/Updates">
- <interface.java interface="com.tuscanyscatours.Updates" />
- </reference>
- </component>
-
- <component name="ShoppingCart">
- <implementation.java class="com.tuscanyscatours.ShoppingCart"/>
- <service name="Checkout">
- <interface.java interface="com.tuscanyscatours.Checkout" />
- </service>
- <service name="Updates">
- <interface.java interface="com.tuscanyscatours.Updates" />
- </service>
- </component>
-</composite>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-03/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-03/pom.xml deleted file mode 100644 index 7d417a20de..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-03/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-03</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 03 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>node</module> - <module>ui-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/build.xml deleted file mode 100644 index 3627e840ad..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/build.xml +++ /dev/null @@ -1,278 +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. ---> - -<project name="scatours-chapter-05-node" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - </copy> - <jar destfile="target/scatours-chapter-05-node.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="scatours.LaunchNode"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="scatours.LaunchNode" fork="true"> - <classpath> - <pathelement location="target/scatours-chapter-05-node.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-abdera-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-js-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ejb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ejb-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-http-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-jsonrpc-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-jsonrpc-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-axis2-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-axis2-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-axis2-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-wsdlgen-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-jee-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-resource-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-data-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-axiom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-axiom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-json-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-sdo-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-domain-manager-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-jetty-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-bpel-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-bpel-ode-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-ejb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-resource-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-resource-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-runtime-tuscany-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-wsdl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-wsdl-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-launcher-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-manager-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-security-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-security-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-ws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-web-javascript-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-xml-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.4.2.jar"/> - <include name="abdera-client-0.4.0-incubating.jar"/> - <include name="abdera-core-0.4.0-incubating.jar"/> - <include name="abdera-extensions-html-0.4.0-incubating.jar"/> - <include name="abdera-extensions-json-0.4.0-incubating.jar"/> - <include name="abdera-extensions-main-0.4.0-incubating.jar"/> - <include name="abdera-i18n-0.4.0-incubating.jar"/> - <include name="abdera-parser-0.4.0-incubating.jar"/> - <include name="abdera-server-0.4.0-incubating.jar"/> - <include name="activation-1.1.jar"/> - <include name="activeio-2.0-r118.jar"/> - <include name="annogen-0.1.0.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="axiom-api-1.2.7.jar"/> - <include name="axiom-dom-1.2.7.jar"/> - <include name="axiom-impl-1.2.7.jar"/> - <include name="axion-1.0-M3-dev.jar"/> - <include name="axis-ant-1.4.jar"/> - <include name="axis2-adb-1.4.1.jar"/> - <include name="axis2-codegen-1.4.1.jar"/> - <include name="axis2-java2wsdl-1.4.1.jar"/> - <include name="axis2-kernel-1.4.1.jar"/> - <include name="axis2-mtompolicy-1.4.1.jar"/> - <include name="backport-util-concurrent-3.1.jar"/> - <include name="bcprov-jdk13-132.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="common-2.2.3.jar"/> - <include name="commons-codec-1.3.jar"/> - <include name="commons-collections-3.1.jar"/> - <include name="commons-discovery-0.2.jar"/> - <include name="commons-fileupload-1.2.jar"/> - <include name="commons-httpclient-3.1.jar"/> - <include name="commons-io-1.4.jar"/> - <include name="commons-jexl-1.1.jar"/> - <include name="commons-lang-2.1.jar"/> - <include name="commons-logging-1.1.1.jar"/> - <include name="commons-primitives-1.0.jar"/> - <include name="derby-10.3.1.4.jar"/> - <include name="dom4j-1.6.1.jar"/> - <include name="ecore-2.2.3.jar"/> - <include name="ecore-change-2.2.3.jar"/> - <include name="ecore-xmi-2.2.3.jar"/> - <include name="geronimo-activation_1.1_spec-1.0.1.jar"/> - <include name="geronimo-common-1.2-beta.jar"/> - <include name="geronimo-connector-1.2-beta.jar"/> - <include name="geronimo-core-1.2-beta.jar"/> - <include name="geronimo-deployment-1.2-beta.jar"/> - <include name="geronimo-ejb_3.0_spec-1.0.jar"/> - <include name="geronimo-interceptor-1.2-beta.jar"/> - <include name="geronimo-j2ee-1.2-beta.jar"/> - <include name="geronimo-j2ee-connector_1.5_spec-1.1.jar"/> - <include name="geronimo-j2ee-jacc_1.0_spec-1.1.jar"/> - <include name="geronimo-j2ee-management_1.0_spec-1.1.jar"/> - <include name="geronimo-javamail_1.4_spec-1.2.jar"/> - <include name="geronimo-jms_1.1_spec-1.1.jar"/> - <include name="geronimo-jpa_3.0_spec-1.0.jar"/> - <include name="geronimo-jta_1.0.1B_spec-1.0.jar"/> - <include name="geronimo-kernel-1.2-beta.jar"/> - <include name="geronimo-management-1.2-beta.jar"/> - <include name="geronimo-naming-1.2-beta.jar"/> - <include name="geronimo-security-1.2-beta.jar"/> - <include name="geronimo-spec-j2ee-connector-1.5-rc4.jar"/> - <include name="geronimo-spec-jta-1.0.1B-rc4.jar"/> - <include name="geronimo-stax-api_1.0_spec-1.0.1.jar"/> - <include name="geronimo-system-1.2-beta.jar"/> - <include name="geronimo-transaction-1.2-beta.jar"/> - <include name="geronimo-util-1.2-beta.jar"/> - <include name="howl-1.0.1-1.jar"/> - <include name="htmlparser-1.0.5.jar"/> - <include name="httpcore-4.0-beta1.jar"/> - <include name="httpcore-nio-4.0-beta1.jar"/> - <include name="javacc-3.2.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxen-1.1.1.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jdom-1.0.jar"/> - <include name="jettison-1.0.1.jar"/> - <include name="jetty-6.1.7.jar"/> - <include name="jetty-util-6.1.7.jar"/> - <include name="json-rpc-1.0.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="junit-4.5.jar"/> - <include name="log4j-1.2.13.jar"/> - <include name="mail-1.4.jar"/> - <include name="mex-1.41-impl.jar"/> - <include name="neethi-2.0.4.jar"/> - <include name="ode-bpel-api-1.1.1.jar"/> - <include name="ode-bpel-compiler-1.1.1.jar"/> - <include name="ode-bpel-dao-1.1.1.jar"/> - <include name="ode-bpel-epr-1.1.1.jar"/> - <include name="ode-bpel-obj-1.1.1.jar"/> - <include name="ode-bpel-runtime-1.1.1.jar"/> - <include name="ode-bpel-schemas-1.1.1.jar"/> - <include name="ode-bpel-store-1.1.1.jar"/> - <include name="ode-dao-jpa-1.1.1.jar"/> - <include name="ode-jacob-1.1.1.jar"/> - <include name="ode-jacob-ap-1.1.1.jar"/> - <include name="ode-scheduler-simple-1.1.1.jar"/> - <include name="ode-utils-1.1.1.jar"/> - <include name="openjpa-all-0.9.7-incubating.jar"/> - <include name="openjpa-persistence-0.9.7-incubating.jar"/> - <include name="opensaml-1.1.jar"/> - <include name="rampart-core-1.4.jar"/> - <include name="rampart-policy-1.4.jar"/> - <include name="rampart-trust-1.4.jar"/> - <include name="regexp-1.3.jar"/> - <include name="saxon-8.7.jar"/> - <include name="saxon-dom-8.7.jar"/> - <include name="saxon-xpath-8.7.jar"/> - <include name="serp-1.12.0.jar"/> - <include name="servlet-api-2.5.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="tranql-connector-1.1.jar"/> - <include name="tuscany-sdo-api-r2.1-1.1.1.jar"/> - <include name="tuscany-sdo-impl-1.1.1.jar"/> - <include name="tuscany-sdo-lib-1.1.1.jar"/> - <include name="woden-api-1.0M8.jar"/> - <include name="woden-impl-dom-1.0M8.jar"/> - <include name="wsdl4j-1.6.2.jar"/> - <include name="wss4j-1.5.4.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - <include name="xalan-2.7.0.jar"/> - <include name="xbean-naming-2.7.jar"/> - <include name="xercesImpl-2.8.1.jar"/> - <include name="xml-apis-1.3.03.jar"/> - <include name="xml-resolver-1.1.jar"/> - <include name="xmlParserAPIs-2.6.0.jar"/> - <include name="xmlbeans-2.3.0.jar"/> - <include name="xmlsec-1.4.2.jar"/> - <include name="xsd-2.2.3.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/pom.xml deleted file mode 100644 index 46dd653664..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/pom.xml +++ /dev/null @@ -1,164 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-05-node</artifactId> - <name>Apache Tuscany SCA Tours Chapter 05 Node</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-launcher</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-domain-manager</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-node-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-widget-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-atom-abdera</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ejb-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-ejb</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-bpel-ode</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>scatours.LaunchNode</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/src/main/java/scatours/LaunchNode.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/src/main/java/scatours/LaunchNode.java deleted file mode 100644 index 6b1c673579..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/node/src/main/java/scatours/LaunchNode.java +++ /dev/null @@ -1,65 +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; - -import java.io.IOException; - -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -public class LaunchNode { - public static void main(String[] args) throws Exception { - LaunchNode.launchFromFileSystemDir(); - } - - // OK for development but you must launch the node from this module - public static void launchFromFileSystemDir(){ - SCANode node = null; - - try { - node = SCANodeFactory.newInstance().createSCANode("scatours.composite", - new SCAContribution("common", "../../shared-contributions/common-contribution/target/classes"), - new SCAContribution("currency", "../../shared-contributions/currency-contribution/target/classes"), - new SCAContribution("hotel", "../../shared-contributions/hotel-contribution/target/classes"), - new SCAContribution("flight", "../../shared-contributions/flight-contribution/target/classes"), - new SCAContribution("car", "../../shared-contributions/car-contribution/target/classes"), - new SCAContribution("trip", "../../shared-contributions/trip-contribution/target/classes"), - new SCAContribution("tripbooking", "../../shared-contributions/tripbooking-contribution/target/classes"), - new SCAContribution("travelcatalog", "../../shared-contributions/travelcatalog-contribution/target/classes"), - new SCAContribution("payment", "../../shared-contributions/payment-java-contribution/target/classes"), - new SCAContribution("creditcard", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/classes"), - new SCAContribution("shoppingcart", "../../shared-contributions/shoppingcart-contribution/target/classes"), - new SCAContribution("scatours", "../../shared-contributions/scatours-contribution/target/classes"), - new SCAContribution("ui", "../ui-contribution/target/classes")); - node.start(); - - System.out.println("Node started - Press enter to shutdown."); - try { - System.in.read(); - } catch (IOException e) {} - - node.stop(); - - } catch (Exception ex) { - System.out.println(ex.toString()); - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/pom.xml deleted file mode 100644 index 5507b545d1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-05</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 05 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>node</module> - <module>ui-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/build.xml deleted file mode 100644 index 2d7b30e1e2..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/build.xml +++ /dev/null @@ -1,116 +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. ---> - -<project name="scatours-chapter-05-ui-contribution" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - </copy> - <jar destfile="target/scatours-chapter-05-ui-contribution.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="launch.LaunchTutorialAdmin" fork="true"> - <classpath> - <pathelement location="target/scatours-chapter-05-ui-contribution.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.4.2.jar"/> - <include name="activation-1.1.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="axiom-api-1.2.7.jar"/> - <include name="axiom-impl-1.2.7.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="commons-logging-1.1.1.jar"/> - <include name="geronimo-activation_1.1_spec-1.0.1.jar"/> - <include name="geronimo-javamail_1.4_spec-1.2.jar"/> - <include name="geronimo-stax-api_1.0_spec-1.0.1.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxen-1.1.1.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/pom.xml deleted file mode 100644 index a706c9ab8d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-05-ui-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 05 User Interface Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>launch.LaunchTutorialAdmin</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 4064565d41..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:scatours="http://scatours"> - <deployable composite="scatours:scatours"/> - <import.java package="scatours.common"/> - <import.java package="scatours.currencyconverter"/> - <import.java package="scatours.hotel"/> - <import.java package="scatours.flight"/> - <import.java package="scatours.car"/> - <import.java package="scatours.trip"/> - <import.java package="scatours.tripbooking"/> - <import.java package="scatours.travelcatalog"/> - <import.java package="payment.creditcard"/> - <import.java package="payment"/> - <import.java package="scatours.emailgateway"/> - <import.java package="scatours.paymentprocess"/> - <import.java package="scatours.shoppingcart"/> - <import.java package="scatours"/> - <import namespace="http://www.example.org/PaymentProcess/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.composite deleted file mode 100644 index ae8d4b7ff6..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.composite +++ /dev/null @@ -1,167 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:scatours="http://scatours" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.example.org/PaymentProcess" - name="scatours"> - - <component name="UserInterfaceComponent"> - <tuscany:implementation.widget location="scatours.html"/> - <service name="Widget"> - <tuscany:binding.http uri="/scatours"/> - </service> - <reference name="scaToursCatalog" target="SCAToursComponent/SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursBooking" target="SCAToursComponent/SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursCart" target="SCAToursComponent/SCAToursCart"> - <tuscany:binding.jsonrpc/> - </reference> - </component> - - <component name="SCAToursComponent"> - <implementation.java class="scatours.SCAToursImpl"/> - <service name="SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursCart"> - <tuscany:binding.jsonrpc/> - </service> - <reference name="travelCatalogSearch" target="TravelCatalogComponent/TravelCatalogSearch"/> - <reference name="tripBooking" target="TripBookingComponent/TripBooking"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="TravelCatalogComponent"> - <implementation.java class="scatours.travelcatalog.TravelCatalogImpl"/> - <service name="TravelCatalogSearch"/> - <reference name="hotelSearch" target="HotelComponent/Search"> - <binding.sca/> - </reference> - <reference name="flightSearch"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </reference> - <reference name="carSearch" target="CarComponent/Search"> - <binding.sca/> - </reference> - <reference name="tripSearch" target="TripComponent/Search"> - <binding.sca/> - </reference> - <reference name="currencyConverter" target="CurrencyConverterComponent"> - </reference> - <property name="quoteCurrencyCode">GBP</property> - </component> - - <component name="TripBookingComponent"> - <implementation.java class="scatours.tripbooking.TripBookingImpl"/> - <service name="TripBooking"/> - <reference name="hotelBook" target="HotelComponent/Book"/> - <reference name="flightBook" target="TripComponent/Book"/> - <reference name="carBook" target="CarComponent/Book"/> - <reference name="tripBook" target="TripComponent/Book"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="HotelComponent"> - <implementation.java class="scatours.hotel.HotelImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="FlightComponent"> - <implementation.java class="scatours.flight.FlightImpl"/> - <service name="Search"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <tuscany:binding.jsonrpc/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </service> - <service name="Book"/> - </component> - - <component name="CarComponent"> - <implementation.java class="scatours.car.CarImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="TripComponent"> - <implementation.java class="scatours.trip.TripImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="CurrencyConverterComponent"> - <implementation.java class="scatours.currencyconverter.CurrencyConverterImpl"/> - <service name="CurrencyConverter"> - </service> - </component> - - <component name="ShoppingCartComponent"> - <implementation.java class="scatours.shoppingcart.ShoppingCartImpl"/> - <service name="ShoppingCart"> - </service> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - - <component name="PaymentComponent"> - <implementation.java class="payment.PaymentImpl" /> - <service name="Payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </service> - <reference name="creditCardPayment"> - <binding.ws uri="http://localhost:8080/CreditCardPayment" /> - </reference> - </component> - - <component name="CreditCardPaymentComponent"> - <implementation.java class="payment.creditcard.CreditCardPaymentImpl" /> - <service name="CreditCardPayment"> - <binding.ws uri="http://localhost:8080/CreditCardPayment" /> - </service> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.html b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.html deleted file mode 100644 index b8e27e87fc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.html +++ /dev/null @@ -1,391 +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. ---> -<html> -<head> -<title>SCA Tours</title> - -<link rel="stylesheet" type="text/css" href="style.css" /> - -<script type="text/javascript" src="scatours.js"></script> - -<script language="JavaScript"> - - //@Reference - var scaToursCatalog = new Reference("scaToursCatalog"); - - //@Reference - var scaToursBooking = new Reference("scaToursBooking"); - - //@Reference - var scaToursCart = new Reference("scaToursCart"); - - //local state - var packagedItems; - var bespokeItems; - var cartId; - - //the constructor for trip leg beans - function TripLegType(id, - fromLocation, - toLocation, - fromDate, - toDate, - noOfPeople) { - this.id = id; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.noOfPeople = noOfPeople; - } - - function getTripLeg(){ - return new TripLegType(cartId, - document.searchForm.fromLocation.value, - document.searchForm.toLocation.value, - document.searchForm.fromDate.value, - document.searchForm.toDate.value, - document.searchForm.noOfPeople.value); - } - - //the constructor for bespoke trip beans - function TripType() { - this.id = cartId; - this.type = "Bespoke"; - this.tripItems = new Array(); - // json databinding can't tolerate having a class hint set as the - // databinding transformer is not in the right classloader to load - // the class pointed to by the hint - //this.javaClass = "scatours.common.TripItem"; - } - - function getTrip(){ - return new TripType(); - } - - // remove class hint from the trip object - // can also be used to limit the amount of - // data returned to the server - function copyTrip(trip){ - var tripCopy = new TripType(); - - tripCopy.id = trip.id; - tripCopy.tripId = trip.tripId; - tripCopy.type = trip.type; - tripCopy.name = trip.name; - tripCopy.description = trip.description; - tripCopy.location = trip.location; - tripCopy.fromDate = trip.fromDate; - tripCopy.toDate = trip.toDate; - tripCopy.price = trip.price; - tripCopy.currency = trip.currency; - tripCopy.link = trip.link; - - return tripCopy; - } - - function init() { - try { - newCart(); - } - catch(e) { - alert(e); - } - } - - function reset() { - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = ""; - document.getElementById('cartPrice').innerHTML = ""; - packagedItems = new Array(); - bespokeItems = new Array(); - } - - function newCart() { - scaToursCart.newCart(newCart_response); - reset(); - } - - function newCart_response(newCartId, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - cartId = newCartId - } - - function searchTravelCatalog() { - scaToursCatalog.search(getTripLeg(), search_response); - } - - function search_response(items, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - - var packagedHTML = '<h3>Packaged Trip Items</h3>'; - packagedHTML += '<table border="0">'; - packagedHTML += '<tr>'; - packagedHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - packagedHTML += '</tr>'; - - var bespokeHTML = '<h3>Bespoke Trip Items</h3>'; - bespokeHTML += '<table border="0">'; - bespokeHTML += '<tr>'; - bespokeHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - bespokeHTML += '</tr>'; - - for (var i=0; i<items.length; i++) { - if (items[i].type == "Trip") { - packagedHTML += '<tr>'; - packagedHTML += '<td><input onClick="processPackagedSelection()" name="packagedTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - packagedHTML += '<td>' + items[i].name + '</td>'; - packagedHTML += '<td>' + items[i].description + '</td>'; - packagedHTML += '<td>' + items[i].location + '</td>'; - packagedHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - packagedHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - packagedHTML += '</tr>'; - packagedItems.push(items[i]); - } else { - bespokeHTML += '<tr>'; - bespokeHTML += '<td><input onClick="processBespokeSelection()" name="bespokeTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - bespokeHTML += '<td>' + items[i].name + '</td>'; - bespokeHTML += '<td>' + items[i].description + '</td>'; - bespokeHTML += '<td>' + items[i].location + '</td>'; - bespokeHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - bespokeHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - bespokeHTML += '</tr>'; - bespokeItems.push(items[i]); - } - } - - packagedHTML += '</table>'; - packagedHTML += '<input type="button" onClick="bookPackagedTrip()" value="Book Packaged Trip">'; - - bespokeHTML += '<tr><td/><td/><td>Total Price</td><td/><td/><td><div id="bespokeTripPrice"></div> </td></tr>'; - bespokeHTML += '</table>'; - bespokeHTML += '<input type="button" onClick="bookBespokeTrip()" value="Book Bespoke Trip">'; - - if (packagedItems.length > 0){ - document.getElementById('packagedTripItems').innerHTML = packagedHTML; - } - - if (bespokeItems.length > 0){ - document.getElementById('bespokeTripItems').innerHTML = bespokeHTML; - } - } - - function processPackagedSelection() { - // do nothing at the moment - } - - function processBespokeSelection() { - // calculate total price - var items = document.getElementsByName("bespokeTripItemSelection"); - var totalPrice = 0.0; - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - totalPrice = totalPrice + bespokeItems[i].price; - } - } - document.getElementById('bespokeTripPrice').innerHTML = totalPrice + ' ' + bespokeItems[0]. currency; - } - - function bookPackagedTrip() { - // find first selected trip item - var trip = null; - var items = document.getElementsByName("packagedTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip = copyTrip(packagedItems[i]); - break; - } - } - - if (trip != null) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select a trip") - } - } - - function bookBespokeTrip() { - // create a trip object - var trip = getTrip(); - - // add selected trip items to trip - var items = document.getElementsByName("bespokeTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip.tripItems.push(copyTrip(bespokeItems[i])); - } - } - - if (trip.tripItems.length > 0) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select some trip items!") - } - } - - function getCartTrips() { - scaToursCart.getTrips(cartId, getCartTrips_response); - } - - function getCartTrips_response(trips, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - var itemsHTML = ''; - var totalPrice = 0.0; - - for (var x=0; x<trips.length; x++){ - itemsHTML += '<h3>Trip - ' + trips[x].id + '</h3>'; - itemsHTML += '<table border="0">'; - itemsHTML += '<tr>'; - itemsHTML += '<td>Booking Ref</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - itemsHTML += '</tr>'; - - if (trips[x].type == "Trip") { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + trips[x].bookingCode + '</td>'; - itemsHTML += '<td>' + trips[x].name + '</td>'; - itemsHTML += '<td>' + trips[x].description + '</td>'; - itemsHTML += '<td>' + trips[x].location + '</td>'; - itemsHTML += '<td>' + trips[x].fromDate + ' - ' + trips[x].toDate +'</td>'; - itemsHTML += '<td>' + trips[x].price + ' ' + trips[x].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + trips[x].price; - - } else { - var tripItems = trips[x].tripItems; - - for (var i=0; i<tripItems.length; i++) { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + tripItems[i].bookingCode + '</td>'; - itemsHTML += '<td>' + tripItems[i].name + '</td>'; - itemsHTML += '<td>' + tripItems[i].description + '</td>'; - itemsHTML += '<td>' + tripItems[i].location + '</td>'; - itemsHTML += '<td>' + tripItems[i].fromDate + ' - ' + tripItems[i].toDate +'</td>'; - itemsHTML += '<td>' + tripItems[i].price + ' ' + tripItems[i].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + tripItems[i].price; - } - } - - itemsHTML += '</table>'; - } - - document.getElementById('cartItems').innerHTML = itemsHTML; - document.getElementById('cartPrice').innerHTML = totalPrice + ' ' + trips[0].currency; - } - - function checkout() { - scaToursCart.checkout(cartId); - - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = "Thank you for shopping with SCA Tours"; - document.getElementById('cartPrice').innerHTML = ""; - searchResponseItems = null; - tripItems = null; - } - - function purchase() { - } - -</script> - -</head> - -<body onload="init()" background=""> - <img src="scatours.png" border="0" /> - <div id="scatours"> - <form name="searchForm"> - <h3>Search for trips, hotels, flights and cars</h3> - <br/> - <table border="0"> - <tr> - <td>From Location:</td> - <td><input type="text" name="fromLocation" value="LGW"></td> - <td>To Location:</td> - <td><input type="text" name="toLocation" value="FLR"></td> - </tr> - <tr> - <td>Start Date:</td> - <td><input type="text" name="fromDate" value="06/12/09"></td> - <td>End Date:</td> - <td><input type="text" name="toDate" value="13/12/09"></td> - </tr> - <tr> - <td>Number of people:</td> - <td><select name="noOfPeople"> - <option>1 - <option selected>2 - <option>3 - <option>4 - </select></td> - <td/> - <td/> - </tr> - </table> - <br/> - <input type="button" onClick="searchTravelCatalog()" value="Search"> - </form> - <form name="packagedTripForm"> - <div id="packagedTripItems"></div> - </form> - <form name="bespokeTripForm"> - <div id="bespokeTripItems"></div> - </form> - <form name="cartForm"> - <h3>Shopping Cart</h3> - <div id="cartItems"></div> - <br/> - Total Price: <div id="cartPrice"></div> - <br/> - <input type="button" onClick="checkout()" value="Checkout"> - </form> - </div> - -</body> -</html> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.odg b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.odg Binary files differdeleted file mode 100644 index 8ca8fbf133..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.odg +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.png b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.png Binary files differdeleted file mode 100644 index f68cd84704..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/scatours.png +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/style.css b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/style.css deleted file mode 100644 index 6e17c2747b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-05/ui-contribution/src/main/resources/style.css +++ /dev/null @@ -1,135 +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. - */ - - - -/*******************************************/ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/build.xml deleted file mode 100644 index e49a915d6d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/build.xml +++ /dev/null @@ -1,214 +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. ---> - -<project name="scatours-chapter-06-node" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - </copy> - <jar destfile="target/scatours-chapter-06-node.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="launch.LaunchTutorialAdmin" fork="true"> - <classpath> - <pathelement location="target/scatours-chapter-06-node.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-abdera-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-js-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-http-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-jsonrpc-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-jsonrpc-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-axis2-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-axis2-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-axis2-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-wsdlgen-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-resource-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-data-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-axiom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-axiom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-json-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-domain-manager-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-jetty-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-resource-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-resource-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-spring-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-runtime-tuscany-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-wsdl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-wsdl-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-launcher-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-manager-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-security-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-security-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-ws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-web-javascript-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-xml-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.4.2.jar"/> - <include name="abdera-client-0.4.0-incubating.jar"/> - <include name="abdera-core-0.4.0-incubating.jar"/> - <include name="abdera-extensions-html-0.4.0-incubating.jar"/> - <include name="abdera-extensions-json-0.4.0-incubating.jar"/> - <include name="abdera-extensions-main-0.4.0-incubating.jar"/> - <include name="abdera-i18n-0.4.0-incubating.jar"/> - <include name="abdera-parser-0.4.0-incubating.jar"/> - <include name="abdera-server-0.4.0-incubating.jar"/> - <include name="activation-1.1.jar"/> - <include name="annogen-0.1.0.jar"/> - <include name="aopalliance-1.0.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="axiom-api-1.2.7.jar"/> - <include name="axiom-dom-1.2.7.jar"/> - <include name="axiom-impl-1.2.7.jar"/> - <include name="axis-ant-1.4.jar"/> - <include name="axis2-adb-1.4.1.jar"/> - <include name="axis2-codegen-1.4.1.jar"/> - <include name="axis2-java2wsdl-1.4.1.jar"/> - <include name="axis2-kernel-1.4.1.jar"/> - <include name="axis2-mtompolicy-1.4.1.jar"/> - <include name="backport-util-concurrent-3.1.jar"/> - <include name="bcprov-jdk13-132.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="commons-codec-1.3.jar"/> - <include name="commons-collections-3.1.jar"/> - <include name="commons-discovery-0.2.jar"/> - <include name="commons-fileupload-1.2.jar"/> - <include name="commons-httpclient-3.1.jar"/> - <include name="commons-io-1.4.jar"/> - <include name="commons-logging-1.1.1.jar"/> - <include name="derby-10.3.1.4.jar"/> - <include name="geronimo-activation_1.1_spec-1.0.1.jar"/> - <include name="geronimo-javamail_1.4_spec-1.2.jar"/> - <include name="geronimo-jms_1.1_spec-1.1.jar"/> - <include name="geronimo-stax-api_1.0_spec-1.0.1.jar"/> - <include name="htmlparser-1.0.5.jar"/> - <include name="httpcore-4.0-beta1.jar"/> - <include name="httpcore-nio-4.0-beta1.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxen-1.1.1.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jettison-1.0.1.jar"/> - <include name="jetty-6.1.7.jar"/> - <include name="jetty-util-6.1.7.jar"/> - <include name="json-rpc-1.0.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="junit-4.5.jar"/> - <include name="log4j-1.2.15.jar"/> - <include name="mail-1.4.jar"/> - <include name="mex-1.41-impl.jar"/> - <include name="neethi-2.0.4.jar"/> - <include name="opensaml-1.1.jar"/> - <include name="rampart-core-1.4.jar"/> - <include name="rampart-policy-1.4.jar"/> - <include name="rampart-trust-1.4.jar"/> - <include name="servlet-api-2.5.jar"/> - <include name="spring-beans-2.5.5.jar"/> - <include name="spring-context-2.5.5.jar"/> - <include name="spring-core-2.5.5.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="woden-api-1.0M8.jar"/> - <include name="woden-impl-dom-1.0M8.jar"/> - <include name="wsdl4j-1.6.2.jar"/> - <include name="wss4j-1.5.4.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - <include name="xalan-2.7.0.jar"/> - <include name="xercesImpl-2.8.1.jar"/> - <include name="xml-apis-1.3.03.jar"/> - <include name="xmlParserAPIs-2.6.0.jar"/> - <include name="xmlsec-1.4.2.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/pom.xml deleted file mode 100644 index 19262eeb89..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/pom.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-06-node</artifactId> - <name>Apache Tuscany SCA Tours Chapter 06 Node</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-launcher</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-domain-manager</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-node-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-widget-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-atom-abdera</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>launch.LaunchTutorialAdmin</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <!-- http://jira.codehaus.org/browse/SUREFIRE-322 --> - <version>2.3.1</version> - <configuration> - <useFile>false</useFile> - <trimStackTrace>false</trimStackTrace> - <useSystemClassLoader>true</useSystemClassLoader> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unpack</id> - <phase>test-compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.ode</groupId> - <artifactId>ode-dao-jpa-ojpa-derby</artifactId> - <version>1.1</version> - <type>zip</type> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/test-classes/</outputDirectory> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/src/main/java/scatours/LaunchBPELExampleNode.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/src/main/java/scatours/LaunchBPELExampleNode.java deleted file mode 100644 index e87b0ca44e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/src/main/java/scatours/LaunchBPELExampleNode.java +++ /dev/null @@ -1,66 +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; - -import java.io.IOException; - -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -public class LaunchBPELExampleNode { - public static void main(String[] args) throws Exception { - LaunchBPELExampleNode.launchFromFileSystemDir(); - } - - // OK for development but you must launch the node from this module - public static void launchFromFileSystemDir(){ - SCANode node = null; - - try { - node = SCANodeFactory.newInstance().createSCANode("scatours.composite", - new SCAContribution("common", "../../shared-contributions/common-contribution/target/classes"), - new SCAContribution("currency", "../../shared-contributions/currency-contribution/target/classes"), - new SCAContribution("hotel", "../../shared-contributions/hotel-contribution/target/classes"), - new SCAContribution("flight", "../../shared-contributions/flight-contribution/target/classes"), - new SCAContribution("car", "../../shared-contributions/car-contribution/target/classes"), - new SCAContribution("trip", "../../shared-contributions/trip-contribution/target/classes"), - new SCAContribution("tripbooking", "../../shared-contributions/tripbooking-contribution/target/classes"), - new SCAContribution("travelcatalog", "../../shared-contributions/travelcatalog-contribution/target/classes"), - new SCAContribution("creditcardpayment", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/classes"), - new SCAContribution("emailgateway", "../../shared-contributions/emailgateway-contribution/target/classes"), - new SCAContribution("shoppingcart", "../../shared-contributions/shoppingcart-contribution/target/classes"), - new SCAContribution("scatours", "../../shared-contributions/scatours-contribution/target/classes"), - new SCAContribution("payment", "../payment-bpel-contribution/target/classes"), - new SCAContribution("ui", "../ui-bpel-contribution/target/classes")); - node.start(); - - System.out.println("Node started - Press enter to shutdown."); - try { - System.in.read(); - } catch (IOException e) {} - - node.stop(); - - } catch (Exception ex) { - System.out.println(ex.toString()); - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/src/main/java/scatours/LaunchSpringExampleNode.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/src/main/java/scatours/LaunchSpringExampleNode.java deleted file mode 100644 index 45c9be4bce..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/node/src/main/java/scatours/LaunchSpringExampleNode.java +++ /dev/null @@ -1,66 +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; - -import java.io.IOException; - -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -public class LaunchSpringExampleNode { - public static void main(String[] args) throws Exception { - LaunchSpringExampleNode.launchFromFileSystemDir(); - } - - // OK for development but you must launch the node from this module - public static void launchFromFileSystemDir(){ - SCANode node = null; - - try { - node = SCANodeFactory.newInstance().createSCANode("scatours.composite", - new SCAContribution("common", "../../shared-contributions/common-contribution/target/classes"), - new SCAContribution("currency", "../../shared-contributions/currency-contribution/target/classes"), - new SCAContribution("hotel", "../../shared-contributions/hotel-contribution/target/classes"), - new SCAContribution("flight", "../../shared-contributions/flight-contribution/target/classes"), - new SCAContribution("car", "../../shared-contributions/car-contribution/target/classes"), - new SCAContribution("trip", "../../shared-contributions/trip-contribution/target/classes"), - new SCAContribution("tripbooking", "../../shared-contributions/tripbooking-contribution/target/classes"), - new SCAContribution("travelcatalog", "../../shared-contributions/travelcatalog-contribution/target/classes"), - new SCAContribution("creditcardpayment", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/classes"), - new SCAContribution("emailgateway", "../../shared-contributions/emailgateway-contribution/target/classes"), - new SCAContribution("shoppingcart", "../../shared-contributions/shoppingcart-contribution/target/classes"), - new SCAContribution("scatours", "../../shared-contributions/scatours-contribution/target/classes"), - new SCAContribution("payment", "../payment-spring-annotation-contribution/target/classes"), - new SCAContribution("ui", "../ui-spring-contribution/target/classes")); - node.start(); - - System.out.println("Node started - Press enter to shutdown."); - try { - System.in.read(); - } catch (IOException e) {} - - node.stop(); - - } catch (Exception ex) { - System.out.println(ex.toString()); - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/log4j.properties b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/log4j.properties deleted file mode 100644 index 7ed0bcaf77..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/log4j.properties +++ /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. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=DEBUG -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/pom.xml deleted file mode 100644 index 8cfe95771a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/pom.xml +++ /dev/null @@ -1,181 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-06-payment-bpel-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 06 Payment BPEL Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-bpel-ode</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-emailgateway-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-creditcard-payment-jaxb-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>scatours.payment</packageName> - <wsdlDirectory>${basedir}/src/main/resources - </wsdlDirectory> - <wsdlFiles> - <wsdlFile>Payment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source - </sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <!-- http://jira.codehaus.org/browse/SUREFIRE-322 --> - <version>2.3.1</version> - <configuration> - <useFile>false</useFile> - <trimStackTrace>false</trimStackTrace> - <useSystemClassLoader>true</useSystemClassLoader> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unpack</id> - <phase>test-compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.ode</groupId> - <artifactId>ode-dao-jpa-ojpa-derby</artifactId> - <version>1.1</version> - <type>zip</type> - <overWrite>true</overWrite> - <outputDirectory>${project.build.directory}/classes/</outputDirectory> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 22ef6de317..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,117 +0,0 @@ -<?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. ---> -<wsdl:definitions name="CreditCardPayment" - targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/" - elementFormDefault="unqualified"> - - <xsd:element name="authorize" type="tns:AuthorizeType"/> - <xsd:complexType name="AuthorizeType"> - <xsd:sequence> - <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/> - <xsd:complexType name="AuthorizeResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="CreditCardDetailsType"> - <xsd:sequence> - <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" /> - <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" /> - <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" /> - <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" /> - <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" /> - <xsd:element name="CVV2" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="CreditCardTypeType"> - <xsd:restriction base="xsd:token"> - <xsd:enumeration value="Visa" /> - <xsd:enumeration value="MasterCard" /> - <xsd:enumeration value="Discover" /> - <xsd:enumeration value="Amex" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="PayerType"> - <xsd:sequence> - <xsd:element name="Name" type="xsd:string" /> - <xsd:element name="Address" type="tns:AddressType" /> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="AddressType"> - <xsd:sequence> - <xsd:element name="Street" type="xsd:string" /> - <xsd:element name="City" type="xsd:string" /> - <xsd:element name="State" type="xsd:string" /> - <xsd:element name="ZipCode" type="xsd:string" /> - <xsd:element name="HomePhone" type="xsd:string" /> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="AuthorizeRequest"> - <wsdl:part name="parameters" element="tns:authorize"></wsdl:part> - </wsdl:message> - <wsdl:message name="AuthorizeResponse"> - <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="CreditCardPayment"> - <wsdl:operation name="authorize"> - <wsdl:input message="tns:AuthorizeRequest"></wsdl:input> - <wsdl:output message="tns:AuthorizeResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="authorize"> - <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="CreditCardPaymentService"> - <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding"> - <soap:address location="http://localhost:8081/CreditCardPayment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="CreditCardPaymentLinkType"> - <plnk:role name="forward" portType="tns:CreditCardPayment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/EmailGateway.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/EmailGateway.wsdl +++ /dev/null @@ -1,89 +0,0 @@ -<?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. ---> -<wsdl:definitions name="EmailGateway" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/"> - - <xsd:element name="sendEmail" type="tns:SendEmailType"/> - <xsd:complexType name="SendEmailType"> - <xsd:sequence> - <xsd:element name="Email" type="tns:EmailType"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="sendEmailResponse" type="tns:SendEmailResponseType"/> - <xsd:complexType name="SendEmailResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="EmailType"> - <xsd:sequence> - <xsd:element name="To" type="xsd:string"/> - <xsd:element name="Title" type="xsd:string"/> - <xsd:element name="Body" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="SendEmailRequest"> - <wsdl:part name="parameters" element="tns:sendEmail"></wsdl:part> - </wsdl:message> - <wsdl:message name="SendEmailResponse"> - <wsdl:part name="parameters" element="tns:sendEmailResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="EmailGateway"> - <wsdl:operation name="sendEmail"> - <wsdl:input message="tns:SendEmailRequest"></wsdl:input> - <wsdl:output message="tns:SendEmailResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="EmailGatwayBinding" type="tns:EmailGateway"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="sendEmail"> - <soap:operation soapAction="http://www.tuscanyscatours.com/EmailGateway/sendEmail" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="EmailGatewayService"> - <wsdl:port name="EmailGatewayPort" binding="tns:EmailGatwayBinding"> - <soap:address location="http://localhost:8082/EmailGateway" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="EmailGatewayLinkType"> - <plnk:role name="forward" portType="tns:EmailGateway"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 725c95a2bd..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export namespace="http://www.tuscanyscatours.com/Payment"/> - <export namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/Payment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/Payment.wsdl +++ /dev/null @@ -1,83 +0,0 @@ -<?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. ---> -<wsdl:definitions name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/"> - - <xsd:complexType name="MakePaymentMemberType"> - <xsd:sequence> - <xsd:element name="CustomerId" type="xsd:string"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMember" type="tns:MakePaymentMemberType"/> - - <xsd:complexType name="MakePaymentMemberResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMemberResponse" type="tns:MakePaymentMemberResponseType"/> - - </xsd:schema> - </wsdl:types> - <wsdl:message name="MakePaymentMemberRequest"> - <wsdl:part name="parameters" element="tns:makePaymentMember"></wsdl:part> - </wsdl:message> - <wsdl:message name="MakePaymentMemberResponse"> - <wsdl:part name="parameters" element="tns:makePaymentMemberResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="Payment"> - <wsdl:operation name="makePaymentMember"> - <wsdl:input message="tns:MakePaymentMemberRequest"></wsdl:input> - <wsdl:output message="tns:MakePaymentMemberResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="PaymentBinding" type="tns:Payment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="makePaymentMember"> - <soap:operation soapAction="http://www.tuscanyscatours.com/Payment/makePayment" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="PaymentService"> - <wsdl:port name="PaymentPort" binding="tns:PaymentBinding"> - <soap:address location="http://localhost:8080/Payment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="PaymentLinkType"> - <plnk:role name="forward" portType="tns:Payment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/payment.bpel b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/payment.bpel deleted file mode 100644 index 8f11d76888..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/main/resources/payment.bpel +++ /dev/null @@ -1,164 +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. - --> -<process name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment" - xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:tns="http://tuscany.apache.org/Payment" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:pp="http://www.tuscanyscatours.com/Payment/" - xmlns:ccp="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:eg="http://www.tuscanyscatours.com/EmailGateway/" - queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" - expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"> - - <import location="Payment.wsdl" - importType="http://schemas.xmlsoap.org/wsdl/" - namespace="http://www.tuscanyscatours.com/Payment/"/> - - <import location="CreditCardPayment.wsdl" - importType="http://schemas.xmlsoap.org/wsdl/" - namespace="http://www.tuscanyscatours.com/CreditCardPayment/"/> - - <import location="EmailGateway.wsdl" - importType="http://schemas.xmlsoap.org/wsdl/" - namespace="http://www.tuscanyscatours.com/EmailGateway/"/> - - <partnerLinks> - <partnerLink name="paymentPartnerLink" partnerLinkType="pp:PaymentLinkType" myRole="forward" /> - <partnerLink name="creditCardPaymentPartnerLink" partnerLinkType="ccp:CreditCardPaymentLinkType" partnerRole="forward" initializePartnerRole="yes" /> - <partnerLink name="emailGatewayPartnerLink" partnerLinkType="eg:EmailGatewayLinkType" partnerRole="forward" initializePartnerRole="yes" /> - </partnerLinks> - - <variables> - <variable name="makePaymentMemberRequestMessage" messageType="pp:MakePaymentMemberRequest"/> - <variable name="makePaymentMemberResponseMessage" messageType="pp:MakePaymentMemberResponse"/> - <variable name="authorizeRequestMessage" messageType="ccp:AuthorizeRequest"/> - <variable name="authorizeResponseMessage" messageType="ccp:AuthorizeResponse"/> - <variable name="sendEmailRequestMessage" messageType="eg:SendEmailRequest"/> - <variable name="sendEmailResponseMessage" messageType="eg:SendEmailResponse"/> - </variables> - - <sequence> - <receive name="start" - partnerLink="paymentPartnerLink" - portType="pp:Payment" - operation="makePaymentMember" - variable="makePaymentMemberRequestMessage" - createInstance="yes"/> - - <!-- set up call to payments service --> - <assign name="assign1"> - <copy> - <from> - <literal> - <authorize xmlns="http://www.tuscanyscatours.com/CreditCardPayment/"> - <CreditCard xmlns=""> - <CreditCardType>Visa</CreditCardType> - <CreditCardNumber>12345678</CreditCardNumber> - <ExpMonth>2</ExpMonth> - <ExpYear>2010</ExpYear> - <CardOwner> - <Name>Empty</Name> - <Address> - <Street>1 The Road</Street> - <City>Winchester</City> - <State>Hampshire</State> - <ZipCode>AB1 2CD</ZipCode> - <HomePhone>12345678</HomePhone> - </Address> - </CardOwner> - </CreditCard> - <Amount xmlns="">0.0</Amount> - </authorize> - </literal> - </from> - <to>$authorizeRequestMessage.parameters</to> - </copy> - <copy> - <from>$makePaymentMemberRequestMessage.parameters/CustomerId/text()</from> - <to>$authorizeRequestMessage.parameters/CreditCard/CardOwner/Name</to> - </copy> - <copy> - <from>$makePaymentMemberRequestMessage.parameters/Amount/text()</from> - <to>$authorizeRequestMessage.parameters/Amount</to> - </copy> - </assign> - - <invoke name="invokeCreditCardPayment" - operation="authorize" - inputVariable="authorizeRequestMessage" - outputVariable="authorizeResponseMessage" - partnerLink="creditCardPaymentPartnerLink" - portType="ccp:CreditCardPayment" /> - - <!-- set up call to email gateway service --> - <assign name="assign2"> - <copy> - <from> - <literal> - <sendEmail xmlns="http://www.tuscanyscatours.com/EmailGateway/"> - <Email xmlns=""> - <To>Default</To> - <Title>Payment Confirmation</Title> - <Body>Your payment has been confirmed</Body> - </Email> - </sendEmail> - </literal> - </from> - <to>$sendEmailRequestMessage.parameters</to> - </copy> - <copy> - <from>$makePaymentMemberRequestMessage.parameters/CustomerId/text()</from> - <to>$sendEmailRequestMessage.parameters/Email/To</to> - </copy> - </assign> - - <!-- call the email gateway to send a confirmation --> - <invoke name="invokeEmailGateway" - operation="sendEmail" - inputVariable="sendEmailRequestMessage" - outputVariable="sendEmailResponseMessage" - partnerLink="emailGatewayPartnerLink" - portType="eg:EmailGateway" /> - - <!-- set up the response --> - <assign name="assign3"> - <copy> - <from> - <literal> - <makePaymentMemberResponse xmlns="http://www.tuscanyscatours.com/Payment"> - <Status xmlns="">OK</Status> - </makePaymentMemberResponse> - </literal> - </from> - <to>$makePaymentMemberResponseMessage.parameters</to> - </copy> - </assign> - - - <reply name="end" - partnerLink="paymentPartnerLink" - portType="pp:Payment" - operation="makePaymentMember" - variable="makePaymentMemberResponseMessage"> - </reply> - </sequence> -</process> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index a69c16a726..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java +++ /dev/null @@ -1,71 +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.payment; - -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; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class PaymentTestCase { - private static SCANode paymentNode; - private static SCANode creditCardNode; - private static SCANode emailGatewayNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - try { - creditCardNode = SCANodeFactory.newInstance().createSCANode("creditcard.composite", - new SCAContribution("creditcard", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/test-classes")); - emailGatewayNode = SCANodeFactory.newInstance().createSCANode("emailgateway.composite", - new SCAContribution("creditcard", "../../shared-contributions/emailgateway-contribution/target/test-classes")); - paymentNode = SCANodeFactory.newInstance().createSCANode("payment.composite", - new SCAContribution("payment-bpel", "./target/classes"), - new SCAContribution("payment-bpel-test", "./target/test-classes")); - - creditCardNode.start(); - emailGatewayNode.start(); - paymentNode.start(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @Test - public void testPayment() { - SCAClient client = (SCAClient) paymentNode; - Payment payment = client.getService(Payment.class, "PaymentClient"); - System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f)); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - paymentNode.stop(); - creditCardNode.stop(); - emailGatewayNode.stop(); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java deleted file mode 100644 index eaa7498e84..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java +++ /dev/null @@ -1,37 +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.payment.client; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import scatours.payment.Payment; - -@Service(Payment.class) -public class PaymentClientImpl implements Payment { - @Reference - protected Payment payment; - - public String makePaymentMember(String customerId, float amount) { - // Delegate the external web service - return payment.makePaymentMember(customerId, amount); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 4984ef0252..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import namespace="http://www.tuscanyscatours.com/Payment"/> - <import namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/resources/payment.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/resources/payment.composite deleted file mode 100644 index ab26a48b20..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-bpel-contribution/src/test/resources/payment.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment" - name="payment"> - - <component name="PaymentClient"> - <implementation.java class="scatours.payment.client.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - - <component name="Payment"> - <implementation.bpel process="pp:Payment"/> - <service name="paymentPartnerLink"> - <interface.wsdl interface="http://www.tuscanyscatours.com/Payment/#wsdl.interface(Payment)" /> - <binding.ws uri="http://localhost:8080/Payment" wsdlElement="http://www.tuscanyscatours.com/Payment/#wsdl.service(PaymentService)"/> - </service> - <reference name="creditCardPaymentPartnerLink"> - <binding.ws uri="http://localhost:8081/CreditCardPayment"/> - </reference> - <reference name="emailGatewayPartnerLink"> - <binding.ws uri="http://localhost:8082/EmailGateway"/> - </reference> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/pom.xml deleted file mode 100644 index 67882f6ddb..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/pom.xml +++ /dev/null @@ -1,166 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-payment-javascript-contribution</artifactId> - <name>Apache Tuscany SCA Tours Payment JavaScript Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-script</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>Payment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/payment.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>payment.creditcard</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment.creditcard</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>CreditCardPayment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/creditcard.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>emailgateway</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>scatours.emailgateway</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>EmailGateway.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/emailgateway.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 1813c77436..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,116 +0,0 @@ -<?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. ---> -<wsdl:definitions name="CreditCardPayment" - targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"> - - <xsd:element name="authorize" type="tns:AuthorizeType"/> - <xsd:complexType name="AuthorizeType"> - <xsd:sequence> - <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/> - <xsd:complexType name="AuthorizeResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="CreditCardDetailsType"> - <xsd:sequence> - <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" /> - <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" /> - <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" /> - <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" /> - <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" /> - <xsd:element name="CVV2" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="CreditCardTypeType"> - <xsd:restriction base="xsd:token"> - <xsd:enumeration value="Visa" /> - <xsd:enumeration value="MasterCard" /> - <xsd:enumeration value="Discover" /> - <xsd:enumeration value="Amex" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="PayerType"> - <xsd:sequence> - <xsd:element name="Name" type="xsd:string" /> - <xsd:element name="Address" type="tns:AddressType" /> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="AddressType"> - <xsd:sequence> - <xsd:element name="Street" type="xsd:string" /> - <xsd:element name="City" type="xsd:string" /> - <xsd:element name="State" type="xsd:string" /> - <xsd:element name="ZipCode" type="xsd:string" /> - <xsd:element name="HomePhone" type="xsd:string" /> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="AuthorizeRequest"> - <wsdl:part name="parameters" element="tns:authorize"></wsdl:part> - </wsdl:message> - <wsdl:message name="AuthorizeResponse"> - <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="CreditCardPayment"> - <wsdl:operation name="authorize"> - <wsdl:input message="tns:AuthorizeRequest"></wsdl:input> - <wsdl:output message="tns:AuthorizeResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="authorize"> - <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="CreditCardPaymentService"> - <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding"> - <soap:address location="http://localhost:8080/CreditCardPayment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="CreditCardPaymentLinkType"> - <plnk:role name="forward" portType="tns:CreditCardPayment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/EmailGateway.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/EmailGateway.wsdl +++ /dev/null @@ -1,89 +0,0 @@ -<?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. ---> -<wsdl:definitions name="EmailGateway" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/"> - - <xsd:element name="sendEmail" type="tns:SendEmailType"/> - <xsd:complexType name="SendEmailType"> - <xsd:sequence> - <xsd:element name="Email" type="tns:EmailType"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="sendEmailResponse" type="tns:SendEmailResponseType"/> - <xsd:complexType name="SendEmailResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="EmailType"> - <xsd:sequence> - <xsd:element name="To" type="xsd:string"/> - <xsd:element name="Title" type="xsd:string"/> - <xsd:element name="Body" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="SendEmailRequest"> - <wsdl:part name="parameters" element="tns:sendEmail"></wsdl:part> - </wsdl:message> - <wsdl:message name="SendEmailResponse"> - <wsdl:part name="parameters" element="tns:sendEmailResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="EmailGateway"> - <wsdl:operation name="sendEmail"> - <wsdl:input message="tns:SendEmailRequest"></wsdl:input> - <wsdl:output message="tns:SendEmailResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="EmailGatwayBinding" type="tns:EmailGateway"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="sendEmail"> - <soap:operation soapAction="http://www.tuscanyscatours.com/EmailGateway/sendEmail" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="EmailGatewayService"> - <wsdl:port name="EmailGatewayPort" binding="tns:EmailGatwayBinding"> - <soap:address location="http://localhost:8082/EmailGateway" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="EmailGatewayLinkType"> - <plnk:role name="forward" portType="tns:EmailGateway"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7adba24d58..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/Payment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/Payment.wsdl deleted file mode 100644 index 2519d7642e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/Payment.wsdl +++ /dev/null @@ -1,83 +0,0 @@ -<?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. ---> -<wsdl:definitions name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/"> - - <xsd:complexType name="MakePaymentMemberType"> - <xsd:sequence> - <xsd:element name="CustomerId" type="xsd:string"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMember" type="tns:MakePaymentMemberType"/> - - <xsd:complexType name="MakePaymentMemberResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMemberResponse" type="tns:MakePaymentMemberResponseType"/> - - </xsd:schema> - </wsdl:types> - <wsdl:message name="MakePaymentMemberRequest"> - <wsdl:part name="parameters" element="tns:makePaymentMember"></wsdl:part> - </wsdl:message> - <wsdl:message name="MakePaymentMemberResponse"> - <wsdl:part name="parameters" element="tns:makePaymentMemberResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="Payment"> - <wsdl:operation name="makePaymentMember"> - <wsdl:input message="tns:MakePaymentMemberRequest"></wsdl:input> - <wsdl:output message="tns:MakePaymentMemberResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="PaymentBinding" type="tns:Payment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="makePaymentMember"> - <soap:operation soapAction="http://www.tuscanyscatours.com/Payment/makePayment" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="PaymentService"> - <wsdl:port name="PaymentPort" binding="tns:PaymentBinding"> - <soap:address location="http://localhost:8083/Payment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="PaymentLinkType"> - <plnk:role name="forward" portType="tns:Payment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/payment.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/payment.composite deleted file mode 100644 index 9743f24ada..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/payment.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:c="http://scatours" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="payment"> - - <component name="PaymentClient"> - <implementation.java class="payment.client.PaymentClientImpl" /> - <reference name="payment" target="PaymentComponent"> - <interface.java interface="payment.Payment" /> - </reference> - </component> - - <component name="PaymentComponent"> - <t:implementation.script script="payment/PaymentImpl.groovy"/> - <service name="Payment"> - <interface.java interface="payment.Payment" /> - </service> - <reference name="emailGateway" target="EmailGatewayComponent"> - <interface.java interface="scatours.emailgateway.EmailGateway" /> - </reference> - <property name="processingCharge" type="xsd:float">9.73</property> - </component> - - <component name="EmailGatewayComponent"> - <implementation.java class="scatours.emailgateway.EmailGatewayImpl" /> - </component> -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/payment/PaymentImpl.groovy b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/payment/PaymentImpl.groovy deleted file mode 100644 index dab3003eed..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/main/resources/payment/PaymentImpl.groovy +++ /dev/null @@ -1,31 +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.
- */
-
-def makePaymentMember(customerId, amount) {
-
- def finalAmount = amount + processingCharge;
-
- scatours.emailgateway.EmailType email = new scatours.emailgateway.EmailType();
- email.setTo(customerId);
- email.setTitle("Payment " + finalAmount + " Received");
-
- emailGateway.sendEmail(email);
-
- return "Success";
-}
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/PaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/PaymentTestCase.java deleted file mode 100644 index 21bf6ff428..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/PaymentTestCase.java +++ /dev/null @@ -1,76 +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 payment; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class PaymentTestCase { - private static SCANode node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("payment.composite", Payment.class.getClassLoader()); - node.start(); - } - - @Test - public void testCreditCardPayment() { - SCAClient client = (SCAClient) node; - Payment payment = client.getService(Payment.class, "PaymentComponent"); - System.out.println(payment.makePaymentMember("Fred Bloggs", 100.00f)); - } - - @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 - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/client/PaymentClientImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/client/PaymentClientImpl.java deleted file mode 100644 index 556a699ad8..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/client/PaymentClientImpl.java +++ /dev/null @@ -1,37 +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 payment.client; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import payment.Payment; - -@Service(Payment.class) -public class PaymentClientImpl implements Payment { - @Reference - protected Payment payment; - - public String makePaymentMember(String customerId, float amount) { - // Delegate the external web service - return payment.makePaymentMember(customerId, amount); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java deleted file mode 100644 index ac05bf7359..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java +++ /dev/null @@ -1,41 +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 payment.creditcard; - -import org.osoa.sca.annotations.Service; - -@Service(CreditCardPayment.class) -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCardDetailsType creditCard, float amount) { - if (creditCard != null){ - System.out.println("Checking card: name = " + - creditCard.getCardOwner().getName() + - " number = " + - creditCard.getCreditCardNumber() + - " for amount " + - amount); - } else { - System.out.println("Checking card is null"); - } - - return "OK"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/scatours/emailgateway/EmailGatewayImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/scatours/emailgateway/EmailGatewayImpl.java deleted file mode 100644 index 974c902f5d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-javascript-contribution/src/test/java/scatours/emailgateway/EmailGatewayImpl.java +++ /dev/null @@ -1,29 +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; - -public class EmailGatewayImpl implements EmailGateway { - - public String sendEmail(EmailType email) { - System.out.println("Sending mail " + email.getTitle() + " to " + email.getTo()); - return "SENT"; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/pom.xml deleted file mode 100644 index 3018bc651d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/pom.xml +++ /dev/null @@ -1,166 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-payment-spring-annotation-contribution</artifactId> - <name>Apache Tuscany SCA Tours Payment Spring Annotation Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>Payment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/payment.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>payment.creditcard</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment.creditcard</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>CreditCardPayment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/creditcard.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>scatours.emailgateway</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>scatours.emailgateway</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>EmailGateway.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/emailgateway.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/java/payment/PaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/java/payment/PaymentImpl.java deleted file mode 100644 index 68e941e138..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/java/payment/PaymentImpl.java +++ /dev/null @@ -1,78 +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 payment; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import payment.creditcard.CreditCardDetailsType; -import payment.creditcard.CreditCardPayment; -import payment.creditcard.CreditCardTypeType; -import payment.creditcard.ObjectFactory; -import payment.creditcard.PayerType; -import scatours.emailgateway.EmailGateway; -import scatours.emailgateway.EmailType; - -@Service(Payment.class) -public class PaymentImpl implements Payment { - - protected CreditCardPayment creditCardPayment; - protected EmailGateway emailGateway; - protected float processingCharge = 0; - - @Reference - public void setCreditCardPayment(CreditCardPayment creditCardPayment) { - this.creditCardPayment = creditCardPayment; - } - - public void setEmailGateway(EmailGateway emailGateway) { - this.emailGateway = emailGateway; - } - - @Property - public void setProcessingCharge(float processingCharge) { - this.processingCharge = processingCharge; - } - - public String makePaymentMember(String customerId, float amount) { - - ObjectFactory objectFactory = new ObjectFactory(); - CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType(); - ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa")); - PayerType ccOwner = objectFactory.createPayerType(); - ccOwner.setName(customerId); - ccDetails.setCardOwner(ccOwner); - - amount += processingCharge; - - String status = creditCardPayment.authorize(ccDetails, amount); - - scatours.emailgateway.ObjectFactory emailFactory = new scatours.emailgateway.ObjectFactory(); - EmailType email = emailFactory.createEmailType(); - email.setTitle("Payment Received"); - email.setTo(customerId); - - emailGateway.sendEmail(email); - - return status; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java deleted file mode 100644 index 644519a5e7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java +++ /dev/null @@ -1,29 +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; - -public class EmailGatewayImpl implements EmailGateway { - - public String sendEmail(EmailType email) { - System.out.println("Sending mail to " + email.getTo()); - return "SENT"; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index dbf89924cc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,116 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/">
-
- <xsd:element name="authorize" type="tns:AuthorizeType"/>
- <xsd:complexType name="AuthorizeType">
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
- <xsd:complexType name="AuthorizeResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8080/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/EmailGateway.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/EmailGateway.wsdl +++ /dev/null @@ -1,89 +0,0 @@ -<?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. ---> -<wsdl:definitions name="EmailGateway" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/"> - - <xsd:element name="sendEmail" type="tns:SendEmailType"/> - <xsd:complexType name="SendEmailType"> - <xsd:sequence> - <xsd:element name="Email" type="tns:EmailType"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="sendEmailResponse" type="tns:SendEmailResponseType"/> - <xsd:complexType name="SendEmailResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="EmailType"> - <xsd:sequence> - <xsd:element name="To" type="xsd:string"/> - <xsd:element name="Title" type="xsd:string"/> - <xsd:element name="Body" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="SendEmailRequest"> - <wsdl:part name="parameters" element="tns:sendEmail"></wsdl:part> - </wsdl:message> - <wsdl:message name="SendEmailResponse"> - <wsdl:part name="parameters" element="tns:sendEmailResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="EmailGateway"> - <wsdl:operation name="sendEmail"> - <wsdl:input message="tns:SendEmailRequest"></wsdl:input> - <wsdl:output message="tns:SendEmailResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="EmailGatwayBinding" type="tns:EmailGateway"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="sendEmail"> - <soap:operation soapAction="http://www.tuscanyscatours.com/EmailGateway/sendEmail" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="EmailGatewayService"> - <wsdl:port name="EmailGatewayPort" binding="tns:EmailGatwayBinding"> - <soap:address location="http://localhost:8082/EmailGateway" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="EmailGatewayLinkType"> - <plnk:role name="forward" portType="tns:EmailGateway"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 896b1ceb48..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment"/> - <export.java package="scatours.emailgateway"/> - <export namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/Payment-context.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/Payment-context.xml deleted file mode 100644 index 6942649d8a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/Payment-context.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?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="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> - - <sca:service name="Payment" - type="payment.Payment" - target="Payment"/> - - <bean id="Payment" class="payment.PaymentImpl"> - <property name="creditCardPayment" ref="creditCardPayment"/> - <property name="emailGateway" ref="EmailGateway"/> - <property name="processingCharge" ref="processingCharge"/> - </bean> - - <bean id="EmailGateway" class="scatours.emailgateway.EmailGatewayImpl"> - </bean> - - <sca:reference name="creditCardPayment" - type="payment.creditcard.CreditCardPayment"/> - - <sca:property name="processingCharge" - type="java.lang.Float"/> -</beans> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/Payment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/main/resources/Payment.wsdl +++ /dev/null @@ -1,83 +0,0 @@ -<?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. ---> -<wsdl:definitions name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/"> - - <xsd:complexType name="MakePaymentMemberType"> - <xsd:sequence> - <xsd:element name="CustomerId" type="xsd:string"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMember" type="tns:MakePaymentMemberType"/> - - <xsd:complexType name="MakePaymentMemberResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMemberResponse" type="tns:MakePaymentMemberResponseType"/> - - </xsd:schema> - </wsdl:types> - <wsdl:message name="MakePaymentMemberRequest"> - <wsdl:part name="parameters" element="tns:makePaymentMember"></wsdl:part> - </wsdl:message> - <wsdl:message name="MakePaymentMemberResponse"> - <wsdl:part name="parameters" element="tns:makePaymentMemberResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="Payment"> - <wsdl:operation name="makePaymentMember"> - <wsdl:input message="tns:MakePaymentMemberRequest"></wsdl:input> - <wsdl:output message="tns:MakePaymentMemberResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="PaymentBinding" type="tns:Payment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="makePaymentMember"> - <soap:operation soapAction="http://www.tuscanyscatours.com/Payment/makePayment" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="PaymentService"> - <wsdl:port name="PaymentPort" binding="tns:PaymentBinding"> - <soap:address location="http://localhost:8080/Payment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="PaymentLinkType"> - <plnk:role name="forward" portType="tns:Payment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/java/payment/PaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/java/payment/PaymentTestCase.java deleted file mode 100644 index 5e47c9075e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/java/payment/PaymentTestCase.java +++ /dev/null @@ -1,73 +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 payment; - -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; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class PaymentTestCase { - private static SCANode paymentNode; - private static SCANode creditCardNode; - private static SCANode emailGatewayNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - try { - creditCardNode = SCANodeFactory.newInstance().createSCANode("creditcard.composite", - new SCAContribution("creditcard", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/classes"), - new SCAContribution("creditcard-test", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/test-classes")); - //emailGatewayNode = SCANodeFactory.newInstance().createSCANode("emailgateway.composite", - // new SCAContribution("creditcard", "../../shared-contributions/emailgateway-contribution/target/classes"), - // new SCAContribution("creditcard-test", "../../shared-contributions/emailgateway-contribution/target/test-classes")); - paymentNode = SCANodeFactory.newInstance().createSCANode("payment.composite", - new SCAContribution("payment-spring", "./target/classes"), - new SCAContribution("payment-spring-test", "./target/test-classes")); - - creditCardNode.start(); - //emailGatewayNode.start(); - paymentNode.start(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @Test - public void testPayment() { - SCAClient client = (SCAClient) paymentNode; - Payment payment = client.getService(Payment.class, "PaymentClient"); - System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f)); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - paymentNode.stop(); - creditCardNode.stop(); - //emailGatewayNode.stop(); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/java/payment/client/PaymentClientImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/java/payment/client/PaymentClientImpl.java deleted file mode 100644 index 556a699ad8..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/java/payment/client/PaymentClientImpl.java +++ /dev/null @@ -1,37 +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 payment.client; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import payment.Payment; - -@Service(Payment.class) -public class PaymentClientImpl implements Payment { - @Reference - protected Payment payment; - - public String makePaymentMember(String customerId, float amount) { - // Delegate the external web service - return payment.makePaymentMember(customerId, amount); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 92de8d375b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="payment"/> - <import.java package="scatours.emailgateway"/> - <import namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/resources/payment.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/resources/payment.composite deleted file mode 100644 index aeb9a3e413..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-annotation-contribution/src/test/resources/payment.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment" - name="payment"> - - <component name="PaymentClient"> - <implementation.java class="payment.client.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - - <component name="PaymentComponent"> - <implementation.spring location="Payment-context.xml"/> - <service name="Payment"> - <interface.wsdl interface="http://www.tuscanyscatours.com/Payment/#wsdl.interface(Payment)" /> - <binding.ws uri="http://localhost:8080/Payment" wsdlElement="http://www.tuscanyscatours.com/Payment/#wsdl.service(PaymentService)"/> - </service> - <reference name="creditCardPayment"> - <binding.ws uri="http://localhost:8081/CreditCardPayment"/> - </reference> - <!--reference name="emailGateway"> - <binding.ws uri="http://localhost:8082/EmailGateway"/> - </reference--> - <property name="processingCharge">9.73</property> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/pom.xml deleted file mode 100644 index 299b989cca..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/pom.xml +++ /dev/null @@ -1,184 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-payment-spring-contribution</artifactId> - <name>Apache Tuscany SCA Tours Payment Spring Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <!-- dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>2.5.5</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>2.5.5</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>2.5.5</version> - </dependency--> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>Payment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/payment.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>payment.creditcard</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment.creditcard</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>CreditCardPayment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/creditcard.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>scatours.emailgateway</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>scatours.emailgateway</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>EmailGateway.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/emailgateway.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/java/payment/PaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/java/payment/PaymentImpl.java deleted file mode 100644 index 48f829ae0f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/java/payment/PaymentImpl.java +++ /dev/null @@ -1,64 +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 payment; - -import payment.creditcard.CreditCardDetailsType; -import payment.creditcard.CreditCardPayment; -import payment.creditcard.CreditCardTypeType; -import payment.creditcard.ObjectFactory; -import payment.creditcard.PayerType; -import scatours.emailgateway.EmailGateway; -import scatours.emailgateway.EmailType; - -public class PaymentImpl implements Payment { - - private CreditCardPayment creditCardPayment; - private EmailGateway emailGateway; - - public void setCreditCardPayment(CreditCardPayment creditCardPayment) { - this.creditCardPayment = creditCardPayment; - } - - public void setEmailGateway(EmailGateway emailGateway) { - this.emailGateway = emailGateway; - } - - public String makePaymentMember(String customerId, float amount) { - - ObjectFactory objectFactory = new ObjectFactory(); - CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType(); - ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa")); - PayerType ccOwner = objectFactory.createPayerType(); - ccOwner.setName(customerId); - ccDetails.setCardOwner(ccOwner); - - String status = creditCardPayment.authorize(ccDetails, amount); - - scatours.emailgateway.ObjectFactory emailFactory = new scatours.emailgateway.ObjectFactory(); - EmailType email = emailFactory.createEmailType(); - email.setTitle("Payment Received"); - email.setTo(customerId); - - emailGateway.sendEmail(email); - - return status; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java deleted file mode 100644 index 644519a5e7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java +++ /dev/null @@ -1,29 +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; - -public class EmailGatewayImpl implements EmailGateway { - - public String sendEmail(EmailType email) { - System.out.println("Sending mail to " + email.getTo()); - return "SENT"; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index dbf89924cc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,116 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/">
-
- <xsd:element name="authorize" type="tns:AuthorizeType"/>
- <xsd:complexType name="AuthorizeType">
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
- <xsd:complexType name="AuthorizeResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8080/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/EmailGateway.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/EmailGateway.wsdl +++ /dev/null @@ -1,89 +0,0 @@ -<?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. ---> -<wsdl:definitions name="EmailGateway" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/EmailGateway/" - xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/"> - - <xsd:element name="sendEmail" type="tns:SendEmailType"/> - <xsd:complexType name="SendEmailType"> - <xsd:sequence> - <xsd:element name="Email" type="tns:EmailType"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="sendEmailResponse" type="tns:SendEmailResponseType"/> - <xsd:complexType name="SendEmailResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="EmailType"> - <xsd:sequence> - <xsd:element name="To" type="xsd:string"/> - <xsd:element name="Title" type="xsd:string"/> - <xsd:element name="Body" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="SendEmailRequest"> - <wsdl:part name="parameters" element="tns:sendEmail"></wsdl:part> - </wsdl:message> - <wsdl:message name="SendEmailResponse"> - <wsdl:part name="parameters" element="tns:sendEmailResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="EmailGateway"> - <wsdl:operation name="sendEmail"> - <wsdl:input message="tns:SendEmailRequest"></wsdl:input> - <wsdl:output message="tns:SendEmailResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="EmailGatwayBinding" type="tns:EmailGateway"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="sendEmail"> - <soap:operation soapAction="http://www.tuscanyscatours.com/EmailGateway/sendEmail" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="EmailGatewayService"> - <wsdl:port name="EmailGatewayPort" binding="tns:EmailGatwayBinding"> - <soap:address location="http://localhost:8082/EmailGateway" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="EmailGatewayLinkType"> - <plnk:role name="forward" portType="tns:EmailGateway"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 78a5d851f9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment"/> - <export namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/Payment-context.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/Payment-context.xml deleted file mode 100644 index e786e15d55..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/Payment-context.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:sca="http://www.springframework.org/schema/sca" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <bean id="Payment" class="payment.PaymentImpl"> - <property name="creditCardPayment" ref="creditCardPaymentReference"/> - <property name="emailGateway" ref="EmailGateway"/> - </bean> - - <bean id="EmailGateway" class="scatours.emailgateway.EmailGatewayImpl"> - </bean> - -</beans> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/Payment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/main/resources/Payment.wsdl +++ /dev/null @@ -1,83 +0,0 @@ -<?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. ---> -<wsdl:definitions name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/"> - - <xsd:complexType name="MakePaymentMemberType"> - <xsd:sequence> - <xsd:element name="CustomerId" type="xsd:string"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMember" type="tns:MakePaymentMemberType"/> - - <xsd:complexType name="MakePaymentMemberResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMemberResponse" type="tns:MakePaymentMemberResponseType"/> - - </xsd:schema> - </wsdl:types> - <wsdl:message name="MakePaymentMemberRequest"> - <wsdl:part name="parameters" element="tns:makePaymentMember"></wsdl:part> - </wsdl:message> - <wsdl:message name="MakePaymentMemberResponse"> - <wsdl:part name="parameters" element="tns:makePaymentMemberResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="Payment"> - <wsdl:operation name="makePaymentMember"> - <wsdl:input message="tns:MakePaymentMemberRequest"></wsdl:input> - <wsdl:output message="tns:MakePaymentMemberResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="PaymentBinding" type="tns:Payment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="makePaymentMember"> - <soap:operation soapAction="http://www.tuscanyscatours.com/Payment/makePayment" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="PaymentService"> - <wsdl:port name="PaymentPort" binding="tns:PaymentBinding"> - <soap:address location="http://localhost:8080/Payment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="PaymentLinkType"> - <plnk:role name="forward" portType="tns:Payment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/java/payment/PaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/java/payment/PaymentTestCase.java deleted file mode 100644 index 8046e8b2cd..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/java/payment/PaymentTestCase.java +++ /dev/null @@ -1,73 +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 payment; - -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; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class PaymentTestCase { - private static SCANode paymentNode; - private static SCANode creditCardNode; - private static SCANode emailGatewayNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - try { - creditCardNode = SCANodeFactory.newInstance().createSCANode("creditcard.composite", - new SCAContribution("creditcard", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/classes"), - new SCAContribution("creditcard-test", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/test-classes")); - emailGatewayNode = SCANodeFactory.newInstance().createSCANode("emailgateway.composite", - new SCAContribution("creditcard", "../../shared-contributions/emailgateway-contribution/target/classes"), - new SCAContribution("creditcard-test", "../../shared-contributions/emailgateway-contribution/target/test-classes")); - paymentNode = SCANodeFactory.newInstance().createSCANode("payment.composite", - new SCAContribution("payment-spring", "./target/classes"), - new SCAContribution("payment-spring-test", "./target/test-classes")); - - creditCardNode.start(); - emailGatewayNode.start(); - paymentNode.start(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @Test - public void testPayment() { - SCAClient client = (SCAClient) paymentNode; - Payment payment = client.getService(Payment.class, "PaymentClient"); - System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f)); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - paymentNode.stop(); - creditCardNode.stop(); - emailGatewayNode.stop(); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/java/payment/client/PaymentClientImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/java/payment/client/PaymentClientImpl.java deleted file mode 100644 index 556a699ad8..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/java/payment/client/PaymentClientImpl.java +++ /dev/null @@ -1,37 +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 payment.client; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import payment.Payment; - -@Service(Payment.class) -public class PaymentClientImpl implements Payment { - @Reference - protected Payment payment; - - public String makePaymentMember(String customerId, float amount) { - // Delegate the external web service - return payment.makePaymentMember(customerId, amount); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 4e61a2f127..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/resources/payment.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/resources/payment.composite deleted file mode 100644 index 52deda7a18..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/payment-spring-contribution/src/test/resources/payment.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment" - name="payment"> - - <component name="PaymentClient"> - <implementation.java class="payment.client.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - - <component name="PaymentComponent"> - <implementation.spring location="Payment-context.xml"/> - <service name="Payment"> - <interface.wsdl interface="http://www.tuscanyscatours.com/Payment/#wsdl.interface(Payment)" /> - <binding.ws uri="http://localhost:8080/Payment" wsdlElement="http://www.tuscanyscatours.com/Payment/#wsdl.service(PaymentService)"/> - </service> - <reference name="creditCardPaymentReference"> - <binding.ws uri="http://localhost:8081/CreditCardPayment"/> - </reference> - <!--reference name="emailGateway"> - <binding.ws uri="http://localhost:8082/EmailGateway"/> - </reference--> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/pom.xml deleted file mode 100644 index 605a362c31..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-06</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 06 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>node</module> - <module>payment-bpel-contribution</module> - <module>payment-spring-contribution</module> - <module>payment-spring-annotation-contribution</module> - <module>payment-javascript-contribution</module> - <module>ui-bpel-contribution</module> - <module>ui-spring-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/build.xml deleted file mode 100644 index 37b6800014..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/build.xml +++ /dev/null @@ -1,117 +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. ---> - -<project name="scatours-chapter-06-ui-bpel-contribution" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - <fileset dir="src\main\resources"/> - </copy> - <jar destfile="target/scatours-chapter-06-ui-bpel-contribution.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="launch.LaunchTutorialAdmin" fork="true"> - <classpath> - <pathelement location="target/scatours-chapter-06-ui-bpel-contribution.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.4.2.jar"/> - <include name="activation-1.1.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="axiom-api-1.2.7.jar"/> - <include name="axiom-impl-1.2.7.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="commons-logging-1.1.1.jar"/> - <include name="geronimo-activation_1.1_spec-1.0.1.jar"/> - <include name="geronimo-javamail_1.4_spec-1.2.jar"/> - <include name="geronimo-stax-api_1.0_spec-1.0.1.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxen-1.1.1.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/pom.xml deleted file mode 100644 index 448bd8a96f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-06-ui-bpel-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 06 User Interface Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>launch.LaunchTutorialAdmin</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b3de1910d1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:scatours="http://scatours"> - <deployable composite="scatours:scatours"/> - <import.java package="scatours.common"/> - <import.java package="scatours.currencyconverter"/> - <import.java package="scatours.hotel"/> - <import.java package="scatours.flight"/> - <import.java package="scatours.car"/> - <import.java package="scatours.trip"/> - <import.java package="scatours.tripbooking"/> - <import.java package="scatours.travelcatalog"/> - <import.java package="payment.creditcard"/> - <import.java package="scatours.emailgateway"/> - <import.java package="scatours.shoppingcart"/> - <import.java package="scatours"/> - <import namespace="http://www.tuscanyscatours.com/Payment"/> - <import namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.composite deleted file mode 100644 index 4b5290b910..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.composite +++ /dev/null @@ -1,178 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:scatours="http://scatours" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - name="scatours"> - - <component name="UserInterfaceComponent"> - <tuscany:implementation.widget location="scatours.html"/> - <service name="Widget"> - <tuscany:binding.http uri="/scatours"/> - </service> - <reference name="scaToursCatalog" target="SCAToursComponent/SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursBooking" target="SCAToursComponent/SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursCart" target="SCAToursComponent/SCAToursCart"> - <tuscany:binding.jsonrpc/> - </reference> - </component> - - <component name="SCAToursComponent"> - <implementation.java class="scatours.SCAToursImpl"/> - <service name="SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursCart"> - <tuscany:binding.jsonrpc/> - </service> - <reference name="travelCatalogSearch" target="TravelCatalogComponent/TravelCatalogSearch"/> - <reference name="tripBooking" target="TripBookingComponent/TripBooking"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="TravelCatalogComponent"> - <implementation.java class="scatours.travelcatalog.TravelCatalogImpl"/> - <service name="TravelCatalogSearch"/> - <reference name="hotelSearch" target="HotelComponent/Search"> - <binding.sca/> - </reference> - <reference name="flightSearch"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </reference> - <reference name="carSearch" target="CarComponent/Search"> - <binding.sca/> - </reference> - <reference name="tripSearch" target="TripComponent/Search"> - <binding.sca/> - </reference> - <reference name="currencyConverter" target="CurrencyConverterComponent"> - </reference> - <property name="quoteCurrencyCode">GBP</property> - </component> - - <component name="TripBookingComponent"> - <implementation.java class="scatours.tripbooking.TripBookingImpl"/> - <service name="TripBooking"/> - <reference name="hotelBook" target="HotelComponent/Book"/> - <reference name="flightBook" target="TripComponent/Book"/> - <reference name="carBook" target="CarComponent/Book"/> - <reference name="tripBook" target="TripComponent/Book"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="HotelComponent"> - <implementation.java class="scatours.hotel.HotelImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="FlightComponent"> - <implementation.java class="scatours.flight.FlightImpl"/> - <service name="Search"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <tuscany:binding.jsonrpc/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </service> - <service name="Book"/> - </component> - - <component name="CarComponent"> - <implementation.java class="scatours.car.CarImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="TripComponent"> - <implementation.java class="scatours.trip.TripImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="CurrencyConverterComponent"> - <implementation.java class="scatours.currencyconverter.CurrencyConverterImpl"/> - <service name="CurrencyConverter"> - </service> - </component> - - <component name="ShoppingCartComponent"> - <implementation.java class="scatours.shoppingcart.ShoppingCartImpl"/> - <service name="ShoppingCart"> - </service> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - - <component name="PaymentComponent"> - <implementation.bpel process="pp:Payment"/> - <service name="paymentPartnerLink"> - <interface.wsdl interface="http://www.tuscanyscatours.com/Payment/#wsdl.interface(Payment)" /> - <binding.ws uri="http://localhost:8080/Payment" wsdlElement="http://www.tuscanyscatours.com/Payment/#wsdl.service(PaymentService)"/> - </service> - <reference name="creditCardPaymentPartnerLink"> - <binding.ws uri="http://localhost:8081/CreditCardPayment"/> - </reference> - <reference name="emailGatewayPartnerLink"> - <binding.ws uri="http://localhost:8082/EmailGateway"/> - </reference> - </component> - - <component name="CreditCardPayment"> - <implementation.java class="payment.creditcard.CreditCardPaymentImpl" /> - <service name="CreditCardPayment"> - <binding.ws uri="http://localhost:8081/CreditCardPayment" /> - </service> - </component> - - <component name="EmailGateway"> - <implementation.java class="scatours.emailgateway.EmailGatewayImpl" /> - <service name="EmailGateway"> - <binding.ws uri="http://localhost:8082/EmailGateway" /> - </service> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.html b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.html deleted file mode 100644 index b8e27e87fc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.html +++ /dev/null @@ -1,391 +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. ---> -<html> -<head> -<title>SCA Tours</title> - -<link rel="stylesheet" type="text/css" href="style.css" /> - -<script type="text/javascript" src="scatours.js"></script> - -<script language="JavaScript"> - - //@Reference - var scaToursCatalog = new Reference("scaToursCatalog"); - - //@Reference - var scaToursBooking = new Reference("scaToursBooking"); - - //@Reference - var scaToursCart = new Reference("scaToursCart"); - - //local state - var packagedItems; - var bespokeItems; - var cartId; - - //the constructor for trip leg beans - function TripLegType(id, - fromLocation, - toLocation, - fromDate, - toDate, - noOfPeople) { - this.id = id; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.noOfPeople = noOfPeople; - } - - function getTripLeg(){ - return new TripLegType(cartId, - document.searchForm.fromLocation.value, - document.searchForm.toLocation.value, - document.searchForm.fromDate.value, - document.searchForm.toDate.value, - document.searchForm.noOfPeople.value); - } - - //the constructor for bespoke trip beans - function TripType() { - this.id = cartId; - this.type = "Bespoke"; - this.tripItems = new Array(); - // json databinding can't tolerate having a class hint set as the - // databinding transformer is not in the right classloader to load - // the class pointed to by the hint - //this.javaClass = "scatours.common.TripItem"; - } - - function getTrip(){ - return new TripType(); - } - - // remove class hint from the trip object - // can also be used to limit the amount of - // data returned to the server - function copyTrip(trip){ - var tripCopy = new TripType(); - - tripCopy.id = trip.id; - tripCopy.tripId = trip.tripId; - tripCopy.type = trip.type; - tripCopy.name = trip.name; - tripCopy.description = trip.description; - tripCopy.location = trip.location; - tripCopy.fromDate = trip.fromDate; - tripCopy.toDate = trip.toDate; - tripCopy.price = trip.price; - tripCopy.currency = trip.currency; - tripCopy.link = trip.link; - - return tripCopy; - } - - function init() { - try { - newCart(); - } - catch(e) { - alert(e); - } - } - - function reset() { - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = ""; - document.getElementById('cartPrice').innerHTML = ""; - packagedItems = new Array(); - bespokeItems = new Array(); - } - - function newCart() { - scaToursCart.newCart(newCart_response); - reset(); - } - - function newCart_response(newCartId, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - cartId = newCartId - } - - function searchTravelCatalog() { - scaToursCatalog.search(getTripLeg(), search_response); - } - - function search_response(items, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - - var packagedHTML = '<h3>Packaged Trip Items</h3>'; - packagedHTML += '<table border="0">'; - packagedHTML += '<tr>'; - packagedHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - packagedHTML += '</tr>'; - - var bespokeHTML = '<h3>Bespoke Trip Items</h3>'; - bespokeHTML += '<table border="0">'; - bespokeHTML += '<tr>'; - bespokeHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - bespokeHTML += '</tr>'; - - for (var i=0; i<items.length; i++) { - if (items[i].type == "Trip") { - packagedHTML += '<tr>'; - packagedHTML += '<td><input onClick="processPackagedSelection()" name="packagedTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - packagedHTML += '<td>' + items[i].name + '</td>'; - packagedHTML += '<td>' + items[i].description + '</td>'; - packagedHTML += '<td>' + items[i].location + '</td>'; - packagedHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - packagedHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - packagedHTML += '</tr>'; - packagedItems.push(items[i]); - } else { - bespokeHTML += '<tr>'; - bespokeHTML += '<td><input onClick="processBespokeSelection()" name="bespokeTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - bespokeHTML += '<td>' + items[i].name + '</td>'; - bespokeHTML += '<td>' + items[i].description + '</td>'; - bespokeHTML += '<td>' + items[i].location + '</td>'; - bespokeHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - bespokeHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - bespokeHTML += '</tr>'; - bespokeItems.push(items[i]); - } - } - - packagedHTML += '</table>'; - packagedHTML += '<input type="button" onClick="bookPackagedTrip()" value="Book Packaged Trip">'; - - bespokeHTML += '<tr><td/><td/><td>Total Price</td><td/><td/><td><div id="bespokeTripPrice"></div> </td></tr>'; - bespokeHTML += '</table>'; - bespokeHTML += '<input type="button" onClick="bookBespokeTrip()" value="Book Bespoke Trip">'; - - if (packagedItems.length > 0){ - document.getElementById('packagedTripItems').innerHTML = packagedHTML; - } - - if (bespokeItems.length > 0){ - document.getElementById('bespokeTripItems').innerHTML = bespokeHTML; - } - } - - function processPackagedSelection() { - // do nothing at the moment - } - - function processBespokeSelection() { - // calculate total price - var items = document.getElementsByName("bespokeTripItemSelection"); - var totalPrice = 0.0; - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - totalPrice = totalPrice + bespokeItems[i].price; - } - } - document.getElementById('bespokeTripPrice').innerHTML = totalPrice + ' ' + bespokeItems[0]. currency; - } - - function bookPackagedTrip() { - // find first selected trip item - var trip = null; - var items = document.getElementsByName("packagedTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip = copyTrip(packagedItems[i]); - break; - } - } - - if (trip != null) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select a trip") - } - } - - function bookBespokeTrip() { - // create a trip object - var trip = getTrip(); - - // add selected trip items to trip - var items = document.getElementsByName("bespokeTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip.tripItems.push(copyTrip(bespokeItems[i])); - } - } - - if (trip.tripItems.length > 0) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select some trip items!") - } - } - - function getCartTrips() { - scaToursCart.getTrips(cartId, getCartTrips_response); - } - - function getCartTrips_response(trips, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - var itemsHTML = ''; - var totalPrice = 0.0; - - for (var x=0; x<trips.length; x++){ - itemsHTML += '<h3>Trip - ' + trips[x].id + '</h3>'; - itemsHTML += '<table border="0">'; - itemsHTML += '<tr>'; - itemsHTML += '<td>Booking Ref</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - itemsHTML += '</tr>'; - - if (trips[x].type == "Trip") { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + trips[x].bookingCode + '</td>'; - itemsHTML += '<td>' + trips[x].name + '</td>'; - itemsHTML += '<td>' + trips[x].description + '</td>'; - itemsHTML += '<td>' + trips[x].location + '</td>'; - itemsHTML += '<td>' + trips[x].fromDate + ' - ' + trips[x].toDate +'</td>'; - itemsHTML += '<td>' + trips[x].price + ' ' + trips[x].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + trips[x].price; - - } else { - var tripItems = trips[x].tripItems; - - for (var i=0; i<tripItems.length; i++) { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + tripItems[i].bookingCode + '</td>'; - itemsHTML += '<td>' + tripItems[i].name + '</td>'; - itemsHTML += '<td>' + tripItems[i].description + '</td>'; - itemsHTML += '<td>' + tripItems[i].location + '</td>'; - itemsHTML += '<td>' + tripItems[i].fromDate + ' - ' + tripItems[i].toDate +'</td>'; - itemsHTML += '<td>' + tripItems[i].price + ' ' + tripItems[i].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + tripItems[i].price; - } - } - - itemsHTML += '</table>'; - } - - document.getElementById('cartItems').innerHTML = itemsHTML; - document.getElementById('cartPrice').innerHTML = totalPrice + ' ' + trips[0].currency; - } - - function checkout() { - scaToursCart.checkout(cartId); - - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = "Thank you for shopping with SCA Tours"; - document.getElementById('cartPrice').innerHTML = ""; - searchResponseItems = null; - tripItems = null; - } - - function purchase() { - } - -</script> - -</head> - -<body onload="init()" background=""> - <img src="scatours.png" border="0" /> - <div id="scatours"> - <form name="searchForm"> - <h3>Search for trips, hotels, flights and cars</h3> - <br/> - <table border="0"> - <tr> - <td>From Location:</td> - <td><input type="text" name="fromLocation" value="LGW"></td> - <td>To Location:</td> - <td><input type="text" name="toLocation" value="FLR"></td> - </tr> - <tr> - <td>Start Date:</td> - <td><input type="text" name="fromDate" value="06/12/09"></td> - <td>End Date:</td> - <td><input type="text" name="toDate" value="13/12/09"></td> - </tr> - <tr> - <td>Number of people:</td> - <td><select name="noOfPeople"> - <option>1 - <option selected>2 - <option>3 - <option>4 - </select></td> - <td/> - <td/> - </tr> - </table> - <br/> - <input type="button" onClick="searchTravelCatalog()" value="Search"> - </form> - <form name="packagedTripForm"> - <div id="packagedTripItems"></div> - </form> - <form name="bespokeTripForm"> - <div id="bespokeTripItems"></div> - </form> - <form name="cartForm"> - <h3>Shopping Cart</h3> - <div id="cartItems"></div> - <br/> - Total Price: <div id="cartPrice"></div> - <br/> - <input type="button" onClick="checkout()" value="Checkout"> - </form> - </div> - -</body> -</html> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.odg b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.odg Binary files differdeleted file mode 100644 index 8ca8fbf133..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.odg +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.png b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.png Binary files differdeleted file mode 100644 index f68cd84704..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/scatours.png +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/style.css b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/style.css deleted file mode 100644 index 6e17c2747b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-bpel-contribution/src/main/resources/style.css +++ /dev/null @@ -1,135 +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. - */ - - - -/*******************************************/ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/build.xml deleted file mode 100644 index 68b3a3adf9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/build.xml +++ /dev/null @@ -1,117 +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. ---> - -<project name="scatours-ui-spring-contribution" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - <fileset dir="src\main\resources"/> - </copy> - <jar destfile="target/scatours-ui-spring-contribution.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="launch.LaunchTutorialAdmin" fork="true"> - <classpath> - <pathelement location="target/scatours-ui-spring-contribution.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.4.2.jar"/> - <include name="activation-1.1.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="axiom-api-1.2.7.jar"/> - <include name="axiom-impl-1.2.7.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="commons-logging-1.1.1.jar"/> - <include name="geronimo-activation_1.1_spec-1.0.1.jar"/> - <include name="geronimo-javamail_1.4_spec-1.2.jar"/> - <include name="geronimo-stax-api_1.0_spec-1.0.1.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxen-1.1.1.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/pom.xml deleted file mode 100644 index 42df0ab469..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-ui-spring-contribution</artifactId> - <name>Apache Tuscany SCA Tours User Interface Spring Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>launch.LaunchTutorialAdmin</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b3de1910d1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:scatours="http://scatours"> - <deployable composite="scatours:scatours"/> - <import.java package="scatours.common"/> - <import.java package="scatours.currencyconverter"/> - <import.java package="scatours.hotel"/> - <import.java package="scatours.flight"/> - <import.java package="scatours.car"/> - <import.java package="scatours.trip"/> - <import.java package="scatours.tripbooking"/> - <import.java package="scatours.travelcatalog"/> - <import.java package="payment.creditcard"/> - <import.java package="scatours.emailgateway"/> - <import.java package="scatours.shoppingcart"/> - <import.java package="scatours"/> - <import namespace="http://www.tuscanyscatours.com/Payment"/> - <import namespace="http://www.tuscanyscatours.com/Payment/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.composite deleted file mode 100644 index 9b21c2a9f2..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.composite +++ /dev/null @@ -1,169 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:scatours="http://scatours" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - name="scatours"> - - <component name="UserInterfaceComponent"> - <tuscany:implementation.widget location="scatours.html"/> - <service name="Widget"> - <tuscany:binding.http uri="/scatours"/> - </service> - <reference name="scaToursCatalog" target="SCAToursComponent/SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursBooking" target="SCAToursComponent/SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursCart" target="SCAToursComponent/SCAToursCart"> - <tuscany:binding.jsonrpc/> - </reference> - </component> - - <component name="SCAToursComponent"> - <implementation.java class="scatours.SCAToursImpl"/> - <service name="SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursCart"> - <tuscany:binding.jsonrpc/> - </service> - <reference name="travelCatalogSearch" target="TravelCatalogComponent/TravelCatalogSearch"/> - <reference name="tripBooking" target="TripBookingComponent/TripBooking"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="TravelCatalogComponent"> - <implementation.java class="scatours.travelcatalog.TravelCatalogImpl"/> - <service name="TravelCatalogSearch"/> - <reference name="hotelSearch" target="HotelComponent/Search"> - <binding.sca/> - </reference> - <reference name="flightSearch"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </reference> - <reference name="carSearch" target="CarComponent/Search"> - <binding.sca/> - </reference> - <reference name="tripSearch" target="TripComponent/Search"> - <binding.sca/> - </reference> - <reference name="currencyConverter" target="CurrencyConverterComponent"> - </reference> - <property name="quoteCurrencyCode">GBP</property> - </component> - - <component name="TripBookingComponent"> - <implementation.java class="scatours.tripbooking.TripBookingImpl"/> - <service name="TripBooking"/> - <reference name="hotelBook" target="HotelComponent/Book"/> - <reference name="flightBook" target="TripComponent/Book"/> - <reference name="carBook" target="CarComponent/Book"/> - <reference name="tripBook" target="TripComponent/Book"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="HotelComponent"> - <implementation.java class="scatours.hotel.HotelImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="FlightComponent"> - <implementation.java class="scatours.flight.FlightImpl"/> - <service name="Search"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <tuscany:binding.jsonrpc/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </service> - <service name="Book"/> - </component> - - <component name="CarComponent"> - <implementation.java class="scatours.car.CarImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="TripComponent"> - <implementation.java class="scatours.trip.TripImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="CurrencyConverterComponent"> - <implementation.java class="scatours.currencyconverter.CurrencyConverterImpl"/> - <service name="CurrencyConverter"> - </service> - </component> - - <component name="ShoppingCartComponent"> - <implementation.java class="scatours.shoppingcart.ShoppingCartImpl"/> - <service name="ShoppingCart"> - </service> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - - <component name="PaymentComponent"> - <implementation.spring location="Payment-context.xml"/> - <service name="Payment"> - <interface.wsdl interface="http://www.tuscanyscatours.com/Payment/#wsdl.interface(Payment)" /> - <binding.ws uri="http://localhost:8080/Payment" wsdlElement="http://www.tuscanyscatours.com/Payment/#wsdl.service(PaymentService)"/> - </service> - <reference name="creditCardPayment"> - <binding.ws uri="http://localhost:8081/CreditCardPayment"/> - </reference> - <property name="processingCharge">9.73</property> - </component> - - <component name="CreditCardPayment"> - <implementation.java class="payment.creditcard.CreditCardPaymentImpl" /> - <service name="CreditCardPayment"> - <binding.ws uri="http://localhost:8081/CreditCardPayment" /> - </service> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.html b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.html deleted file mode 100644 index b8e27e87fc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.html +++ /dev/null @@ -1,391 +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. ---> -<html> -<head> -<title>SCA Tours</title> - -<link rel="stylesheet" type="text/css" href="style.css" /> - -<script type="text/javascript" src="scatours.js"></script> - -<script language="JavaScript"> - - //@Reference - var scaToursCatalog = new Reference("scaToursCatalog"); - - //@Reference - var scaToursBooking = new Reference("scaToursBooking"); - - //@Reference - var scaToursCart = new Reference("scaToursCart"); - - //local state - var packagedItems; - var bespokeItems; - var cartId; - - //the constructor for trip leg beans - function TripLegType(id, - fromLocation, - toLocation, - fromDate, - toDate, - noOfPeople) { - this.id = id; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.noOfPeople = noOfPeople; - } - - function getTripLeg(){ - return new TripLegType(cartId, - document.searchForm.fromLocation.value, - document.searchForm.toLocation.value, - document.searchForm.fromDate.value, - document.searchForm.toDate.value, - document.searchForm.noOfPeople.value); - } - - //the constructor for bespoke trip beans - function TripType() { - this.id = cartId; - this.type = "Bespoke"; - this.tripItems = new Array(); - // json databinding can't tolerate having a class hint set as the - // databinding transformer is not in the right classloader to load - // the class pointed to by the hint - //this.javaClass = "scatours.common.TripItem"; - } - - function getTrip(){ - return new TripType(); - } - - // remove class hint from the trip object - // can also be used to limit the amount of - // data returned to the server - function copyTrip(trip){ - var tripCopy = new TripType(); - - tripCopy.id = trip.id; - tripCopy.tripId = trip.tripId; - tripCopy.type = trip.type; - tripCopy.name = trip.name; - tripCopy.description = trip.description; - tripCopy.location = trip.location; - tripCopy.fromDate = trip.fromDate; - tripCopy.toDate = trip.toDate; - tripCopy.price = trip.price; - tripCopy.currency = trip.currency; - tripCopy.link = trip.link; - - return tripCopy; - } - - function init() { - try { - newCart(); - } - catch(e) { - alert(e); - } - } - - function reset() { - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = ""; - document.getElementById('cartPrice').innerHTML = ""; - packagedItems = new Array(); - bespokeItems = new Array(); - } - - function newCart() { - scaToursCart.newCart(newCart_response); - reset(); - } - - function newCart_response(newCartId, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - cartId = newCartId - } - - function searchTravelCatalog() { - scaToursCatalog.search(getTripLeg(), search_response); - } - - function search_response(items, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - - var packagedHTML = '<h3>Packaged Trip Items</h3>'; - packagedHTML += '<table border="0">'; - packagedHTML += '<tr>'; - packagedHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - packagedHTML += '</tr>'; - - var bespokeHTML = '<h3>Bespoke Trip Items</h3>'; - bespokeHTML += '<table border="0">'; - bespokeHTML += '<tr>'; - bespokeHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - bespokeHTML += '</tr>'; - - for (var i=0; i<items.length; i++) { - if (items[i].type == "Trip") { - packagedHTML += '<tr>'; - packagedHTML += '<td><input onClick="processPackagedSelection()" name="packagedTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - packagedHTML += '<td>' + items[i].name + '</td>'; - packagedHTML += '<td>' + items[i].description + '</td>'; - packagedHTML += '<td>' + items[i].location + '</td>'; - packagedHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - packagedHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - packagedHTML += '</tr>'; - packagedItems.push(items[i]); - } else { - bespokeHTML += '<tr>'; - bespokeHTML += '<td><input onClick="processBespokeSelection()" name="bespokeTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - bespokeHTML += '<td>' + items[i].name + '</td>'; - bespokeHTML += '<td>' + items[i].description + '</td>'; - bespokeHTML += '<td>' + items[i].location + '</td>'; - bespokeHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - bespokeHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - bespokeHTML += '</tr>'; - bespokeItems.push(items[i]); - } - } - - packagedHTML += '</table>'; - packagedHTML += '<input type="button" onClick="bookPackagedTrip()" value="Book Packaged Trip">'; - - bespokeHTML += '<tr><td/><td/><td>Total Price</td><td/><td/><td><div id="bespokeTripPrice"></div> </td></tr>'; - bespokeHTML += '</table>'; - bespokeHTML += '<input type="button" onClick="bookBespokeTrip()" value="Book Bespoke Trip">'; - - if (packagedItems.length > 0){ - document.getElementById('packagedTripItems').innerHTML = packagedHTML; - } - - if (bespokeItems.length > 0){ - document.getElementById('bespokeTripItems').innerHTML = bespokeHTML; - } - } - - function processPackagedSelection() { - // do nothing at the moment - } - - function processBespokeSelection() { - // calculate total price - var items = document.getElementsByName("bespokeTripItemSelection"); - var totalPrice = 0.0; - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - totalPrice = totalPrice + bespokeItems[i].price; - } - } - document.getElementById('bespokeTripPrice').innerHTML = totalPrice + ' ' + bespokeItems[0]. currency; - } - - function bookPackagedTrip() { - // find first selected trip item - var trip = null; - var items = document.getElementsByName("packagedTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip = copyTrip(packagedItems[i]); - break; - } - } - - if (trip != null) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select a trip") - } - } - - function bookBespokeTrip() { - // create a trip object - var trip = getTrip(); - - // add selected trip items to trip - var items = document.getElementsByName("bespokeTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip.tripItems.push(copyTrip(bespokeItems[i])); - } - } - - if (trip.tripItems.length > 0) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select some trip items!") - } - } - - function getCartTrips() { - scaToursCart.getTrips(cartId, getCartTrips_response); - } - - function getCartTrips_response(trips, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - var itemsHTML = ''; - var totalPrice = 0.0; - - for (var x=0; x<trips.length; x++){ - itemsHTML += '<h3>Trip - ' + trips[x].id + '</h3>'; - itemsHTML += '<table border="0">'; - itemsHTML += '<tr>'; - itemsHTML += '<td>Booking Ref</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - itemsHTML += '</tr>'; - - if (trips[x].type == "Trip") { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + trips[x].bookingCode + '</td>'; - itemsHTML += '<td>' + trips[x].name + '</td>'; - itemsHTML += '<td>' + trips[x].description + '</td>'; - itemsHTML += '<td>' + trips[x].location + '</td>'; - itemsHTML += '<td>' + trips[x].fromDate + ' - ' + trips[x].toDate +'</td>'; - itemsHTML += '<td>' + trips[x].price + ' ' + trips[x].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + trips[x].price; - - } else { - var tripItems = trips[x].tripItems; - - for (var i=0; i<tripItems.length; i++) { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + tripItems[i].bookingCode + '</td>'; - itemsHTML += '<td>' + tripItems[i].name + '</td>'; - itemsHTML += '<td>' + tripItems[i].description + '</td>'; - itemsHTML += '<td>' + tripItems[i].location + '</td>'; - itemsHTML += '<td>' + tripItems[i].fromDate + ' - ' + tripItems[i].toDate +'</td>'; - itemsHTML += '<td>' + tripItems[i].price + ' ' + tripItems[i].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + tripItems[i].price; - } - } - - itemsHTML += '</table>'; - } - - document.getElementById('cartItems').innerHTML = itemsHTML; - document.getElementById('cartPrice').innerHTML = totalPrice + ' ' + trips[0].currency; - } - - function checkout() { - scaToursCart.checkout(cartId); - - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = "Thank you for shopping with SCA Tours"; - document.getElementById('cartPrice').innerHTML = ""; - searchResponseItems = null; - tripItems = null; - } - - function purchase() { - } - -</script> - -</head> - -<body onload="init()" background=""> - <img src="scatours.png" border="0" /> - <div id="scatours"> - <form name="searchForm"> - <h3>Search for trips, hotels, flights and cars</h3> - <br/> - <table border="0"> - <tr> - <td>From Location:</td> - <td><input type="text" name="fromLocation" value="LGW"></td> - <td>To Location:</td> - <td><input type="text" name="toLocation" value="FLR"></td> - </tr> - <tr> - <td>Start Date:</td> - <td><input type="text" name="fromDate" value="06/12/09"></td> - <td>End Date:</td> - <td><input type="text" name="toDate" value="13/12/09"></td> - </tr> - <tr> - <td>Number of people:</td> - <td><select name="noOfPeople"> - <option>1 - <option selected>2 - <option>3 - <option>4 - </select></td> - <td/> - <td/> - </tr> - </table> - <br/> - <input type="button" onClick="searchTravelCatalog()" value="Search"> - </form> - <form name="packagedTripForm"> - <div id="packagedTripItems"></div> - </form> - <form name="bespokeTripForm"> - <div id="bespokeTripItems"></div> - </form> - <form name="cartForm"> - <h3>Shopping Cart</h3> - <div id="cartItems"></div> - <br/> - Total Price: <div id="cartPrice"></div> - <br/> - <input type="button" onClick="checkout()" value="Checkout"> - </form> - </div> - -</body> -</html> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.odg b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.odg Binary files differdeleted file mode 100644 index 8ca8fbf133..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.odg +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.png b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.png Binary files differdeleted file mode 100644 index f68cd84704..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/scatours.png +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/style.css b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/style.css deleted file mode 100644 index 6e17c2747b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-06/ui-spring-contribution/src/main/resources/style.css +++ /dev/null @@ -1,135 +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. - */ - - - -/*******************************************/ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-07/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-07/pom.xml deleted file mode 100644 index 5f9e3ef56b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-07/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-07</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 07 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>node</module> - <module>ui-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/pom.xml deleted file mode 100644 index caf9636c18..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-08</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 08 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>node</module> - <module>ui-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/build.xml deleted file mode 100644 index f453e53815..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/build.xml +++ /dev/null @@ -1,106 +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. ---> - -<project name="scatours-ui-contribution" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="." excludes="**/*.java, pom.xml, build.xml, target"/> - </copy> - <jar destfile="target/scatours-ui-contribution.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="launch.LaunchTutorialAdmin" fork="true"> - <classpath> - <pathelement location="target/scatours-ui-contribution.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-core-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.5-SNAPSHOT-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.5-SNAPSHOT-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.3.1.jar"/> - <include name="activation-1.1.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="cglib-nodep-2.1_3.jar"/> - <include name="geronimo-commonj_1.1_spec-1.0.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="wstx-asl-3.2.1.jar"/> - <include name="xml-apis-1.3.03.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/pom.xml deleted file mode 100644 index a253fbf74b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <packaging>war</packaging> - <artifactId>scatours-ui</artifactId> - <name>Apache Tuscany SCA Tours User Interface Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.2</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <sourceDirectory>${basedir}/src</sourceDirectory> - <resources> - <resource> - <directory>${basedir}</directory> - <excludes> - <exclude>**/*.java</exclude> - <exclude>**/.*/**</exclude> - <exclude>pom.xml</exclude> - <exclude>build.xml</exclude> - <exclude>target/**</exclude> - <exclude>src/**</exclude> - </excludes> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.5-SNAPSHOT-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>launch.LaunchTutorialAdmin</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/META-INF/sca-deployables/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/META-INF/sca-deployables/scatours.composite deleted file mode 100644 index 2fa83b7a3b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/META-INF/sca-deployables/scatours.composite +++ /dev/null @@ -1,62 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:scatours="http://scatours" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - name="scatours"> - - <component name="SCATours"> - <implementation.web web-uri=""/> - <reference name="hotel" target="HotelComponent"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="trip" target="TripComponent"> - <tuscany:binding.jsonrpc/> - </reference> - </component> - - <component name="TripComponent"> - <implementation.java class="scatours.trip.TripImpl"/> - <service name="Trip"> - <tuscany:binding.jsonrpc/> - </service> - <reference name="hotelSearch" target="HotelComponent"> - <binding.sca/> - </reference> - <reference name="currencyConverter" target="CurrencyConverterComponent"> - </reference> - </component> - - <component name="HotelComponent"> - <implementation.java class="scatours.hotel.HotelImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - </component> - - <component name="CurrencyConverterComponent"> - <implementation.java class="scatours.currencyconverter.CurrencyConverterImpl"/> - <service name="CurrencyConverter"> - </service> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 3f833b6856..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * 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.
--->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
-Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
-
- <display-name>Apache Tuscany SCA Tours User Interface Webapp</display-name>
-
- <filter>
- <filter-name>tuscany</filter-name>
- <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>tuscany</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>scatours.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.html b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.html deleted file mode 100644 index 9aad807887..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.html +++ /dev/null @@ -1,143 +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. ---> -<html> -<head> -<title>SCA Tours</title> - -<link rel="stylesheet" type="text/css" href="style.css" /> - -<script type="text/javascript" src="org.apache.tuscany.sca.componentContext.js"></script> - -<script language="JavaScript"> - - var hotel = componentContext.getService("hotel"); - - var trip = componentContext.getService("trip"); - - //local state - var hotels; - var flights; - var cars; - - //the constructor for trip leg beans - function TripLegType(id, - fromLocation, - toLocation, - fromDate, - toDate, - noOfPeople) { - this.id = id; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.noOfPeople = noOfPeople; - } - - function getTripLeg(){ - return new TripLegType("X", - document.searchForm.fromLocation.value, - document.searchForm.toLocation.value, - document.searchForm.fromDate.value, - document.searchForm.toDate.value, - document.searchForm.noOfPeople.value); - } - - function init() { - try { - - } - catch(e) { - alert(e); - } - } - - function searchHotels() { - hotel.searchSynch(getTripLeg(), search_response); - } - - function searchTrip() { - trip.search(getTripLeg(), search_response); - } - - function search_response(items, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - var hotelsHTML = ""; - for (var i=0; i<items.length; i++) { - var item = items[i].name + ' - ' + items[i].description; - hotelsHTML += '<input name="items" type="checkbox" value="' + - item + '">' + item + ' <br>'; - } - document.getElementById('searchResponse').innerHTML = hotelsHTML; - hotels = items; - } - -</script> - -</head> - -<body onload="init()" background=""> - <img src="scatours.png" border="0" /> - <div id="scatours"> - <br> - <form name="searchForm"> - <table border="0"> - <tr> - <td>From Location:</td> - <td><input type="text" name="fromLocation" value="LGW"></td> - <td>To Location:</td> - <td><input type="text" name="toLocation" value="ANU"></td> - </tr> - <tr> - <td>Start Date:</td> - <td><input type="text" name="fromDate" value="06/12/08"></td> - <td>End Date:</td> - <td><input type="text" name="toDate" value="06/12/08"></td> - </tr> - <tr> - <td>Number of people:</td> - <td><select name="noOfPeople"> - <option>1 - <option selected>2 - <option>3 - <option>4 - </select></td> - <td/> - <td/> - </tr> - </table> - <input type="button" onClick="searchHotels()" value="SearchHotels"> - <input type="button" onClick="searchTrip()" value="SearchTrip"> - </form> - <div id="searchResponse"></div> - <br> - <form name="tripForm"> - <input type="button" onClick="bookTrip()" value="BookTrip"> - </form> - <br> - <div id="trip"></div> - <br> - <div id="total"></div> - </div> - -</body> -</html> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.odg b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.odg Binary files differdeleted file mode 100644 index 8ca8fbf133..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.odg +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.png b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.png Binary files differdeleted file mode 100644 index f68cd84704..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/scatours.png +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/style.css b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/style.css deleted file mode 100644 index 6e17c2747b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-08/ui-contribution-webapp/src/main/webapp/style.css +++ /dev/null @@ -1,135 +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. - */ - - - -/*******************************************/ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/pom.xml deleted file mode 100644 index 9388e4e3fb..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-09-creditcard-payment-sdo-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 09 SDO-based Credit Card Payment Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-sdo</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/sdo-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.tuscany.sdo</groupId> - <artifactId>tuscany-sdo-plugin</artifactId> - <version>1.1.1</version> - <executions> - <execution> - <id>generate-sdo</id> - <phase>generate-sources</phase> - <configuration> - <schemaFile> - ${basedir}/src/main/resources/CreditCardPayment.wsdl - </schemaFile> - <javaPackage>payment.creditcard</javaPackage> - <prefix>CreditCardPayment</prefix> - <noNotification>true</noNotification> - <noContainer>true</noContainer> - <noUnsettable>true</noUnsettable> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - - </executions> - </plugin> - - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/java/payment/creditcard/CreditCardPayment.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/java/payment/creditcard/CreditCardPayment.java deleted file mode 100644 index 5b333648f4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/java/payment/creditcard/CreditCardPayment.java +++ /dev/null @@ -1,39 +0,0 @@ - -package payment.creditcard; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebService(name = "CreditCardPayment", targetNamespace = "http://www.example.org/CreditCardPayment/") -public interface CreditCardPayment { - - - /** - * - * @param amount - * @param creditCard - * @return - * returns java.lang.String - */ - @WebMethod(action = "http://www.example.org/CreditCardPayment/authorize") - @WebResult(name = "Status", targetNamespace = "") - @RequestWrapper(localName = "authorize", targetNamespace = "http://www.example.org/CreditCardPayment/", className = "payment.creditcard.AuthorizeType") - @ResponseWrapper(localName = "authorizeResponse", targetNamespace = "http://www.example.org/CreditCardPayment/", className = "payment.creditcard.AuthorizeResponseType") - public String authorize( - @WebParam(name = "CreditCard", targetNamespace = "") - CreditCardDetailsType creditCard, - @WebParam(name = "Amount", targetNamespace = "") - float amount); - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/java/payment/creditcard/impl/CreditCardPaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/java/payment/creditcard/impl/CreditCardPaymentImpl.java deleted file mode 100644 index 178268eac1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/java/payment/creditcard/impl/CreditCardPaymentImpl.java +++ /dev/null @@ -1,47 +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 payment.creditcard.impl; - -import org.osoa.sca.annotations.Service; - -import payment.creditcard.CreditCardDetailsType; -import payment.creditcard.CreditCardPayment; - -/** - * - */ -@Service(CreditCardPayment.class) -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCardDetailsType creditCard, float amount) { - if (creditCard != null){ - System.out.println("Checking card: name = " + - creditCard.getCardOwner().getName() + - " number = " + - creditCard.getCreditCardNumber() + - " for amount " + - amount); - } else { - System.out.println("Checking card is null"); - } - - return "OK"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index f73279e7d8..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,117 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.example.org/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.example.org/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.org/CreditCardPayment/"
- xmlns:tns="http://www.example.org/CreditCardPayment/">
-
- <xsd:element name="authorize" type="tns:AuthorizeType"/>
- <xsd:complexType name="AuthorizeType">
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
- <xsd:complexType name="AuthorizeResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types> - <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.example.org/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8080/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d22f4816ab..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment.creditcard"/> - <export.java package="payment.creditcard.impl"/> - <export.java package="payment.creditcard.ws"/> - <export.java package="payment.creditcard.ws.impl"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/creditcard.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/creditcard.composite deleted file mode 100644 index 938385dbf9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/main/resources/creditcard.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://creditcard"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:c="http://creditcard"
- name="creditcard">
-
- <component name="CreditCardPaymentComponent">
- <implementation.java class="payment.creditcard.impl.CreditCardPaymentImpl" />
- <service name="CreditCardPayment">
- <interface.wsdl interface="http://www.example.org/CreditCardPayment/#wsdl.interface(CreditCardPayment)"/>
- <binding.ws uri="http://localhost:8081/CreditCardPayment" />
- <binding.sca/>
- </service>
- </component>
-
-</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/test/java/payment/creditcard/CreditCardPaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/test/java/payment/creditcard/CreditCardPaymentTestCase.java deleted file mode 100644 index 041e4e4847..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/creditcard-payment-sdo-contribution/src/test/java/payment/creditcard/CreditCardPaymentTestCase.java +++ /dev/null @@ -1,86 +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 payment.creditcard; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -/** - * - */ -public class CreditCardPaymentTestCase { - private static SCANode node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("creditcard.composite", CreditCardPayment.class.getClassLoader()); - node.start(); - } - - @Test - public void testCreditCardPayment() { - SCAClient client = (SCAClient) node; - CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPaymentComponent/CreditCardPayment"); - - CreditCardPaymentFactory factory = CreditCardPaymentFactory.INSTANCE; - CreditCardDetailsType ccDetails = factory.createCreditCardDetailsType(); - ccDetails.setCreditCardType("Visa"); - ccDetails.setCreditCardNumber("1111-2222-3333-4444"); - ccDetails.setExpMonth(9); - ccDetails.setExpYear(2010); - PayerType ccOwner = factory.createPayerType(); - ccOwner.setName("Fred"); - ccDetails.setCardOwner(ccOwner); - - System.out.println(cc.authorize(ccDetails, 100.00f)); - } - - @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 - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/build.xml deleted file mode 100644 index 46333e4852..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/build.xml +++ /dev/null @@ -1,210 +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. ---> - -<project name="scatours-chapter-09-node" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - <fileset dir="src\main\resources"/> - </copy> - <jar destfile="target/scatours-chapter-09-node.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="scatours.LaunchNode"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="scatours.LaunchNode" fork="true"> - <classpath> - <pathelement location="target/scatours-chapter-09-node.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-abdera-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-atom-js-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-http-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-jsonrpc-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-jsonrpc-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-axis2-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-axis2-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-axis2-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-wsdlgen-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-ws-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-resource-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-data-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-axiom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-axiom-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-json-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-domain-manager-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-jetty-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-resource-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-resource-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-runtime-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-widget-runtime-tuscany-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-wsdl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-wsdl-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-launcher-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-manager-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-security-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-security-http-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-ws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-web-javascript-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-workspace-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-xml-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.4.2.jar"/> - <include name="abdera-client-0.4.0-incubating.jar"/> - <include name="abdera-core-0.4.0-incubating.jar"/> - <include name="abdera-extensions-html-0.4.0-incubating.jar"/> - <include name="abdera-extensions-json-0.4.0-incubating.jar"/> - <include name="abdera-extensions-main-0.4.0-incubating.jar"/> - <include name="abdera-i18n-0.4.0-incubating.jar"/> - <include name="abdera-parser-0.4.0-incubating.jar"/> - <include name="abdera-server-0.4.0-incubating.jar"/> - <include name="activation-1.1.jar"/> - <include name="annogen-0.1.0.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="axiom-api-1.2.7.jar"/> - <include name="axiom-dom-1.2.7.jar"/> - <include name="axiom-impl-1.2.7.jar"/> - <include name="axis-ant-1.4.jar"/> - <include name="axis2-adb-1.4.1.jar"/> - <include name="axis2-codegen-1.4.1.jar"/> - <include name="axis2-java2wsdl-1.4.1.jar"/> - <include name="axis2-kernel-1.4.1.jar"/> - <include name="axis2-mtompolicy-1.4.1.jar"/> - <include name="backport-util-concurrent-3.1.jar"/> - <include name="bcprov-jdk13-132.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="commons-codec-1.3.jar"/> - <include name="commons-collections-3.1.jar"/> - <include name="commons-discovery-0.2.jar"/> - <include name="commons-fileupload-1.2.jar"/> - <include name="commons-httpclient-3.1.jar"/> - <include name="commons-io-1.4.jar"/> - <include name="commons-logging-1.1.1.jar"/> - <include name="derby-10.3.1.4.jar"/> - <include name="geronimo-activation_1.1_spec-1.0.1.jar"/> - <include name="geronimo-javamail_1.4_spec-1.2.jar"/> - <include name="geronimo-jms_1.1_spec-1.1.jar"/> - <include name="geronimo-stax-api_1.0_spec-1.0.1.jar"/> - <include name="htmlparser-1.0.5.jar"/> - <include name="httpcore-4.0-beta1.jar"/> - <include name="httpcore-nio-4.0-beta1.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxen-1.1.1.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jettison-1.0.1.jar"/> - <include name="jetty-6.1.7.jar"/> - <include name="jetty-util-6.1.7.jar"/> - <include name="json-rpc-1.0.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="junit-4.5.jar"/> - <include name="log4j-1.2.15.jar"/> - <include name="mail-1.4.jar"/> - <include name="mex-1.41-impl.jar"/> - <include name="neethi-2.0.4.jar"/> - <include name="opensaml-1.1.jar"/> - <include name="rampart-core-1.4.jar"/> - <include name="rampart-policy-1.4.jar"/> - <include name="rampart-trust-1.4.jar"/> - <include name="servlet-api-2.5.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="woden-api-1.0M8.jar"/> - <include name="woden-impl-dom-1.0M8.jar"/> - <include name="wsdl4j-1.6.2.jar"/> - <include name="wss4j-1.5.4.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - <include name="xalan-2.7.0.jar"/> - <include name="xercesImpl-2.8.1.jar"/> - <include name="xml-apis-1.3.03.jar"/> - <include name="xmlParserAPIs-2.6.0.jar"/> - <include name="xmlsec-1.4.2.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/pom.xml deleted file mode 100644 index 8deb76212c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/pom.xml +++ /dev/null @@ -1,144 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-09-node</artifactId> - <name>Apache Tuscany SCA Tours Chapter 09 Node</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-launcher</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-domain-manager</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-node-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-widget-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-atom-abdera</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>scatours.LaunchNode</mainClass> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/src/main/java/scatours/LaunchNode.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/src/main/java/scatours/LaunchNode.java deleted file mode 100644 index 7ed9b0d126..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/node/src/main/java/scatours/LaunchNode.java +++ /dev/null @@ -1,65 +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; - -import java.io.IOException; - -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -public class LaunchNode { - public static void main(String[] args) throws Exception { - LaunchNode.launchFromFileSystemDir(); - } - - // OK for development but you must launch the node from this module - public static void launchFromFileSystemDir(){ - SCANode node = null; - - try { - node = SCANodeFactory.newInstance().createSCANode("scatours.composite", - new SCAContribution("common", "../../shared-contributions/common-contribution/target/classes"), - new SCAContribution("currency", "../../shared-contributions/currency-contribution/target/classes"), - new SCAContribution("hotel", "../../shared-contributions/hotel-contribution/target/classes"), - new SCAContribution("flight", "../../shared-contributions/flight-contribution/target/classes"), - new SCAContribution("car", "../../shared-contributions/car-contribution/target/classes"), - new SCAContribution("trip", "../../shared-contributions/trip-contribution/target/classes"), - new SCAContribution("tripbooking", "../../shared-contributions/tripbooking-contribution/target/classes"), - new SCAContribution("travelcatalog", "../../shared-contributions/travelcatalog-contribution/target/classes"), - new SCAContribution("payment", "../payment-contribution/target/classes"), - new SCAContribution("emailgateway", "../../shared-contributions/emailgateway-contribution/target/classes"), - new SCAContribution("shoppingcart", "../../shared-contributions/shoppingcart-contribution/target/classes"), - new SCAContribution("scatours", "../../shared-contributions/scatours-contribution/target/classes"), - new SCAContribution("ui", "../ui-contribution/target/classes")); - node.start(); - - System.out.println("Node started - Press enter to shutdown."); - try { - System.in.read(); - } catch (IOException e) {} - - node.stop(); - - } catch (Exception ex) { - System.out.println(ex.toString()); - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/pom.xml deleted file mode 100644 index d642fa3d17..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-09-payment-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 09 Payment Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment.creditcard</packageName> - <wsdlDirectory>${basedir}/src/main/resources - </wsdlDirectory> - <wsdlFiles> - <wsdlFile>CreditCardPayment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source - </sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/java/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/java/payment/Payment.java deleted file mode 100644 index f1a45cb031..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/java/payment/Payment.java +++ /dev/null @@ -1,26 +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 payment; - -public interface Payment { - - public String makePaymentMember(String customerId, - float amount); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/java/payment/PaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/java/payment/PaymentImpl.java deleted file mode 100644 index aa8f3cd01a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/java/payment/PaymentImpl.java +++ /dev/null @@ -1,54 +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 payment; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import payment.creditcard.CreditCardDetailsType; -import payment.creditcard.CreditCardPayment; -import payment.creditcard.CreditCardTypeType; -import payment.creditcard.ObjectFactory; -import payment.creditcard.PayerType; - -/** - * - */ -@Service(Payment.class) -public class PaymentImpl implements Payment { - - @Reference - protected CreditCardPayment creditCardPayment; - - public String makePaymentMember(String customerId, float amount) { - - ObjectFactory objectFactory = new ObjectFactory(); - CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType(); - ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa")); - PayerType ccOwner = objectFactory.createPayerType(); - ccOwner.setName(customerId); - ccDetails.setCardOwner(ccOwner); - - String status = creditCardPayment.authorize(ccDetails, amount); - - return status; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index b40c341389..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,116 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.example.org/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.example.org/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.org/CreditCardPayment/"
- xmlns:tns="http://www.example.org/CreditCardPayment/">
-
- <xsd:element name="authorize" type="tns:AuthorizeType"/>
- <xsd:complexType name="AuthorizeType">
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
- <xsd:complexType name="AuthorizeResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types> - <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.example.org/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8080/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d22f4816ab..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment.creditcard"/> - <export.java package="payment.creditcard.impl"/> - <export.java package="payment.creditcard.ws"/> - <export.java package="payment.creditcard.ws.impl"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/java/payment/PaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/java/payment/PaymentTestCase.java deleted file mode 100644 index 21bf6ff428..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/java/payment/PaymentTestCase.java +++ /dev/null @@ -1,76 +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 payment; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class PaymentTestCase { - private static SCANode node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("payment.composite", Payment.class.getClassLoader()); - node.start(); - } - - @Test - public void testCreditCardPayment() { - SCAClient client = (SCAClient) node; - Payment payment = client.getService(Payment.class, "PaymentComponent"); - System.out.println(payment.makePaymentMember("Fred Bloggs", 100.00f)); - } - - @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 - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java deleted file mode 100644 index b7d44c1abe..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java +++ /dev/null @@ -1,44 +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 payment.creditcard; - -import org.osoa.sca.annotations.Service; - -/** - * - */ -@Service(CreditCardPayment.class) -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCardDetailsType creditCard, float amount) { - if (creditCard != null){ - System.out.println("Checking card: name = " + - creditCard.getCardOwner().getName() + - " number = " + - creditCard.getCreditCardNumber() + - " for amount " + - amount); - } else { - System.out.println("Checking card is null"); - } - - return "OK"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/resources/payment.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/resources/payment.composite deleted file mode 100644 index 90665e86e0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/payment-contribution/src/test/resources/payment.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:c="http://scatours" - name="payment"> - - <component name="PaymentComponent"> - <implementation.java class="payment.PaymentImpl" /> - <reference name="creditCardPayment" target="CreditCardPaymentComponent"/> - </component> - - <component name="CreditCardPaymentComponent"> - <implementation.java class="payment.creditcard.CreditCardPaymentImpl" /> - </component> -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/pom.xml deleted file mode 100644 index 7d7bee30ff..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-chapter-09</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Chapter 09 Examples</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>node</module> - <module>ui-contribution</module> - <module>payment-contribution</module> - <module>creditcard-payment-sdo-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/build.xml deleted file mode 100644 index 9bb124b5d0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/build.xml +++ /dev/null @@ -1,108 +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. ---> - -<project name="scatours-chapter-05-ui-contribution" default="compile"> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="." excludes="**/*.java, pom.xml, build.xml, target"/> - </copy> - <jar destfile="target/scatours-chapter-05-ui-contribution.jar" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/> - </manifest> - </jar> - </target> - - <target name="package" depends="compile"/> - - <target name="run"> - <java classname="launch.LaunchTutorialAdmin" fork="true"> - <classpath> - <pathelement location="target/scatours-chapter-05-ui-contribution.jar"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> - - <fileset id="tuscany.jars" dir="../../modules"> - <include name="tuscany-assembly-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-assembly-xsd-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-1.6-SNAPSHOT.jar"/> - <include name="tuscany-binding-sca-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-namespace-1.6-SNAPSHOT.jar"/> - <include name="tuscany-contribution-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-core-spi-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-1.6-SNAPSHOT.jar"/> - <include name="tuscany-databinding-jaxb-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-1.6-SNAPSHOT.jar"/> - <include name="tuscany-definitions-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-endpoint-1.6-SNAPSHOT.jar"/> - <include name="tuscany-extensibility-1.6-SNAPSHOT.jar"/> - <include name="tuscany-host-embedded-1.6-SNAPSHOT.jar"/> - <include name="tuscany-implementation-node-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-jaxws-1.6-SNAPSHOT.jar"/> - <include name="tuscany-interface-java-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-monitor-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-node-impl-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-1.6-SNAPSHOT.jar"/> - <include name="tuscany-policy-xml-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-1.6-SNAPSHOT.jar"/> - <include name="tuscany-sca-api-extension-1.6-SNAPSHOT.jar"/> - <include name="tuscany-xsd-1.6-SNAPSHOT.jar"/> - </fileset> - <fileset id="3rdparty.jars" dir="../../lib"> - <include name="XmlSchema-1.6-SNAPSHOT.2.jar"/> - <include name="activation-1.1.jar"/> - <include name="asm-all-3.1.jar"/> - <include name="cglib-nodep-2.2.jar"/> - <include name="jaxb-api-2.1.jar"/> - <include name="jaxb-impl-2.1.7.jar"/> - <include name="jaxws-api-2.1.jar"/> - <include name="jsr181-api-1.0-MR1.jar"/> - <include name="jsr250-api-1.0.jar"/> - <include name="stax-api-1.0-2.jar"/> - <include name="wstx-asl-3.2.4.jar"/> - </fileset> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/pom.xml deleted file mode 100644 index 958aed8d7b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-chapter-09-ui-contribution</artifactId> - <name>Apache Tuscany SCA Tours Chapter 09 User Interface Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/scatours.odg b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/scatours.odg Binary files differdeleted file mode 100644 index 8ca8fbf133..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/scatours.odg +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/scatours.png b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/scatours.png Binary files differdeleted file mode 100644 index f68cd84704..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/scatours.png +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 764030c28e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:scatours="http://scatours"> - <deployable composite="scatours:scatours"/> - <import.java package="scatours.common"/> - <import.java package="scatours.currencyconverter"/> - <import.java package="scatours.hotel"/> - <import.java package="scatours.flight"/> - <import.java package="scatours.car"/> - <import.java package="scatours.trip"/> - <import.java package="scatours.tripbooking"/> - <import.java package="scatours.travelcatalog"/> - <import.java package="payment.creditcard.ws.impl"/> - <import.java package="scatours.emailgateway"/> - <import.java package="scatours.paymentprocess"/> - <import.java package="scatours.shoppingcart"/> - <import.java package="scatours"/> - <import namespace="http://www.example.org/PaymentProcess/"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/scatours.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/scatours.composite deleted file mode 100644 index 53fac26d3e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/scatours.composite +++ /dev/null @@ -1,178 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:scatours="http://scatours" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:pp="http://www.example.org/PaymentProcess" - name="scatours"> - - <component name="UserInterfaceComponent"> - <tuscany:implementation.widget location="scatours.html"/> - <service name="Widget"> - <tuscany:binding.http uri="/scatours"/> - </service> - <reference name="scaToursCatalog" target="SCAToursComponent/SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursBooking" target="SCAToursComponent/SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursCart" target="SCAToursComponent/SCAToursCart"> - <tuscany:binding.jsonrpc/> - </reference> - </component> - - <component name="SCAToursComponent"> - <implementation.java class="scatours.SCAToursImpl"/> - <service name="SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </service> - <service name="SCAToursCart"> - <tuscany:binding.jsonrpc/> - </service> - <reference name="travelCatalogSearch" target="TravelCatalogComponent/TravelCatalogSearch"/> - <reference name="tripBooking" target="TripBookingComponent/TripBooking"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="TravelCatalogComponent"> - <implementation.java class="scatours.travelcatalog.TravelCatalogImpl"/> - <service name="TravelCatalogSearch"/> - <reference name="hotelSearch" target="HotelComponent/Search"> - <binding.sca/> - </reference> - <reference name="flightSearch"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </reference> - <reference name="carSearch" target="CarComponent/Search"> - <binding.sca/> - </reference> - <reference name="tripSearch" target="TripComponent/Search"> - <binding.sca/> - </reference> - <reference name="currencyConverter" target="CurrencyConverterComponent"> - </reference> - <property name="quoteCurrencyCode">GBP</property> - </component> - - <component name="TripBookingComponent"> - <implementation.java class="scatours.tripbooking.TripBookingImpl"/> - <service name="TripBooking"/> - <reference name="hotelBook" target="HotelComponent/Book"/> - <reference name="flightBook" target="TripComponent/Book"/> - <reference name="carBook" target="CarComponent/Book"/> - <reference name="tripBook" target="TripComponent/Book"/> - <reference name="shoppingCart" target="ShoppingCartComponent/ShoppingCart"/> - </component> - - <component name="HotelComponent"> - <implementation.java class="scatours.hotel.HotelImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="FlightComponent"> - <implementation.java class="scatours.flight.FlightImpl"/> - <service name="Search"> - <interface.java interface="scatours.common.Search" - callbackInterface="scatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8080/Flight/Search"/> - <tuscany:binding.jsonrpc/> - <callback> - <binding.ws uri="http://localhost:8080/Flight/SearchCallback"/> - </callback> - </service> - <service name="Book"/> - </component> - - <component name="CarComponent"> - <implementation.java class="scatours.car.CarImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="TripComponent"> - <implementation.java class="scatours.trip.TripImpl"/> - <service name="Search"> - <binding.sca/> - <tuscany:binding.jsonrpc/> - </service> - <service name="Book"/> - </component> - - <component name="CurrencyConverterComponent"> - <implementation.java class="scatours.currencyconverter.CurrencyConverterImpl"/> - <service name="CurrencyConverter"> - </service> - </component> - - <component name="ShoppingCartComponent"> - <implementation.java class="scatours.shoppingcart.ShoppingCartImpl"/> - <service name="ShoppingCart"> - </service> - <!--reference name="paymentProcess"> - <binding.ws uri="http://localhost:8083/PaymentProcess" /> - </reference--> - </component> - - <!--component name="PaymentProcessComponent"> - <implementation.bpel process="pp:PaymentProcess"/> - <service name="paymentProcessPartnerLink"> - <interface.wsdl interface="http://www.example.org/PaymentProcess/#wsdl.interface(PaymentProcess)" /> - <binding.ws uri="http://localhost:8080/PaymentProcess" wsdlElement="http://www.example.org/PaymentProcess/#wsdl.service(PaymentProcessService)"/> - </service> - <reference name="creditCardPaymentPartnerLink"> - <binding.ws uri="http://localhost:8081/CreditCardPayment"/> - </reference> - <reference name="emailGatewayPartnerLink"> - <binding.ws uri="http://localhost:8082/EmailGateway"/> - </reference> - </component> - - <component name="CreditCardPaymentWS"> - <implementation.java class="payment.creditcard.ws.impl.CreditCardPaymentWSImpl" /> - <service name="CreditCardPayment"> - <binding.ws uri="http://localhost:8081/CreditCardPayment" /> - </service> - </component> - - <component name="EmailGateway"> - <implementation.java class="scatours.emailgateway.EmailGatewayImpl" /> - <service name="EmailGateway"> - <binding.ws uri="http://localhost:8082/EmailGateway" /> - </service> - </component--> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/scatours.html b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/scatours.html deleted file mode 100644 index f4206548c0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/scatours.html +++ /dev/null @@ -1,390 +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. ---> -<html> -<head> -<title>SCA Tours</title> - -<link rel="stylesheet" type="text/css" href="style.css" /> - -<script type="text/javascript" src="scatours.js"></script> - -<script language="JavaScript"> - - //@Reference - var scaToursCatalog = new Reference("scaToursCatalog"); - - //@Reference - var scaToursBooking = new Reference("scaToursBooking"); - - //@Reference - var scaToursCart = new Reference("scaToursCart"); - - //local state - var packagedItems; - var bespokeItems; - var cartId; - - //the constructor for trip leg beans - function TripLegType(id, - fromLocation, - toLocation, - fromDate, - toDate, - noOfPeople) { - this.id = id; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.noOfPeople = noOfPeople; - } - - function getTripLeg(){ - return new TripLegType(cartId, - document.searchForm.fromLocation.value, - document.searchForm.toLocation.value, - document.searchForm.fromDate.value, - document.searchForm.toDate.value, - document.searchForm.noOfPeople.value); - } - - //the constructor for bespoke trip beans - function TripType() { - this.id = cartId; - this.type = "Bespoke"; - this.tripItems = new Array(); - // json databinding can't tolerate having a class hint set as the - // databinding transformer is not in the right classloader to load - // the class pointed to by the hint - //this.javaClass = "scatours.common.TripItem"; - } - - function getTrip(){ - return new TripType(); - } - - // remove class hint from the trip object - // can also be used to limit the amount of - // data returned to the server - function copyTrip(trip){ - var tripCopy = new TripType(); - - tripCopy.id = trip.id; - tripCopy.tripId = trip.tripId; - tripCopy.type = trip.type; - tripCopy.name = trip.name; - tripCopy.description = trip.description; - tripCopy.location = trip.location; - tripCopy.fromDate = trip.fromDate; - tripCopy.toDate = trip.toDate; - tripCopy.price = trip.price; - tripCopy.currency = trip.currency; - tripCopy.link = trip.link; - - return tripCopy; - } - - function init() { - try { - newCart(); - } - catch(e) { - alert(e); - } - } - - function reset() { - document.getElementById('packagedTripItems').innerHTML = ""; - document.getElementById('bespokeTripItems').innerHTML = ""; - document.getElementById('cartItems').innerHTML = ""; - document.getElementById('cartPrice').innerHTML = ""; - packagedItems = new Array(); - bespokeItems = new Array(); - } - - function newCart() { - scaToursCart.newCart(newCart_response); - reset(); - } - - function newCart_response(newCartId, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - cartId = newCartId - } - - function searchTravelCatalog() { - scaToursCatalog.search(getTripLeg(), search_response); - } - - function search_response(items, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - - var packagedHTML = '<h3>Packaged Trip Items</h3>'; - packagedHTML += '<table border="0">'; - packagedHTML += '<tr>'; - packagedHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - packagedHTML += '</tr>'; - - var bespokeHTML = '<h3>Bespoke Trip Items</h3>'; - bespokeHTML += '<table border="0">'; - bespokeHTML += '<tr>'; - bespokeHTML += '<td>Select</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - bespokeHTML += '</tr>'; - - for (var i=0; i<items.length; i++) { - if (items[i].type == "Trip") { - packagedHTML += '<tr>'; - packagedHTML += '<td><input onClick="processPackagedSelection()" name="packagedTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - packagedHTML += '<td>' + items[i].name + '</td>'; - packagedHTML += '<td>' + items[i].description + '</td>'; - packagedHTML += '<td>' + items[i].location + '</td>'; - packagedHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - packagedHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - packagedHTML += '</tr>'; - packagedItems.push(items[i]); - } else { - bespokeHTML += '<tr>'; - bespokeHTML += '<td><input onClick="processBespokeSelection()" name="bespokeTripItemSelection" type="checkbox" value="' + items[i].id + '"></td>' - bespokeHTML += '<td>' + items[i].name + '</td>'; - bespokeHTML += '<td>' + items[i].description + '</td>'; - bespokeHTML += '<td>' + items[i].location + '</td>'; - bespokeHTML += '<td>' + items[i].fromDate + ' - ' + items[i].toDate +'</td>'; - bespokeHTML += '<td>' + items[i].price + ' ' + items[i].currency + '</td>'; - bespokeHTML += '</tr>'; - bespokeItems.push(items[i]); - } - } - - packagedHTML += '</table>'; - packagedHTML += '<input type="button" onClick="bookPackagedTrip()" value="Book Packaged Trip">'; - - bespokeHTML += '<tr><td/><td/><td>Total Price</td><td/><td/><td><div id="bespokeTripPrice"></div> </td></tr>'; - bespokeHTML += '</table>'; - bespokeHTML += '<input type="button" onClick="bookBespokeTrip()" value="Book Bespoke Trip">'; - - if (packagedItems.length > 0){ - document.getElementById('packagedTripItems').innerHTML = packagedHTML; - } - - if (bespokeItems.length > 0){ - document.getElementById('bespokeTripItems').innerHTML = bespokeHTML; - } - } - - function processPackagedSelection() { - // do nothing at the moment - } - - function processBespokeSelection() { - // calculate total price - var items = document.getElementsByName("bespokeTripItemSelection"); - var totalPrice = 0.0; - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - totalPrice = totalPrice + bespokeItems[i].price; - } - } - document.getElementById('bespokeTripPrice').innerHTML = totalPrice + ' ' + bespokeItems[0]. currency; - } - - function bookPackagedTrip() { - // find first selected trip item - var trip = null; - var items = document.getElementsByName("packagedTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip = copyTrip(packagedItems[i]); - break; - } - } - - if (trip != null) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select a trip") - } - } - - function bookBespokeTrip() { - // create a trip object - var trip = getTrip(); - - // add selected trip items to trip - var items = document.getElementsByName("bespokeTripItemSelection"); - for (var i=0; i<items.length; i++) { - - // find the items that are checked - if (items[i].checked == true) { - trip.tripItems.push(copyTrip(bespokeItems[i])); - } - } - - if (trip.tripItems.length > 0) { - // book trip - scaToursBooking.bookTrip(cartId, trip); - - // reset the display - reset(); - - // re-populate the cart with all entries - getCartTrips(); - } else { - alert ("Please select some trip items!") - } - } - - function getCartTrips() { - scaToursCart.getTrips(cartId, getCartTrips_response); - } - - function getCartTrips_response(trips, exception) { - if(exception){ - alert(exception.javaStack); - return; - } - var itemsHTML = ''; - var totalPrice = 0.0; - - for (var x=0; x<trips.length; x++){ - itemsHTML += '<h3>Trip - ' + trips[x].id + '</h3>'; - itemsHTML += '<table border="0">'; - itemsHTML += '<tr>'; - itemsHTML += '<td>Booking Ref</td><td>Name</td><td>Description</td><td>Location</td><td>From - To</td><td>Price</td>'; - itemsHTML += '</tr>'; - - if (trips[x].type == "Trip") { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + trips[x].bookingCode + '</td>'; - itemsHTML += '<td>' + trips[x].name + '</td>'; - itemsHTML += '<td>' + trips[x].description + '</td>'; - itemsHTML += '<td>' + trips[x].location + '</td>'; - itemsHTML += '<td>' + trips[x].fromDate + ' - ' + trips[x].toDate +'</td>'; - itemsHTML += '<td>' + trips[x].price + ' ' + trips[x].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + trips[x].price; - - } else { - var tripItems = trips[x].tripItems; - - for (var i=0; i<tripItems.length; i++) { - itemsHTML += '<tr>'; - itemsHTML += '<td>' + tripItems[i].bookingCode + '</td>'; - itemsHTML += '<td>' + tripItems[i].name + '</td>'; - itemsHTML += '<td>' + tripItems[i].description + '</td>'; - itemsHTML += '<td>' + tripItems[i].location + '</td>'; - itemsHTML += '<td>' + tripItems[i].fromDate + ' - ' + tripItems[i].toDate +'</td>'; - itemsHTML += '<td>' + tripItems[i].price + ' ' + tripItems[i].currency + '</td>'; - itemsHTML += '</tr>'; - totalPrice = totalPrice + tripItems[i].price; - } - } - - itemsHTML += '</table>'; - } - - document.getElementById('cartItems').innerHTML = itemsHTML; - document.getElementById('cartPrice').innerHTML = totalPrice + ' ' + trips[0].currency; - } - - function checkout() { - scaToursCart.checkout(cartId); - - document.getElementById('searchResponse').innerHTML = ""; - document.getElementById('cartItems').innerHTML = "Thank you for shopping with SCA Tours"; - document.getElementById('cartPrice').innerHTML = ""; - searchResponseItems = null; - tripItems = null; - } - - function purchase() { - } - -</script> - -</head> - -<body onload="init()" background=""> - <img src="scatours.png" border="0" /> - <div id="scatours"> - <form name="searchForm"> - <h3>Search for trips, hotels, flights and cars</h3> - <br/> - <table border="0"> - <tr> - <td>From Location:</td> - <td><input type="text" name="fromLocation" value="LGW"></td> - <td>To Location:</td> - <td><input type="text" name="toLocation" value="FLR"></td> - </tr> - <tr> - <td>Start Date:</td> - <td><input type="text" name="fromDate" value="06/12/09"></td> - <td>End Date:</td> - <td><input type="text" name="toDate" value="13/12/09"></td> - </tr> - <tr> - <td>Number of people:</td> - <td><select name="noOfPeople"> - <option>1 - <option selected>2 - <option>3 - <option>4 - </select></td> - <td/> - <td/> - </tr> - </table> - <br/> - <input type="button" onClick="searchTravelCatalog()" value="Search"> - </form> - <form name="packagedTripForm"> - <div id="packagedTripItems"></div> - </form> - <form name="bespokeTripForm"> - <div id="bespokeTripItems"></div> - </form> - <form name="cartForm"> - <h3>Shopping Cart</h3> - <div id="cartItems"></div> - <br/> - Total Price: <div id="cartPrice"></div> - <br/> - <input type="button" onClick="checkout()" value="Checkout"> - </form> - </div> - -</body> -</html> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/style.css b/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/style.css deleted file mode 100644 index 6e17c2747b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/chapter-09/ui-contribution/src/main/resources/style.css +++ /dev/null @@ -1,135 +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. - */ - - - -/*******************************************/ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/.classpath b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/.classpath deleted file mode 100644 index 609aa00ebc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="gen"/> - <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/.project b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/.project deleted file mode 100644 index e4a44c86de..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>scatours-android-ui</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.ApkBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>com.android.ide.eclipse.adt.AndroidNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/AndroidManifest.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/AndroidManifest.xml deleted file mode 100644 index 7bda31e187..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/AndroidManifest.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="scatours.android" - android:versionCode="1" - android:versionName="1.0"> - <application android:icon="@drawable/icon" android:label="@string/app_name"> - <activity android:name=".TripSearch" - android:label="@string/app_name"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - </application> - <uses-permission android:name="android.permission.INTERNET"></uses-permission> - <uses-sdk android:minSdkVersion="3" /> -</manifest>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/default.properties b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/default.properties deleted file mode 100644 index 6b8ae52b90..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/default.properties +++ /dev/null @@ -1,22 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# apk configurations. This property allows creation of APK files with limited -# resources. For example, if your application contains many locales and -# you wish to release multiple smaller apks instead of a large one, you can -# define configuration to create apks with limited language sets. -# Format is a comma separated list of configuration names. For each -# configuration, a property will declare the resource configurations to -# include. Example: -# apk-configurations=european,northamerica -# apk-config-european=en,fr,it,de,es -# apk-config-northamerica=en,es -apk-configurations= -# Project target. -target=android-3 diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/gen/scatours/android/R.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/gen/scatours/android/R.java deleted file mode 100644 index 777832aa4c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/gen/scatours/android/R.java +++ /dev/null @@ -1,35 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package scatours.android; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int icon=0x7f020000; - } - public static final class id { - public static final int btnSearch=0x7f050005; - public static final int edit_NumberOfPeople=0x7f050004; - public static final int edit_date_end=0x7f050003; - public static final int edit_date_start=0x7f050002; - public static final int edit_fromLocation=0x7f050000; - public static final int edit_toLocation=0x7f050001; - public static final int listPackages=0x7f050006; - } - public static final class layout { - public static final int search=0x7f030000; - public static final int search_results=0x7f030001; - } - public static final class string { - public static final int alert_cancel=0x7f040003; - public static final int alert_yes=0x7f040002; - public static final int app_name=0x7f040000; - public static final int title_search=0x7f040001; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/drawable/icon.png b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/drawable/icon.png Binary files differdeleted file mode 100644 index 75024841d3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/drawable/icon.png +++ /dev/null diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/layout/search.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/layout/search.xml deleted file mode 100644 index cb7ae6acb6..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/layout/search.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="fill_parent" - android:layout_height="wrap_content"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="From:" /> - - <AutoCompleteTextView android:id="@+id/edit_fromLocation" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="LGW"/> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="To:"/> - - <AutoCompleteTextView android:id="@+id/edit_toLocation" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="FLR"/> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Start Date:" /> - - <AutoCompleteTextView android:id="@+id/edit_date_start" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="06/12/09"/> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="End Date:" /> - - <AutoCompleteTextView android:id="@+id/edit_date_end" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="13/12/09"/> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Number of People:" /> - - <AutoCompleteTextView android:id="@+id/edit_NumberOfPeople" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="2"/> - - - <Button android:id="@+id/btnSearch" - android:layout_width="100px" - android:layout_height="40px" - android:text="@string/title_search"/> - -</LinearLayout> - - diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/layout/search_results.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/layout/search_results.xml deleted file mode 100644 index 1af13900a3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/layout/search_results.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - - <TextView android:text="Available Packages" - android:layout_width="wrap_content" - android:layout_height="wrap_content"/> - - <ListView android:id="@+id/listPackages" - android:layout_width="wrap_content" - android:layout_height="wrap_content"/> -</LinearLayout> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/values/strings.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/values/strings.xml deleted file mode 100644 index 8f1b67bcf0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/res/values/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string name="app_name">SCA Tours - Search Trip</string> - <string name="title_search">Search</string> - <string name="alert_yes">Yes</string> - <string name="alert_cancel">Cancel</string> -</resources> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/SCAToursSearch.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/SCAToursSearch.java deleted file mode 100644 index 36a514b0b8..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/SCAToursSearch.java +++ /dev/null @@ -1,29 +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; - -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * The Trip service interface - */ -public interface SCAToursSearch { - TripItem[] search(TripLeg tripLeg); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/SCAToursSearchProxy.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/SCAToursSearchProxy.java deleted file mode 100644 index cfd6b98bcf..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/SCAToursSearchProxy.java +++ /dev/null @@ -1,81 +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; - -import java.util.ArrayList; -import java.util.List; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import scatours.common.TripItem; -import scatours.common.TripLeg; -import scatours.jsonrpc.JSONRpc; - -public class SCAToursSearchProxy implements SCAToursSearch { - // see http://developer.android.com/guide/developing/tools/emulator.html - private static final String jsonRPCServiceURI = "http://10.0.2.2:8080/SCAToursComponent/SCAToursSearch"; - private static final String jsonRPCRequest = "{\"id\": 5, \"method\": \"Service.search\", \"params\": [{\"id\": \"5f9a10f2-527f-4d91-a13c-b1aa2baaedd8\", \"fromLocation\": \"LGW\", \"toLocation\": \"FLR\", \"fromDate\": \"06/12/09\", \"toDate\": \"13/12/09\", \"noOfPeople\": \"2\"}]}"; - - private List<TripItem> tripCatalog = new ArrayList<TripItem>(); - - public SCAToursSearchProxy() { - initialize(); - } - - public void initialize() { - JSONObject json = null; - - try { - json = JSONRpc.invoke(jsonRPCServiceURI, jsonRPCRequest); - - if(json == null) { - return; - } - - JSONArray result = json.getJSONArray("result"); - for(int i = 0; i < result.length(); i++) { - TripItem item = new TripItem(); - - item.setType(result.getJSONObject(i).getString("type")); - item.setName(result.getJSONObject(i).getString("name")); - item.setDescription(result.getJSONObject(i).getString("description")); - item.setLocation(result.getJSONObject(i).getString("location")); - item.setFromDate(result.getJSONObject(i).getString("fromDate")); - item.setToDate(result.getJSONObject(i).getString("toDate")); - item.setPrice(result.getJSONObject(i).getDouble("price")); - item.setCurrency(result.getJSONObject(i).getString("currency")); - - tripCatalog.add(item); - } - - } catch (JSONException e) { - e.printStackTrace(); - } - } - - - public TripItem[] search(TripLeg tripLeg) { - TripItem[] catalogArray = new TripItem[tripCatalog.size()]; - tripCatalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/android/TripSearch.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/android/TripSearch.java deleted file mode 100644 index b64c14a583..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/android/TripSearch.java +++ /dev/null @@ -1,186 +0,0 @@ -package scatours.android; - -import scatours.SCAToursSearch; -import scatours.SCAToursSearchProxy; -import scatours.common.TripItem; -import scatours.common.TripLeg; -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.Intent; -import android.os.Bundle; -import android.util.Log; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.AdapterView; -import android.widget.ArrayAdapter; -import android.widget.AutoCompleteTextView; -import android.widget.Button; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.AdapterView.OnItemSelectedListener; - -public class TripSearch extends Activity { - - static final String[] AIRPORT_CODES = new String[] { - "LGW - London Gatwick Airport", - "FLR - Luigi Ridolfi Airport", - "SFO - San Francisco Airport", - "GRU - Sao Paulo Airport", - "GIG - Rio de Janeiro Airport" - }; - - - private AutoCompleteTextView txtFromLocation, - txtToLocation, - txtDateStart, - txtDateEnd, - txtNumberOfPeople; - private Button btnSearch; - - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.search); - - - ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line, AIRPORT_CODES); - - txtFromLocation = (AutoCompleteTextView) findViewById(R.id.edit_fromLocation); - //ArrayAdapter adapterFrom = new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line, AIRPORT_CODES); - txtFromLocation.setAdapter(adapter); - - txtToLocation = (AutoCompleteTextView) findViewById(R.id.edit_toLocation); - //ArrayAdapter adapterTo = new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line, AIRPORT_CODES); - txtToLocation.setAdapter(adapter); - - txtDateStart = (AutoCompleteTextView) findViewById(R.id.edit_date_start); - txtDateEnd = (AutoCompleteTextView) findViewById(R.id.edit_date_end); - txtNumberOfPeople = (AutoCompleteTextView) findViewById(R.id.edit_NumberOfPeople); - - btnSearch = (Button) this.findViewById(R.id.btnSearch); - - doListen(); - } - - private void doListen() { - - txtFromLocation.setOnItemClickListener(new OnItemClickListener() { - public void onItemClick(AdapterView<?> parent, View view, int position, long id) { - Log.i(getString(R.string.app_name),">>Item Clicked: " +AIRPORT_CODES[position]); - } - - }); - - txtFromLocation.setOnItemSelectedListener(new OnItemSelectedListener() { - - public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { - Log.i(getString(R.string.app_name),">>Item Selected: " +AIRPORT_CODES[position]); - } - - public void onNothingSelected(AdapterView<?> parent) { - Log.i(getString(R.string.app_name),">>Selection cleared"); - } - - }); - - - //closeButton - btnSearch.setOnClickListener( new OnClickListener() { - public void onClick(View v) { - - doTripSearch(v); - /* - //Search trips here - new AlertDialog.Builder(TripSearch.this) - .setTitle("SCATour") - .setMessage("You're about to search for trips !") - .setIcon(R.drawable.icon) - .setPositiveButton(R.string.alert_yes, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int whichButton) { - - }}) - .setNegativeButton(R.string.alert_cancel, new DialogInterface.OnClickListener(){ - public void onClick(DialogInterface dialog, int which) { - - } - }) - .show();*/ - } - }); - - } - - - private void doTripSearch(View view) { - SCAToursSearch searchProxy = new SCAToursSearchProxy(); - TripLeg tripLeg = new TripLeg(); - - Log.i(getString(R.string.app_name),"From : " + txtFromLocation.getText().toString() ); - Log.i(getString(R.string.app_name),"To : " + txtToLocation.getText().toString() ); - Log.i(getString(R.string.app_name),"Start Date : " + txtDateStart.getText().toString() ); - Log.i(getString(R.string.app_name),"End Date : " + txtDateEnd.getText().toString() ); - Log.i(getString(R.string.app_name),"NumberOfPeople : " + txtNumberOfPeople.getText().toString() ); - - tripLeg.setFromLocation("LGW"); - tripLeg.setToLocation("FLR"); - tripLeg.setFromDate("06/12/09"); - tripLeg.setToDate("13/12/09"); - tripLeg.setNoOfPeople("2"); - - TripItem[] tripsAvailable = searchProxy.search(tripLeg); - Log.i(getString(R.string.app_name),"Found " + tripsAvailable.length + " trips"); - - Log.i(getString(R.string.app_name),"Calling Results view..."); - - displayTripSearchResults(tripsAvailable); - - /* - try { - Intent resultView = new Intent(this, TripSearchResults.class); - resultView.putExtra("results", tripsAvailable); - startActivity(resultView); - } catch(Exception e) { - Log.e(getString(R.string.app_name), e.getMessage()); - } - */ - - //TripSearchResults searchResults = new TripSearchResults(tripsAvailable); - //searchResults.setContentView(R.layout.search_results); - - Log.i(getString(R.string.app_name),"Called..."); - - } - - private void displayTripSearchResults(TripItem[] tripsAvailable) { - - String result = ""; - for(TripItem item : tripsAvailable) { - Log.i(getString(R.string.app_name), "Item type:" + item.getType()); - if (item.getType().equals(TripItem.TRIP)) { - result += item.getDescription() + " (" + item.getCurrency() + " " + item.getPrice() + ")\n"; - } - } - - - //Search trips here - new AlertDialog.Builder(TripSearch.this) - .setTitle("SCATour") - .setMessage("Found:\n" + result) - .setIcon(R.drawable.icon) - .setCancelable(false) - .setPositiveButton(R.string.alert_yes, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int whichButton) { - - }}) - .setNegativeButton(R.string.alert_cancel, new DialogInterface.OnClickListener(){ - public void onClick(DialogInterface dialog, int which) { - - } - }) - .show(); - - } - -}
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/android/TripSearchResults.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/android/TripSearchResults.java deleted file mode 100644 index 002ef8def1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/android/TripSearchResults.java +++ /dev/null @@ -1,57 +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.android; - -import scatours.common.TripItem; -import android.app.Activity; -import android.os.Bundle; -import android.util.Log; -import android.widget.ArrayAdapter; -import android.widget.ListView; - -public class TripSearchResults extends Activity { - private TripItem[] results; - - private ListView listResults; - - public TripSearchResults( ) { - super(); - } - - public void setResults(TripItem[] results) { - Log.i(getString(R.string.app_name),"Setting results : " + results.length); - this.results = results; - } - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.search_results); - - Log.i(getString(R.string.app_name),"Displaying " + results.length + " trips"); - - listResults = (ListView) findViewById(R.id.listPackages); - //listResults.setAdapter(new ArrayAdapter<TripItem>(this, R.id.listPackages, results)); - - - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/common/TripItem.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/common/TripItem.java deleted file mode 100644 index 1fd78c8dd5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/common/TripItem.java +++ /dev/null @@ -1,219 +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.common; - - - -public class TripItem { - - public static String FLIGHT = "Flight"; - public static String HOTEL = "Hotel"; - public static String CAR = "Car"; - public static String TRIP = "Trip"; - - private String id; - private String tripId; - private String type; - private String name; - private String description; - private String location; - private String fromDate; - private String toDate; - private double price; - private String currency; - private String link; - private TripItem[] tripItems; // used for a trip made up of trip items - private String customerDetails; - private String agentDetails; - private String bookingCode; - - public TripItem() { - } - - public TripItem(TripItem item) { - this.id = item.getId(); - this.tripId = item.getTripId(); - this.type = item.getType(); - this.name = item.getName(); - this.description = item.getDescription(); - this.location = item.getLocation(); - this.fromDate = item.getFromDate(); - this.toDate = item.getToDate(); - this.price = item.getPrice(); - this.currency = item.getCurrency(); - this.link = item.getLink(); - } - - public TripItem(String id, - String tripId, - String type, - String name, - String description, - String location, - String fromDate, - String toDate, - double price, - String currency, - String link) { - this.id = id; - this.tripId = tripId; - this.type = type; - this.name = name; - this.description = description; - this.location = location; - this.fromDate = fromDate; - this.toDate = toDate; - this.price = price; - this.currency = currency; - this.link = link; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTripId() { - return tripId; - } - - public void setTripId(String tripId) { - this.tripId = tripId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getFromDate() { - return fromDate; - } - - public void setFromDate(String fromDate) { - this.fromDate = fromDate; - } - - public String getToDate() { - return toDate; - } - - public void setToDate(String toDate) { - this.toDate = toDate; - } - - public double getPrice() { - return price; - } - - public void setPrice(double price) { - this.price = price; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public TripItem[] getTripItems() { - return tripItems; - } - - public void setTripItems(TripItem[] tripItems) { - this.tripItems = tripItems; - } - - public String getCustomerDetails() { - return customerDetails; - } - - public void setCustomerDetails(String customerDetails) { - this.customerDetails = customerDetails; - } - - public String getAgentDetails() { - return agentDetails; - } - - public void setAgentDetails(String agentDetails) { - this.agentDetails = agentDetails; - } - - public String getBookingCode() { - return bookingCode; - } - - public void setBookingCode(String bookingCode) { - this.bookingCode = bookingCode; - } - - @Override - public boolean equals(Object obj) { - - if (obj instanceof TripItem){ - if (((TripItem)obj).getId().equals(getId())){ - return true; - } - } - - return super.equals(obj); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/common/TripLeg.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/common/TripLeg.java deleted file mode 100644 index 1af33aa6f9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/common/TripLeg.java +++ /dev/null @@ -1,97 +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.common; - - -public class TripLeg { - - private String id; - private String fromLocation; - private String toLocation; - private String fromDate; - private String toDate; - private String noOfPeople; - - - public TripLeg() { - } - - public TripLeg(String id, - String fromLocation, - String toLocation, - String fromDate, - String toDate, - String noOfPeople) { - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFromLocation() { - return fromLocation; - } - - public void setFromLocation(String fromLocation) { - this.fromLocation = fromLocation; - } - - public String getToLocation() { - return toLocation; - } - - public void setToLocation(String toLocation) { - this.toLocation = toLocation; - } - - public String getFromDate() { - return fromDate; - } - - public void setFromDate(String fromDate) { - this.fromDate = fromDate; - } - - public String getToDate() { - return toDate; - } - - public void setToDate(String toDate) { - this.toDate = toDate; - } - - public String getNoOfPeople() { - return noOfPeople; - } - - public void setNoOfPeople(String noOfPeople) { - this.noOfPeople = noOfPeople; - } - - - - - - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/jsonrpc/JSONRpc.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/jsonrpc/JSONRpc.java deleted file mode 100644 index c6a9cd8702..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/scatours-android-ui/src/scatours/jsonrpc/JSONRpc.java +++ /dev/null @@ -1,63 +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.jsonrpc; - -import java.io.IOException; - -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.util.EntityUtils; -import org.json.JSONException; -import org.json.JSONObject; - -public class JSONRpc { - - protected JSONRpc() { - - } - - public static JSONObject invoke(String serviceURI, String rpcRequest) throws JSONException{ - HttpClient httpClient = new DefaultHttpClient(); - HttpPost httpPost = new HttpPost(serviceURI); - - JSONObject result = null; - try { - httpPost.setHeader("Content-Type", "text/xml"); - httpPost.setEntity(new StringEntity(rpcRequest)); - - HttpResponse httpResponse = httpClient.execute(httpPost); - if (httpResponse.getStatusLine().getStatusCode() == 200) { - String jsonResult = EntityUtils.toString(httpResponse.getEntity()); - result = new JSONObject(jsonResult); - } else { - String errorMessage = httpResponse.getStatusLine() - .getReasonPhrase(); - System.out.println(errorMessage); - } - } catch (IOException e) { - e.printStackTrace(); - } - - return result; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/pom.xml deleted file mode 100644 index 30c3ef2cc0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-calendar-contribution</artifactId> - <name>Apache Tuscany SCA Tours Calendar Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/java/calendar/Calendar.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/java/calendar/Calendar.java deleted file mode 100644 index 90736b92b4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/java/calendar/Calendar.java +++ /dev/null @@ -1,28 +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 calendar; - -/** - * The Add service interface - */ -public interface Calendar { - - String getEndDate(String startDate, int duration); - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/java/calendar/CalendarImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/java/calendar/CalendarImpl.java deleted file mode 100644 index 5aee34431c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/java/calendar/CalendarImpl.java +++ /dev/null @@ -1,45 +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 calendar; - -import java.text.DateFormat; -import java.util.Date; - -/** - * An implementation of the Add service - */ -public class CalendarImpl implements Calendar { - - public String getEndDate(String startDate, int duration){ - String returnDate = "Invalid Date"; - - try { - Date date = DateFormat.getInstance().parse(startDate); - java.util.Calendar calendar = java.util.Calendar.getInstance(); - calendar.setTime(date); - calendar.add(java.util.Calendar.DATE, duration); - returnDate = DateFormat.getInstance().format(calendar.getTime()); - } catch (Exception ex){ - // do nothing - System.out.println(ex.toString()); - } - - return returnDate; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 327ce07643..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="scatours.calendar"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/resources/calendar.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/resources/calendar.composite deleted file mode 100644 index b72c450446..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/main/resources/calendar.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://travel" - xmlns:sample="http://travel" - name="calendar"> - - <component name="CalendarComponent"> - <implementation.java class="calendar.CalendarImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/test/java/calendar/CalendarTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/test/java/calendar/CalendarTestCase.java deleted file mode 100644 index fee00fbb0a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/test/java/calendar/CalendarTestCase.java +++ /dev/null @@ -1,47 +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 calendar; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CalendarTestCase extends TestCase { - - private Calendar calendar; - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("calendar.composite"); - calendar = scaDomain.getService(Calendar.class, "CalendarComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCalculator() throws Exception { - System.out.println(calendar.getEndDate("07/10/96 04:05", 3)); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/test/resources/calendar.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/test/resources/calendar.composite deleted file mode 100644 index b72c450446..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/calendar-contribution/src/test/resources/calendar.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://travel" - xmlns:sample="http://travel" - name="calendar"> - - <component name="CalendarComponent"> - <implementation.java class="calendar.CalendarImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/pom.xml deleted file mode 100644 index 0e20cacb3a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-car-contribution</artifactId> - <name>Apache Tuscany SCA Tours Car Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/java/scatours/car/CarImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/java/scatours/car/CarImpl.java deleted file mode 100644 index 059365a9ab..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/java/scatours/car/CarImpl.java +++ /dev/null @@ -1,100 +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.car; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import scatours.common.Book; -import scatours.common.Search; -import scatours.common.SearchCallback; -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * An implementation of the Hotel service - */ -@Scope("STATELESS") -@Service(interfaces={Search.class, Book.class}) -public class CarImpl implements Search, Book { - - private List<CarInfo> cars = new ArrayList<CarInfo>(); - - @Callback - protected SearchCallback searchCallback; - - @Init - public void init() { - cars.add(new CarInfo("Premier Cars", - "BMW 5 Series", - "FLR", - "06/12/09", - "5", - 100.00, - "EUR", - "http://localhost:8085/tbd" )); - cars.add(new CarInfo("Premier Cars", - "Ford Focus", - "FLR", - "06/12/09", - "4", - 60.00, - "EUR", - "http://localhost:8085/tbd" )); - } - - public TripItem[] searchSynch(TripLeg tripLeg) { - List<TripItem> items = new ArrayList<TripItem>(); - - // find available hotels - for(CarInfo car : cars){ - if (car.getLocation().equals(tripLeg.getToLocation())){ - TripItem item = new TripItem("", - "", - TripItem.CAR, - car.getName(), - car.getDescription(), - car.getLocation(), - tripLeg.getFromDate(), - tripLeg.getToDate(), - car.getPricePerDay(), - car.getCurrency(), - car.getLink()); - items.add(item); - } - } - - return items.toArray(new TripItem[items.size()]); - } - - public void searchAsynch(TripLeg tripLeg) { - - // return available hotels - searchCallback.searchResults(searchSynch(tripLeg)); - } - - public String book(TripItem tripItem) { - return "car1"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/java/scatours/car/CarInfo.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/java/scatours/car/CarInfo.java deleted file mode 100644 index 2538c51e09..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/java/scatours/car/CarInfo.java +++ /dev/null @@ -1,120 +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.car; - - -public class CarInfo { - - private String name; - private String description; - private String location; - private String date; - private String seats; - private double pricePerDay; - private String currency; - private String link; - - public CarInfo() { - } - - public CarInfo(String name, - String description, - String location, - String date, - String seats, - double pricePerDay, - String currency, - String link) { - - this.name = name; - this.description = description; - this.location = location; - this.date = date; - this.seats = seats; - this.pricePerDay = pricePerDay; - this.currency = currency; - this.link = link; - } - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public String getSeats() { - return seats; - } - - public void setSeats(String seats) { - this.seats = seats; - } - - public double getPricePerDay() { - return pricePerDay; - } - - public void setPricePerDay(double pricePerDay) { - this.pricePerDay = pricePerDay; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f9c448e8ee..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/car-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <export.java package="scatours.car"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/build.xml deleted file mode 100644 index b4fbc726cf..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/build.xml +++ /dev/null @@ -1,61 +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. ---> -<project name="gettingstarted" default="compile"> - <property environment="env"/> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac srcdir="src" destdir="target/classes" - debug="on" source="1.5" target="1.5"> - <classpath> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </javac> - </target> - - <target name="run"> - <java classname="client.CurrencyConverterClient" fork="true"> - <classpath> - <pathelement path="src"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="runtrip"> - <java classname="client.TripClient" fork="true"> - <classpath> - <pathelement path="src"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="runtripws"> - <java classname="client.TripWsClient" fork="true"> - <classpath> - <pathelement path="src"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/pom.xml deleted file mode 100644 index e1899df159..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-common-contribution</artifactId> - <name>Apache Tuscany SCA Tours Common Artefacts Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/Book.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/Book.java deleted file mode 100644 index 630ba1dfe5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/Book.java +++ /dev/null @@ -1,27 +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.common; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Book { - String book(TripItem tripItem); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/Search.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/Search.java deleted file mode 100644 index 67335e72dc..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/Search.java +++ /dev/null @@ -1,33 +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.common; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Callback(SearchCallback.class) -public interface Search { - TripItem[] searchSynch(TripLeg tripLeg); - - @OneWay - void searchAsynch(TripLeg tripLeg); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/SearchCallback.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/SearchCallback.java deleted file mode 100644 index 7c3a0ed45c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/SearchCallback.java +++ /dev/null @@ -1,27 +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.common; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface SearchCallback { - void searchResults(TripItem[] items); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/TripItem.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/TripItem.java deleted file mode 100644 index 1fd78c8dd5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/TripItem.java +++ /dev/null @@ -1,219 +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.common; - - - -public class TripItem { - - public static String FLIGHT = "Flight"; - public static String HOTEL = "Hotel"; - public static String CAR = "Car"; - public static String TRIP = "Trip"; - - private String id; - private String tripId; - private String type; - private String name; - private String description; - private String location; - private String fromDate; - private String toDate; - private double price; - private String currency; - private String link; - private TripItem[] tripItems; // used for a trip made up of trip items - private String customerDetails; - private String agentDetails; - private String bookingCode; - - public TripItem() { - } - - public TripItem(TripItem item) { - this.id = item.getId(); - this.tripId = item.getTripId(); - this.type = item.getType(); - this.name = item.getName(); - this.description = item.getDescription(); - this.location = item.getLocation(); - this.fromDate = item.getFromDate(); - this.toDate = item.getToDate(); - this.price = item.getPrice(); - this.currency = item.getCurrency(); - this.link = item.getLink(); - } - - public TripItem(String id, - String tripId, - String type, - String name, - String description, - String location, - String fromDate, - String toDate, - double price, - String currency, - String link) { - this.id = id; - this.tripId = tripId; - this.type = type; - this.name = name; - this.description = description; - this.location = location; - this.fromDate = fromDate; - this.toDate = toDate; - this.price = price; - this.currency = currency; - this.link = link; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTripId() { - return tripId; - } - - public void setTripId(String tripId) { - this.tripId = tripId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getFromDate() { - return fromDate; - } - - public void setFromDate(String fromDate) { - this.fromDate = fromDate; - } - - public String getToDate() { - return toDate; - } - - public void setToDate(String toDate) { - this.toDate = toDate; - } - - public double getPrice() { - return price; - } - - public void setPrice(double price) { - this.price = price; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public TripItem[] getTripItems() { - return tripItems; - } - - public void setTripItems(TripItem[] tripItems) { - this.tripItems = tripItems; - } - - public String getCustomerDetails() { - return customerDetails; - } - - public void setCustomerDetails(String customerDetails) { - this.customerDetails = customerDetails; - } - - public String getAgentDetails() { - return agentDetails; - } - - public void setAgentDetails(String agentDetails) { - this.agentDetails = agentDetails; - } - - public String getBookingCode() { - return bookingCode; - } - - public void setBookingCode(String bookingCode) { - this.bookingCode = bookingCode; - } - - @Override - public boolean equals(Object obj) { - - if (obj instanceof TripItem){ - if (((TripItem)obj).getId().equals(getId())){ - return true; - } - } - - return super.equals(obj); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/TripLeg.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/TripLeg.java deleted file mode 100644 index 1af33aa6f9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/java/scatours/common/TripLeg.java +++ /dev/null @@ -1,97 +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.common; - - -public class TripLeg { - - private String id; - private String fromLocation; - private String toLocation; - private String fromDate; - private String toDate; - private String noOfPeople; - - - public TripLeg() { - } - - public TripLeg(String id, - String fromLocation, - String toLocation, - String fromDate, - String toDate, - String noOfPeople) { - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFromLocation() { - return fromLocation; - } - - public void setFromLocation(String fromLocation) { - this.fromLocation = fromLocation; - } - - public String getToLocation() { - return toLocation; - } - - public void setToLocation(String toLocation) { - this.toLocation = toLocation; - } - - public String getFromDate() { - return fromDate; - } - - public void setFromDate(String fromDate) { - this.fromDate = fromDate; - } - - public String getToDate() { - return toDate; - } - - public void setToDate(String toDate) { - this.toDate = toDate; - } - - public String getNoOfPeople() { - return noOfPeople; - } - - public void setNoOfPeople(String noOfPeople) { - this.noOfPeople = noOfPeople; - } - - - - - - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c2b9fd12c7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/common-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="scatours.common"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/pom.xml deleted file mode 100644 index 94f0e80f77..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/pom.xml +++ /dev/null @@ -1,131 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-creditcard-payment-jaxb-contribution</artifactId> - <name>Apache Tuscany SCA Tours Credit Card Payment Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment.creditcard</packageName> - <wsdlDirectory>${basedir}/src/main/resources - </wsdlDirectory> - <wsdlFiles> - <wsdlFile>CreditCardPayment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source - </sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java deleted file mode 100644 index b7d44c1abe..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java +++ /dev/null @@ -1,44 +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 payment.creditcard; - -import org.osoa.sca.annotations.Service; - -/** - * - */ -@Service(CreditCardPayment.class) -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCardDetailsType creditCard, float amount) { - if (creditCard != null){ - System.out.println("Checking card: name = " + - creditCard.getCardOwner().getName() + - " number = " + - creditCard.getCreditCardNumber() + - " for amount " + - amount); - } else { - System.out.println("Checking card is null"); - } - - return "OK"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 1813c77436..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,116 +0,0 @@ -<?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. ---> -<wsdl:definitions name="CreditCardPayment" - targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/" - xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"> - - <xsd:element name="authorize" type="tns:AuthorizeType"/> - <xsd:complexType name="AuthorizeType"> - <xsd:sequence> - <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/> - <xsd:complexType name="AuthorizeResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="CreditCardDetailsType"> - <xsd:sequence> - <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" /> - <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" /> - <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" /> - <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" /> - <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" /> - <xsd:element name="CVV2" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="CreditCardTypeType"> - <xsd:restriction base="xsd:token"> - <xsd:enumeration value="Visa" /> - <xsd:enumeration value="MasterCard" /> - <xsd:enumeration value="Discover" /> - <xsd:enumeration value="Amex" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="PayerType"> - <xsd:sequence> - <xsd:element name="Name" type="xsd:string" /> - <xsd:element name="Address" type="tns:AddressType" /> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="AddressType"> - <xsd:sequence> - <xsd:element name="Street" type="xsd:string" /> - <xsd:element name="City" type="xsd:string" /> - <xsd:element name="State" type="xsd:string" /> - <xsd:element name="ZipCode" type="xsd:string" /> - <xsd:element name="HomePhone" type="xsd:string" /> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <wsdl:message name="AuthorizeRequest"> - <wsdl:part name="parameters" element="tns:authorize"></wsdl:part> - </wsdl:message> - <wsdl:message name="AuthorizeResponse"> - <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="CreditCardPayment"> - <wsdl:operation name="authorize"> - <wsdl:input message="tns:AuthorizeRequest"></wsdl:input> - <wsdl:output message="tns:AuthorizeResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="authorize"> - <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="CreditCardPaymentService"> - <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding"> - <soap:address location="http://localhost:8080/CreditCardPayment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="CreditCardPaymentLinkType"> - <plnk:role name="forward" portType="tns:CreditCardPayment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 8faf8db4ee..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment.creditcard"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/java/payment/creditcard/CreditCardPaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/java/payment/creditcard/CreditCardPaymentTestCase.java deleted file mode 100644 index 0c25509ab3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/java/payment/creditcard/CreditCardPaymentTestCase.java +++ /dev/null @@ -1,83 +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 payment.creditcard; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -/** - * - */ -public class CreditCardPaymentTestCase { - private static SCANode node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("creditcard.composite", CreditCardPayment.class.getClassLoader()); - node.start(); - } - - @Test - public void testCreditCardPayment() { - SCAClient client = (SCAClient) node; - CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPaymentComponent/CreditCardPayment"); - - ObjectFactory objectFactory = new ObjectFactory(); - CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType(); - ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa")); - PayerType ccOwner = objectFactory.createPayerType(); - ccOwner.setName("Fred"); - ccDetails.setCardOwner(ccOwner); - - System.out.println(cc.authorize(ccDetails, 100.00f)); - } - - @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 - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 666c488b6d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="payment.creditcard"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/resources/creditcard.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/resources/creditcard.composite deleted file mode 100644 index d0721a8bae..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/creditcard-payment-jaxb-contribution/src/test/resources/creditcard.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://creditcard" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:c="http://creditcard" - name="creditcard"> - - <component name="CreditCardPaymentComponent"> - <implementation.java class="payment.creditcard.CreditCardPaymentImpl" /> - <service name="CreditCardPayment"> - <binding.ws uri="http://localhost:8081/CreditCardPayment" /> - <binding.sca/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/pom.xml deleted file mode 100644 index 61ef0b6752..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-currency-contribution</artifactId> - <name>Apache Tuscany SCA Tours Currency Converter Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/java/scatours/currencyconverter/CurrencyConverter.java deleted file mode 100644 index 9b3851721f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/java/scatours/currencyconverter/CurrencyConverter.java +++ /dev/null @@ -1,33 +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.currencyconverter; - -/** - * The CurrencyConverter service interface - */ -public interface CurrencyConverter { - - double getExchangeRate(String fromCurrencyCode, - String toCurrencyCode); - - double convert(String fromCurrencyCode, - String toCurrencyCode, - double amount); - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/java/scatours/currencyconverter/CurrencyConverterImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/java/scatours/currencyconverter/CurrencyConverterImpl.java deleted file mode 100644 index eddc59f555..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/java/scatours/currencyconverter/CurrencyConverterImpl.java +++ /dev/null @@ -1,54 +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.currencyconverter; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the CurrencyConverter service - */ -@Service(interfaces={CurrencyConverter.class}) -public class CurrencyConverterImpl implements CurrencyConverter { - - // currency index - private Map<String, Integer> currencyIndex = new HashMap<String, Integer>(); - - // exchange rates - private final double rates [][] = {{ 1.00, 0.50, 0.66 }, - { 2.00, 1.00, 1.33 }, - { 1.50, 0.75, 1.00 } } ; - - public CurrencyConverterImpl(){ - currencyIndex.put("USD", new Integer(0)); - currencyIndex.put("GBP", new Integer(1)); - currencyIndex.put("EUR", new Integer(2)); - } - - public double getExchangeRate(String fromCurrencyCode, String toCurrencyCode){ - return rates[currencyIndex.get(fromCurrencyCode).intValue()] - [currencyIndex.get(toCurrencyCode).intValue()]; - } - - public double convert(String fromCurrencyCode, String toCurrencyCode, double amount){ - return amount * getExchangeRate(fromCurrencyCode, toCurrencyCode); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 549a3bc7a3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/currency-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="scatours.currencyconverter"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/pom.xml deleted file mode 100644 index 34cf7d2512..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-emailgateway-contribution</artifactId> - <name>Apache Tuscany SCA Tours Email Gateway Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>scatours.emailgateway</packageName> - <wsdlDirectory>${basedir}/src/main/resources - </wsdlDirectory> - <wsdlFiles> - <wsdlFile>EmailGateway.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source - </sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java deleted file mode 100644 index 6e971c3267..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/java/scatours/emailgateway/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/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/resources/EmailGateway.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index 7c5c190e1e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/resources/EmailGateway.wsdl +++ /dev/null @@ -1,89 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="EmailGateway"
- targetNamespace="http://www.tuscanyscatours.com/EmailGateway/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.tuscanyscatours.com/EmailGateway/"
- xmlns:tns="http://www.tuscanyscatours.com/EmailGateway/">
-
- <xsd:element name="sendEmail" type="tns:SendEmailType"/>
- <xsd:complexType name="SendEmailType">
- <xsd:sequence>
- <xsd:element name="Email" type="tns:EmailType"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="sendEmailResponse" type="tns:SendEmailResponseType"/>
- <xsd:complexType name="SendEmailResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="EmailType">
- <xsd:sequence>
- <xsd:element name="To" type="xsd:string"/>
- <xsd:element name="Title" type="xsd:string"/>
- <xsd:element name="Body" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="SendEmailRequest">
- <wsdl:part name="parameters" element="tns:sendEmail"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="SendEmailResponse">
- <wsdl:part name="parameters" element="tns:sendEmailResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="EmailGateway">
- <wsdl:operation name="sendEmail">
- <wsdl:input message="tns:SendEmailRequest"></wsdl:input>
- <wsdl:output message="tns:SendEmailResponse"></wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="EmailGatwayBinding" type="tns:EmailGateway">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="sendEmail">
- <soap:operation soapAction="http://www.tuscanyscatours.com/EmailGateway/sendEmail" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="EmailGatewayService">
- <wsdl:port name="EmailGatewayPort" binding="tns:EmailGatwayBinding">
- <soap:address location="http://localhost:8080/EmailGateway" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="EmailGatewayLinkType">
- <plnk:role name="forward" portType="tns:EmailGateway"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d77df2fd7e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="scatours.emailgateway"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java deleted file mode 100644 index 1dfaf14eb0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java +++ /dev/null @@ -1,80 +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.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class EmailGatewayTestCase { - private static SCANode node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("emailgateway.composite", EmailGateway.class.getClassLoader()); - node.start(); - } - - @Test - public void testEmailGateway() { - SCAClient client = (SCAClient) node; - EmailGateway cc = client.getService(EmailGateway.class, "EmailGatewayClient"); - ObjectFactory objectFactory = new ObjectFactory(); - EmailType email = objectFactory.createEmailType(); - email.setTo("Fred"); - email.setTitle("An email"); - email.setBody("A message"); - 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 - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/client/EmailGatewayClientImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/client/EmailGatewayClientImpl.java deleted file mode 100644 index 074c3bffa4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/java/scatours/emailgateway/client/EmailGatewayClientImpl.java +++ /dev/null @@ -1,41 +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.client; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import scatours.emailgateway.EmailGateway; -import scatours.emailgateway.EmailType; - -/** - * - */ -@Service(EmailGateway.class) -public class EmailGatewayClientImpl implements EmailGateway { - @Reference - protected EmailGateway emailGateway; - - public String sendEmail(EmailType email) { - // Delegate the external web service - return emailGateway.sendEmail(email); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/EmailGatewayImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/EmailGatewayImpl.java deleted file mode 100644 index 6e971c3267..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-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/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index cd9f3c864c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.emailgateway"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/emailgateway.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/emailgateway.composite deleted file mode 100644 index 5daf27a61d..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/emailgateway-contribution/src/test/resources/emailgateway.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:c="http://creditcard" - targetNamespace="http://creditcard" - name="emailgateway"> - <component name="EmailGatewayClient"> - <implementation.java class="scatours.emailgateway.client.EmailGatewayClientImpl" /> - <reference name="emailGateway"> - <binding.ws uri="http://localhost:8082/EmailGateway" /> - </reference> - </component> - <component name="EmailGateway"> - <implementation.java class="scatours.emailgateway.EmailGatewayImpl" /> - <service name="EmailGateway"> - <binding.ws uri="http://localhost:8082/EmailGateway" /> - </service> - </component> -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/pom.xml deleted file mode 100644 index 2bd543e5ab..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-flight-contribution</artifactId> - <name>Apache Tuscany SCA Tours Flight Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/java/scatours/flight/FlightImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/java/scatours/flight/FlightImpl.java deleted file mode 100644 index 72c1c7201c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/java/scatours/flight/FlightImpl.java +++ /dev/null @@ -1,127 +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.flight; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import scatours.common.Book; -import scatours.common.Search; -import scatours.common.SearchCallback; -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * An implementation of the Hotel service - */ -@Scope("STATELESS") -@Service(interfaces={Search.class, Book.class}) -public class FlightImpl implements Search, Book { - - private List<FlightInfo> flights = new ArrayList<FlightInfo>(); - - @Callback - protected SearchCallback searchCallback; - - @Init - public void init() { - flights.add(new FlightInfo("EA26", - "Europe Airlines Airbus A300", - "LGW", - "FLR", - "06/12/09", - "06/12/09", - "350", - 250, - "EUR", - "http://localhost:8085/tbd" )); - flights.add(new FlightInfo("EA27", - "Europe Airlines Airbus A300", - "FLR", - "LGW", - "13/12/09", - "13/12/09", - "350", - 250, - "EUR", - "http://localhost:8085/tbd" )); - - } - - public TripItem[] searchSynch(TripLeg tripLeg) { - List<TripItem> items = new ArrayList<TripItem>(); - - // find outbound leg - for(FlightInfo flight : flights){ - if ((flight.getFromLocation().equals(tripLeg.getFromLocation())) && - (flight.getToLocation().equals(tripLeg.getToLocation())) && - (flight.getFromDate().equals(tripLeg.getFromDate()))){ - TripItem item = new TripItem("", - "", - TripItem.FLIGHT, - flight.getName(), - flight.getDescription(), - flight.getFromLocation() + " - " + flight.getToLocation(), - flight.getFromDate(), - flight.getToDate(), - flight.getPricePerSeat(), - flight.getCurrency(), - flight.getLink()); - items.add(item); - } - } - - // find return leg - for(FlightInfo flight : flights){ - if ((flight.getFromLocation().equals(tripLeg.getToLocation())) && - (flight.getToLocation().equals(tripLeg.getFromLocation())) && - (flight.getFromDate().equals(tripLeg.getToDate()))){ - TripItem item = new TripItem("", - "", - TripItem.FLIGHT, - flight.getName(), - flight.getDescription(), - flight.getFromLocation() + " - " + flight.getToLocation(), - flight.getFromDate(), - tripLeg.getToDate(), - flight.getPricePerSeat(), - flight.getCurrency(), - flight.getLink()); - items.add(item); - } - } - - return items.toArray(new TripItem[items.size()]); - } - - public void searchAsynch(TripLeg tripLeg) { - - // return available hotels - searchCallback.searchResults(searchSynch(tripLeg)); - } - - public String book(TripItem tripItem) { - return "flight1"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/java/scatours/flight/FlightInfo.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/java/scatours/flight/FlightInfo.java deleted file mode 100644 index fb5fb9fef5..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/java/scatours/flight/FlightInfo.java +++ /dev/null @@ -1,142 +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.flight; - - -public class FlightInfo { - - private String name; - private String description; - private String fromLocation; - private String toLocation; - private String fromDate; - private String toDate; - private String seats; - private double pricePerSeat; - private String currency; - private String link; - - public FlightInfo() { - } - - public FlightInfo(String name, - String description, - String fromLocation, - String toLocation, - String fromDate, - String toDate, - String seats, - double pricePerSeat, - String currency, - String link) { - - - this.name = name; - this.description = description; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.seats = seats; - this.pricePerSeat = pricePerSeat; - this.currency = currency; - this.link = link; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getFromLocation() { - return fromLocation; - } - - public void setFromLocation(String fromLocation) { - this.fromLocation = fromLocation; - } - - public String getToLocation() { - return toLocation; - } - - public void setToLocation(String toLocation) { - this.toLocation = toLocation; - } - - public String getFromDate() { - return fromDate; - } - - public void setFromDate(String fromDate) { - this.fromDate = fromDate; - } - - public String getToDate() { - return toDate; - } - - public void setToDate(String toDate) { - this.toDate = toDate; - } - - public String getSeats() { - return seats; - } - - public void setSeats(String seats) { - this.seats = seats; - } - - public double getPricePerSeat() { - return pricePerSeat; - } - - public void setPricePerSeat(double pricePerSeat) { - this.pricePerSeat = pricePerSeat; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } -}
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 394be817a9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/flight-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <export.java package="scatours.flight"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/pom.xml deleted file mode 100644 index 7e2f764dad..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-hotel-contribution</artifactId> - <name>Apache Tuscany SCA Tours Hotel Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/java/scatours/hotel/HotelImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/java/scatours/hotel/HotelImpl.java deleted file mode 100644 index a9a6d1bbde..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/java/scatours/hotel/HotelImpl.java +++ /dev/null @@ -1,116 +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.hotel; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import scatours.common.Book; -import scatours.common.Search; -import scatours.common.SearchCallback; -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * An implementation of the Hotel service - */ -@Scope("STATELESS") -@Service(interfaces={Search.class, Book.class}) -public class HotelImpl implements Search, Book { - - private List<HotelInfo> hotels = new ArrayList<HotelInfo>(); - - @Callback - protected SearchCallback searchCallback; - - @Init - public void init() { - hotels.add(new HotelInfo("Deep Bay Hotel", - "Wonderful sea views and a relaxed atmosphere", - "FLR", - "06/12/09", - "200", - 100, - "EUR", - "http://localhost:8085/tbd" )); - hotels.add(new HotelInfo("Long Bay Hotel", - "Friendly staff and an ocean breeze", - "FLR", - "06/12/09", - "200", - 100, - "EUR", - "http://localhost:8085/tbd" )); - hotels.add(new HotelInfo("City Hotel", - "Smart rooms and early breakfasts", - "FLR", - "06/12/09", - "200", - 100, - "EUR", - "http://localhost:8085/tbd" )); - hotels.add(new HotelInfo("County Hotel", - "The smell of the open country", - "FLR", - "06/12/09", - "200", - 100, - "EUR", - "http://localhost:8085/tbd" )); - } - - public TripItem[] searchSynch(TripLeg tripLeg) { - List<TripItem> items = new ArrayList<TripItem>(); - - // find available hotels - for(HotelInfo hotel : hotels){ - if (hotel.getLocation().equals(tripLeg.getToLocation())){ - TripItem item = new TripItem("", - "", - TripItem.HOTEL, - hotel.getName(), - hotel.getDescription(), - hotel.getLocation(), - tripLeg.getFromDate(), - tripLeg.getToDate(), - hotel.getPricePerBed(), - hotel.getCurrency(), - hotel.getLink()); - items.add(item); - } - } - - return items.toArray(new TripItem[items.size()]); - } - - public void searchAsynch(TripLeg tripLeg) { - - // return available hotels - searchCallback.searchResults(searchSynch(tripLeg)); - } - - public String book(TripItem tripItem) { - return "hotel1"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/java/scatours/hotel/HotelInfo.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/java/scatours/hotel/HotelInfo.java deleted file mode 100644 index 3b0d11d16e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/java/scatours/hotel/HotelInfo.java +++ /dev/null @@ -1,120 +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.hotel; - - -public class HotelInfo { - - private String name; - private String description; - private String location; - private String date; - private String beds; - private double pricePerBed; - private String currency; - private String link; - - public HotelInfo() { - } - - public HotelInfo(String name, - String description, - String location, - String date, - String beds, - double pricePerBed, - String currency, - String link) { - - this.name = name; - this.description = description; - this.location = location; - this.date = date; - this.beds = beds; - this.pricePerBed = pricePerBed; - this.currency = currency; - this.link = link; - } - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public String getBeds() { - return beds; - } - - public void setBeds(String beds) { - this.beds = beds; - } - - public double getPricePerBed() { - return pricePerBed; - } - - public void setPricePerBed(double pricePerBed) { - this.pricePerBed = pricePerBed; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 765c8d1cc3..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/hotel-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <export.java package="scatours.hotel"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/pom.xml deleted file mode 100644 index aee48250d6..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/pom.xml +++ /dev/null @@ -1,155 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-payment-java-contribution</artifactId> - <name>Apache Tuscany SCA Tours Payment Java Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-security</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-transaction</artifactId> - <version>1.6-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>Payment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/payment.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - <execution> - <id>payment.creditcard</id> - <phase>process-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment.creditcard</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>CreditCardPayment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <staleFile>${project.build.directory}/jaxws-source/stale/creditcard.stale</staleFile> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java deleted file mode 100644 index 8c9777fdd4..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java +++ /dev/null @@ -1,88 +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 payment; - -import javax.annotation.security.RolesAllowed; -import javax.annotation.security.RunAs; - -import org.osoa.sca.annotations.Authentication; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import payment.creditcard.AuthorizeFault_Exception; -import payment.creditcard.CreditCardDetailsType; -import payment.creditcard.CreditCardPayment; -import scatours.customer.Customer; -import scatours.customer.CustomerNotFoundException; -import scatours.customer.CustomerRegistry; -import scatours.emailgateway.EmailGateway; - -/** - * The payment implementation - */ -@Service(Payment.class) -@RolesAllowed({"Admin", "Billing"}) -@RunAs("Billing") -public class PaymentImpl implements Payment { - - @Reference - protected CustomerRegistry customerRegistry; - - @Reference - @Authentication - protected CreditCardPayment creditCardPayment; - - @Reference - protected EmailGateway emailGateway; - - @Property - protected float transactionFeeRate = 0.01f; - - public String makePaymentMember(String customerId, float amount) { - Customer customer = null; - - try { - customer = customerRegistry.getCustomer(customerId); - } catch (CustomerNotFoundException ex) { - return "Payment failed due to " + ex.getMessage(); - } catch (Throwable t) { - return "Payment failed due to system error " + t.getMessage(); - } - - CreditCardDetailsType ccDetails = customer.getCreditCard(); - - String status; - try { - status = creditCardPayment.authorize(ccDetails, amount); - } catch (AuthorizeFault_Exception e) { - status = e.getFaultInfo().getErrorCode(); - } - - StringBuffer body = new StringBuffer(); - body.append(customer); - body.append("\n").append("Status: ").append(status).append("\n"); - emailGateway.sendEmail("order@tuscanyscatours.com", customer.getEmail(), "Status for your payment", body - .toString()); - - return status; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java deleted file mode 100644 index 02918efb6c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java +++ /dev/null @@ -1,50 +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 payment.creditcard; - -import javax.annotation.security.RolesAllowed; - -import org.osoa.sca.annotations.Requires; -import org.osoa.sca.annotations.Service; - -@Service(CreditCardPayment.class) -@Requires("{http://www.osoa.org/xmlns/sca/1.0}authorization") -@RolesAllowed("Admin") -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCardDetailsType creditCard, float amount) throws AuthorizeFault_Exception { - if (creditCard != null) { - System.out.println("Checking card: name = " + creditCard.getCardOwner().getName() - + " number = " - + creditCard.getCreditCardNumber() - + " for amount " - + amount); - } else { - System.out.println("Checking card is null"); - ObjectFactory factory = new ObjectFactory(); - AuthorizeFault fault = factory.createAuthorizeFault(); - fault.setErrorCode("001 - Invalid card"); - AuthorizeFault_Exception ex = new AuthorizeFault_Exception("Invalid card", fault); - throw ex; - } - - return "OK"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/Customer.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/Customer.java deleted file mode 100644 index f80a691d96..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/Customer.java +++ /dev/null @@ -1,70 +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.customer; - -import payment.creditcard.CreditCardDetailsType; - -/** - * Customer data - */ -public class Customer { - private String id; - private String email; - private String name; - - private CreditCardDetailsType creditCard; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public CreditCardDetailsType getCreditCard() { - return creditCard; - } - - public void setCreditCard(CreditCardDetailsType creditCard) { - this.creditCard = creditCard; - } - - public String toString() { - return "id: " + id + " name: " + name + " e-mail: " + email; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerNotFoundException.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerNotFoundException.java deleted file mode 100644 index ebfb104650..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerNotFoundException.java +++ /dev/null @@ -1,58 +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.customer; - - -public class CustomerNotFoundException extends Exception { - private static final long serialVersionUID = -129752837478357452L; - - /** - * - */ - public CustomerNotFoundException() { - - } - - /** - * @param message - */ - public CustomerNotFoundException(String message) { - super(message); - - } - - /** - * @param cause - */ - public CustomerNotFoundException(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public CustomerNotFoundException(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerRegistry.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerRegistry.java deleted file mode 100644 index c7c9f11a6c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerRegistry.java +++ /dev/null @@ -1,39 +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.customer; - -import java.util.Collection; - -import payment.creditcard.CreditCardDetailsType; - -/** - * Customer registry interface - */ -public interface CustomerRegistry { - Customer createCustomer(String name, String email, CreditCardDetailsType creditCard); - - boolean updateCustomer(Customer customer); - - Customer getCustomer(String id) throws CustomerNotFoundException; - - Collection<Customer> getAllCustomers(); - - boolean deleteCustomer(String id); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerRegistryImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerRegistryImpl.java deleted file mode 100644 index 615f0ef1b9..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/customer/CustomerRegistryImpl.java +++ /dev/null @@ -1,112 +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.customer; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Requires; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import payment.creditcard.CreditCardDetailsType; -import payment.creditcard.CreditCardTypeType; -import payment.creditcard.ObjectFactory; -import payment.creditcard.PayerType; - -/** - * An in-memory customer registry implementation - */ -@Service(CustomerRegistry.class) -@Scope("COMPOSITE") -@EagerInit -@Requires("{http://www.osoa.org/xmlns/sca/1.0}managedTransaction.global") -public class CustomerRegistryImpl implements CustomerRegistry { - private volatile static int idGenerator = 0; - private Map<String, Customer> customers = new HashMap<String, Customer>(); - - @Init - public void init() { - // Load the customers - ObjectFactory factory = new ObjectFactory(); - CreditCardDetailsType cc = factory.createCreditCardDetailsType(); - PayerType john = factory.createPayerType(); - john.setName("John Smith"); - cc.setCardOwner(john); - cc.setCreditCardNumber("1111-2222-3333-4444"); - cc.setCreditCardType(CreditCardTypeType.VISA); - cc.setCVV2("1234"); - cc.setExpMonth(1); - cc.setExpYear(2012); - createCustomer("John Smith", "john@xyz.com", cc); - } - - @Destroy - public void destroy() { - // Save the customers - } - - public Customer createCustomer(String name, String email, CreditCardDetailsType creditCard) { - Customer customer = new Customer(); - customer.setId("c-" + idGenerator++); - customer.setName(name); - customer.setEmail(email); - customer.setCreditCard(creditCard); - customers.put(customer.getId(), customer); - return customer; - } - - public boolean deleteCustomer(String id) { - return customers.remove(id) != null; - } - - public Collection<Customer> getAllCustomers() { - return customers.values(); - } - - public Customer getCustomer(String id) throws CustomerNotFoundException { - Customer customer = customers.get(id); - - if (customer == null){ - throw new CustomerNotFoundException("Customer " + id + " not found"); - } - - return customer; - } - - public boolean updateCustomer(Customer customer) { - Customer current = null; - try { - current = getCustomer(customer.getId()); - } catch (Exception ex) { - return false; - } - - current.setEmail(customer.getEmail()); - current.setName(customer.getName()); - current.setCreditCard(customer.getCreditCard()); - return true; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java deleted file mode 100644 index 6c3662b265..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java +++ /dev/null @@ -1,30 +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.Remotable; - -/** - * A gateway to send e-mail - */ -@Remotable -public interface EmailGateway { - public boolean sendEmail(String sender, String recipient, String subject, String body); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java deleted file mode 100644 index b5a5debd38..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGatewayImpl.java +++ /dev/null @@ -1,35 +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 boolean sendEmail(String sender, String recipient, String subject, String body) { - System.out.println("From: " + sender); - System.out.println("To: " + recipient); - System.out.println("Subject: " + subject); - System.out.println(body); - return true; - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 7d30a6a395..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,130 +0,0 @@ -<?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.
--->
-<wsdl:definitions name="CreditCardPayment"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.tuscanyscatours.com/CreditCardPayment/"
- xmlns:tns="http://www.tuscanyscatours.com/CreditCardPayment/">
-
- <xsd:element name="authorize" type="tns:AuthorizeType"/>
- <xsd:complexType name="AuthorizeType">
- <xsd:sequence>
- <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
- <xsd:element name="Amount" type="xsd:float"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
- <xsd:complexType name="AuthorizeResponseType">
- <xsd:sequence>
- <xsd:element name="Status" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CreditCardDetailsType">
- <xsd:sequence>
- <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
- <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
- <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
- <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
- <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
- <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="CreditCardTypeType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="Visa" />
- <xsd:enumeration value="MasterCard" />
- <xsd:enumeration value="Discover" />
- <xsd:enumeration value="Amex" />
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="PayerType">
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" />
- <xsd:element name="Address" type="tns:AddressType" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string" />
- <xsd:element name="City" type="xsd:string" />
- <xsd:element name="State" type="xsd:string" />
- <xsd:element name="ZipCode" type="xsd:string" />
- <xsd:element name="HomePhone" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="authorizeFault">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="errorCode" type="xsd:string"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AuthorizeFault">
- <wsdl:part name="parameters" element="tns:authorizeFault"></wsdl:part>
- </wsdl:message>
- <wsdl:portType name="CreditCardPayment">
- <wsdl:operation name="authorize">
- <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
- <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
- <wsdl:fault name="authorizationFailure" message="tns:AuthorizeFault"></wsdl:fault> - </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="authorize">
- <soap:operation soapAction="http://www.tuscanyscatours.com/CreditCardPayment/authorize" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="authorizationFailure">
- <soap:fault name="authorizationFailure" use="literal"/>
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CreditCardPaymentService">
- <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
- <soap:address location="http://localhost:8080/CreditCardPayment" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="CreditCardPaymentLinkType">
- <plnk:role name="forward" portType="tns:CreditCardPayment"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7adba24d58..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <export.java package="payment"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/Payment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/Payment.wsdl deleted file mode 100644 index 2519d7642e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/Payment.wsdl +++ /dev/null @@ -1,83 +0,0 @@ -<?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. ---> -<wsdl:definitions name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/"> - - <xsd:complexType name="MakePaymentMemberType"> - <xsd:sequence> - <xsd:element name="CustomerId" type="xsd:string"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMember" type="tns:MakePaymentMemberType"/> - - <xsd:complexType name="MakePaymentMemberResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMemberResponse" type="tns:MakePaymentMemberResponseType"/> - - </xsd:schema> - </wsdl:types> - <wsdl:message name="MakePaymentMemberRequest"> - <wsdl:part name="parameters" element="tns:makePaymentMember"></wsdl:part> - </wsdl:message> - <wsdl:message name="MakePaymentMemberResponse"> - <wsdl:part name="parameters" element="tns:makePaymentMemberResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="Payment"> - <wsdl:operation name="makePaymentMember"> - <wsdl:input message="tns:MakePaymentMemberRequest"></wsdl:input> - <wsdl:output message="tns:MakePaymentMemberResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="PaymentBinding" type="tns:Payment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="makePaymentMember"> - <soap:operation soapAction="http://www.tuscanyscatours.com/Payment/makePayment" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="PaymentService"> - <wsdl:port name="PaymentPort" binding="tns:PaymentBinding"> - <soap:address location="http://localhost:8083/Payment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="PaymentLinkType"> - <plnk:role name="forward" portType="tns:Payment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/definitions.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/definitions.xml deleted file mode 100644 index 475d923506..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/definitions.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://www.osoa.org/xmlns/sca/1.0" - xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"> - - <!-- Policy Intents Defined by the SCA Runtime --> - <intent name="authorization" constrains="sca:implementation"/> - - <!-- Policy intents --> - <policySet name="ps1" provides="sca:authorization" appliesTo="sca:implementation.java"/> - - <policySet name="ps2" provides="sca:managedTransaction.global" appliesTo="sca:implementation.java"/> - -</definitions> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/payment.composite b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/payment.composite deleted file mode 100644 index 00ea330e79..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/main/resources/payment.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://scatours" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:c="http://scatours" - name="payment"> - - <component name="PaymentComponent"> - <implementation.java class="payment.PaymentImpl" /> - <reference name="customerRegistry" target="CustomerRegistryComponent"/> - <reference name="creditCardPayment" target="CreditCardPaymentComponent"/> - <reference name="emailGateway" target="EmailGatewayComponent"/> - <property name="transactionFeeRate">0.02</property> - </component> - - <component name="CustomerRegistryComponent"> - <implementation.java class="scatours.customer.CustomerRegistryImpl" /> - </component> - - <component name="EmailGatewayComponent"> - <implementation.java class="scatours.emailgateway.EmailGatewayImpl" /> - </component> - - <component name="CreditCardPaymentComponent"> - <implementation.java class="payment.creditcard.CreditCardPaymentImpl" /> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/test/java/payment/PaymentTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/test/java/payment/PaymentTestCase.java deleted file mode 100644 index d88764cfac..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/payment-java-contribution/src/test/java/payment/PaymentTestCase.java +++ /dev/null @@ -1,77 +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 payment; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class PaymentTestCase { - private static SCANode node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("payment.composite", Payment.class.getClassLoader()); - node.start(); - } - - @Test - public void testCreditCardPayment() { - SCAClient client = (SCAClient) node; - Payment payment = client.getService(Payment.class, "PaymentComponent"); - System.out.println(payment.makePaymentMember("c-0", 100.00f)); - System.out.println(payment.makePaymentMember("c-1", 100.00f)); - } - - @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 - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/pom.xml deleted file mode 100644 index dec2e0b4a1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5-SNAPSHOT</version> - <!--relativePath>../pom.xml</relativePath--> - </parent> - <artifactId>tuscany-scatours-common-contributions</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tours Common Contributions</name> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>calendar-contribution</module> - <module>car-contribution</module> - <module>common-contribution</module> - <module>creditcard-payment-jaxb-contribution</module> - <module>currency-contribution</module> - <module>emailgateway-contribution</module> - <module>flight-contribution</module> - <module>hotel-contribution</module> - <module>shoppingcart-contribution</module> - <module>travelcatalog-contribution</module> - <module>tripbooking-contribution</module> - <module>trip-contribution</module> - <module>scatours-contribution</module> - <module>payment-java-contribution</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/pom.xml deleted file mode 100644 index f56eab078f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-scatours-contribution</artifactId> - <name>Apache Tuscany SCA Tours SCATours Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-currency-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-travelcatalog-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-tripbooking-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-shoppingcart-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <!-- - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-paymentprocess-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - --> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursBooking.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursBooking.java deleted file mode 100644 index ac39443e9c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursBooking.java +++ /dev/null @@ -1,32 +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; - - -import org.osoa.sca.annotations.Remotable; - -import scatours.common.TripItem; - -/** - * The SCA Tours trip booking service interface - */ -@Remotable -public interface SCAToursBooking { - String bookTrip(String cartId, TripItem tripId); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursCart.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursCart.java deleted file mode 100644 index 74755f5e32..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursCart.java +++ /dev/null @@ -1,33 +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; - -import org.osoa.sca.annotations.Remotable; - -import scatours.common.TripItem; - -/** - * The ShoppingCart service interface - */ -@Remotable -public interface SCAToursCart{ - String newCart(); - TripItem[] getTrips(String cartId); - void checkout(String cartId); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursImpl.java deleted file mode 100644 index e38be75af7..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursImpl.java +++ /dev/null @@ -1,99 +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; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import scatours.common.TripItem; -import scatours.common.TripLeg; -import scatours.shoppingcart.ShoppingCart; -import scatours.travelcatalog.TravelCatalogSearch; -import scatours.tripbooking.TripBooking; - -/** - * An implementation of the SCA tours component. This component currently provides - * a front end to the components that the UI communicated with. It allows a conversation - * to be held with the shopping cart as javascript doesn't support conversations. - * Other than that it's just a pass through so we could look to remove it. - */ -@Scope("COMPOSITE") -@Service(interfaces={SCAToursSearch.class, SCAToursBooking.class, SCAToursCart.class}) -public class SCAToursImpl implements SCAToursSearch, SCAToursBooking, SCAToursCart{ - - @Reference - protected TravelCatalogSearch travelCatalogSearch; - - @Reference - protected TripBooking tripBooking; - - @Reference - protected ShoppingCart shoppingCart; - - @Context - protected ComponentContext componentContext; - - private Map<String,ShoppingCart> carts = new HashMap<String,ShoppingCart>(); - private Map<String,TripBooking> trips = new HashMap<String,TripBooking>(); - - // SCAToursSearch methods - - public TripItem[] search(TripLeg tripLeg) { - - return travelCatalogSearch.search(tripLeg); - - } - - // SCAToursBooking methods - - public String bookTrip(String cartId, TripItem trip){ - TripItem bookedTrip = tripBooking.bookTrip(cartId, trip); - carts.get(cartId).addTrip(bookedTrip); - return bookedTrip.getBookingCode(); - } - - // SCAToursCart methods - - public String newCart(){ - String cartId = UUID.randomUUID().toString(); - ServiceReference<ShoppingCart> shoppingCart = componentContext.getServiceReference(ShoppingCart.class, - "shoppingCart"); - shoppingCart.setConversationID(cartId); - carts.put(cartId, shoppingCart.getService()); - - return cartId; - } - - public TripItem[] getTrips(String cartId){ - return carts.get(cartId).getTrips(); - } - - public void checkout(String cartId){ - // need to get the user id from the context here - carts.get(cartId).checkout("Fred"); - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursSearch.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursSearch.java deleted file mode 100644 index f0f435fc06..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/java/scatours/SCAToursSearch.java +++ /dev/null @@ -1,32 +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; - -import org.osoa.sca.annotations.Remotable; - -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * The Trip service interface - */ -@Remotable -public interface SCAToursSearch { - TripItem[] search(TripLeg tripLeg); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 368e95ebd0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/scatours-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <import.java package="scatours.travelcatalog"/> - <import.java package="scatours.tripbooking"/> - <import.java package="scatours.shoppingcart"/> - <export.java package="scatours"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/pom.xml deleted file mode 100644 index 610471b9f2..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-shoppingcart-contribution</artifactId> - <name>Apache Tuscany SCA Tours Shopping Cart Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-currency-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-payment-java-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>payment</packageName> - <wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory> - <wsdlFiles> - <wsdlFile>Payment.wsdl</wsdlFile> - </wsdlFiles> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/java/scatours/shoppingcart/ShoppingCart.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/java/scatours/shoppingcart/ShoppingCart.java deleted file mode 100644 index f7595c71fe..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/java/scatours/shoppingcart/ShoppingCart.java +++ /dev/null @@ -1,39 +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.shoppingcart; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.Remotable; - -import scatours.common.TripItem; - -/** - * The ShoppingCart service interface - */ -@Remotable -@Conversational -public interface ShoppingCart{ - void addTrip(TripItem trip); - void removeTrip(TripItem trip); - TripItem[] getTrips(); - - @EndsConversation - void checkout(String name); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/java/scatours/shoppingcart/ShoppingCartImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/java/scatours/shoppingcart/ShoppingCartImpl.java deleted file mode 100644 index 5021f62715..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/java/scatours/shoppingcart/ShoppingCartImpl.java +++ /dev/null @@ -1,95 +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.shoppingcart; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import payment.Payment; -import scatours.common.TripItem; - -/** - * An implementation of the Trip service - */ -@Scope("CONVERSATION") -@Service(interfaces={ShoppingCart.class}) -public class ShoppingCartImpl implements ShoppingCart{ - - @Reference - protected Payment payment; - - @ConversationID - protected String cartId; - - private List<TripItem> trips = new ArrayList<TripItem>(); - - // Trip methods - - @Init - public void initCart() { - System.out.println("Cart init for id: " + cartId); - } - - @Destroy - public void destroyCart() { - System.out.println("Cart destroy for id: " + cartId); - } - - public void addTrip(TripItem trip) { - trips.add(trip); - } - - public void removeTrip(TripItem trip) { - trips.remove(trip); - } - - public TripItem[] getTrips(){ - return trips.toArray(new TripItem[trips.size()]); - } - - public void checkout(String customerName){ - // get users credentials. Hard coded for now but should - // come from the security context - String customerId = customerName; - - // get the total for all the trips - float amount = (float)0.0; - - for (TripItem trip : trips){ - if (trip.getType().equals(TripItem.TRIP)){ - amount += trip.getPrice(); - } else { - for (TripItem tripItem : trip.getTripItems()){ - amount += tripItem.getPrice(); - } - } - } - - // Take the payment from the customer - payment.makePaymentMember(customerId, amount); - } - -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f4010d04b1..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <import.java package="scatours.paymentprocess"/> - <export.java package="scatours.shoppingcart"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/resources/Payment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/resources/Payment.wsdl deleted file mode 100644 index 2519d7642e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/shoppingcart-contribution/src/main/resources/Payment.wsdl +++ /dev/null @@ -1,83 +0,0 @@ -<?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. ---> -<wsdl:definitions name="Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" - xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - <wsdl:types> - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.tuscanyscatours.com/Payment/" - xmlns:tns="http://www.tuscanyscatours.com/Payment/"> - - <xsd:complexType name="MakePaymentMemberType"> - <xsd:sequence> - <xsd:element name="CustomerId" type="xsd:string"></xsd:element> - <xsd:element name="Amount" type="xsd:float"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMember" type="tns:MakePaymentMemberType"/> - - <xsd:complexType name="MakePaymentMemberResponseType"> - <xsd:sequence> - <xsd:element name="Status" type="xsd:string"></xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:element name="makePaymentMemberResponse" type="tns:MakePaymentMemberResponseType"/> - - </xsd:schema> - </wsdl:types> - <wsdl:message name="MakePaymentMemberRequest"> - <wsdl:part name="parameters" element="tns:makePaymentMember"></wsdl:part> - </wsdl:message> - <wsdl:message name="MakePaymentMemberResponse"> - <wsdl:part name="parameters" element="tns:makePaymentMemberResponse"></wsdl:part> - </wsdl:message> - <wsdl:portType name="Payment"> - <wsdl:operation name="makePaymentMember"> - <wsdl:input message="tns:MakePaymentMemberRequest"></wsdl:input> - <wsdl:output message="tns:MakePaymentMemberResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="PaymentBinding" type="tns:Payment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="makePaymentMember"> - <soap:operation soapAction="http://www.tuscanyscatours.com/Payment/makePayment" /> - <wsdl:input> - <soap:body use="literal" /> - </wsdl:input> - <wsdl:output> - <soap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="PaymentService"> - <wsdl:port name="PaymentPort" binding="tns:PaymentBinding"> - <soap:address location="http://localhost:8083/Payment" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="PaymentLinkType"> - <plnk:role name="forward" portType="tns:Payment"/> - </plnk:partnerLinkType> -</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/pom.xml deleted file mode 100644 index 34beb37b5c..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-travelcatalog-contribution</artifactId> - <name>Apache Tuscany SCA Tours Travel Catalog Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-currency-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-tripbooking-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java deleted file mode 100644 index 4ad2c80c8f..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java +++ /dev/null @@ -1,132 +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.travelcatalog; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.RequestContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import scatours.common.Search; -import scatours.common.SearchCallback; -import scatours.common.TripItem; -import scatours.common.TripLeg; -import scatours.currencyconverter.CurrencyConverter; - -/** - * An implementation of the Trip service - */ -@Scope("COMPOSITE") -@Service(interfaces={TravelCatalogSearch.class}) -public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ - - @Reference - protected Search hotelSearch; - - @Reference - protected Search flightSearch; - - @Reference - protected Search carSearch; - - @Reference - protected Search tripSearch; - - @Property - public String quoteCurrencyCode = "USD"; - - @Reference - protected CurrencyConverter currencyConverter; - - @Context - protected ComponentContext componentContext; - - private int responsesReceived = 0; - - private List<TripItem> searchResults = new ArrayList<TripItem>(); - - // TravelSearch methods - - public TripItem[] search(TripLeg tripLeg) { - - searchResults.clear(); - responsesReceived = 0; - - ServiceReference<Search> dynamicHotelSearch = - componentContext.getServiceReference(Search.class, "hotelSearch"); - - dynamicHotelSearch.setCallbackID("HotelSearchCallbackID-" + tripLeg.getId()); - dynamicHotelSearch.getService().searchAsynch(tripLeg); - - flightSearch.searchAsynch(tripLeg); - carSearch.searchAsynch(tripLeg); - tripSearch.searchAsynch(tripLeg); - - while (responsesReceived < 4){ - try { - synchronized (this) { - this.wait(); - } - } catch (InterruptedException ex){ - // do nothing - } - } - - for (TripItem tripItem : searchResults){ - tripItem.setId(UUID.randomUUID().toString()); - tripItem.setTripId(tripLeg.getId()); - tripItem.setPrice(currencyConverter.convert(tripItem.getCurrency(), - quoteCurrencyCode, - tripItem.getPrice())); - tripItem.setCurrency(quoteCurrencyCode); - } - - return searchResults.toArray(new TripItem[searchResults.size()]); - } - - // SearchCallback methods - - public void searchResults(TripItem[] items){ - RequestContext requestContext = componentContext.getRequestContext(); - Object callbackID = requestContext.getServiceReference().getCallbackID(); - System.out.println(callbackID); - - if (items != null) { - for(int i = 0; i < items.length; i++ ){ - searchResults.add(items[i]); - } - } - - responsesReceived++; - try { - synchronized (this) { - this.notifyAll(); - } - } catch (Exception ex) { - } - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogSearch.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogSearch.java deleted file mode 100644 index df22724de2..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogSearch.java +++ /dev/null @@ -1,32 +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.travelcatalog; - -import org.osoa.sca.annotations.Remotable; - -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * The Trip service interface - */ -@Remotable -public interface TravelCatalogSearch { - TripItem[] search(TripLeg tripLeg); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 286b9c2a05..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/travelcatalog-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <import.java package="scatours.currencyconverter"/> - <export.java package="scatours.travelcatalog"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/pom.xml deleted file mode 100644 index 707ae97e5a..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-trip-contribution</artifactId> - <name>Apache Tuscany SCA Tours Prepackaged Trip Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/java/scatours/trip/TripImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/java/scatours/trip/TripImpl.java deleted file mode 100644 index 9d51c8078b..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/java/scatours/trip/TripImpl.java +++ /dev/null @@ -1,106 +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.trip; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import scatours.common.Book; -import scatours.common.Search; -import scatours.common.SearchCallback; -import scatours.common.TripItem; -import scatours.common.TripLeg; - -/** - * An implementation of the Hotel service - */ -@Scope("STATELESS") -@Service(interfaces={Search.class, Book.class}) -public class TripImpl implements Search, Book { - - private List<TripInfo> trips = new ArrayList<TripInfo>(); - - @Callback - protected SearchCallback searchCallback; - - @Init - public void init() { - trips.add(new TripInfo("FS1DEC06", - "Florence and Siena pre-packaged tour", - "LGW", - "FLR", - "06/12/09", - "13/12/09", - "27", - 450, - "EUR", - "http://localhost:8085/tbd" )); - trips.add(new TripInfo("FS1DEC13", - "Florence and Siena pre-packaged tour 2", - "LGW", - "FLR", - "13/12/09", - "20/12/09", - "27", - 550, - "EUR", - "http://localhost:8085/tbd" )); - } - - public TripItem[] searchSynch(TripLeg tripLeg) { - List<TripItem> items = new ArrayList<TripItem>(); - - // find the pre-package trip - for(TripInfo trip : trips){ - if ((trip.getFromLocation().equals(tripLeg.getFromLocation())) && - (trip.getToLocation().equals(tripLeg.getToLocation())) && - (trip.getFromDate().equals(tripLeg.getFromDate()))){ - TripItem item = new TripItem("", - "", - TripItem.TRIP, - trip.getName(), - trip.getDescription(), - trip.getFromLocation() + " - " + trip.getToLocation(), - trip.getFromDate(), - trip.getToDate(), - trip.getPricePerPerson(), - trip.getCurrency(), - trip.getLink()); - items.add(item); - } - } - - return items.toArray(new TripItem[items.size()]); - } - - public void searchAsynch(TripLeg tripLeg) { - - // return available hotels - searchCallback.searchResults(searchSynch(tripLeg)); - } - - public String book(TripItem tripItem) { - return "trip1"; - } -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/java/scatours/trip/TripInfo.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/java/scatours/trip/TripInfo.java deleted file mode 100644 index 343a3d2cef..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/java/scatours/trip/TripInfo.java +++ /dev/null @@ -1,142 +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.trip; - - -public class TripInfo { - - private String name; - private String description; - private String fromLocation; - private String toLocation; - private String fromDate; - private String toDate; - private String spaces; - private double pricePerPerson; - private String currency; - private String link; - - public TripInfo() { - } - - public TripInfo(String name, - String description, - String fromLocation, - String toLocation, - String fromDate, - String toDate, - String spaces, - double pricePerPerson, - String currency, - String link) { - - - this.name = name; - this.description = description; - this.fromLocation = fromLocation; - this.toLocation = toLocation; - this.fromDate = fromDate; - this.toDate = toDate; - this.spaces = spaces; - this.pricePerPerson = pricePerPerson; - this.currency = currency; - this.link = link; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getFromLocation() { - return fromLocation; - } - - public void setFromLocation(String fromLocation) { - this.fromLocation = fromLocation; - } - - public String getToLocation() { - return toLocation; - } - - public void setToLocation(String toLocation) { - this.toLocation = toLocation; - } - - public String getFromDate() { - return fromDate; - } - - public void setFromDate(String fromDate) { - this.fromDate = fromDate; - } - - public String getToDate() { - return toDate; - } - - public void setToDate(String toDate) { - this.toDate = toDate; - } - - public String getSpaces() { - return spaces; - } - - public void setSpaces(String spaces) { - this.spaces = spaces; - } - - public double getPricePerPerson() { - return pricePerPerson; - } - - public void setPricePerPerson(double pricePerPerson) { - this.pricePerPerson = pricePerPerson; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } -}
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 8a4f6abf02..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/trip-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <export.java package="scatours.trip"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/build.xml deleted file mode 100644 index b4fbc726cf..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/build.xml +++ /dev/null @@ -1,61 +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. ---> -<project name="gettingstarted" default="compile"> - <property environment="env"/> - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac srcdir="src" destdir="target/classes" - debug="on" source="1.5" target="1.5"> - <classpath> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </javac> - </target> - - <target name="run"> - <java classname="client.CurrencyConverterClient" fork="true"> - <classpath> - <pathelement path="src"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="runtrip"> - <java classname="client.TripClient" fork="true"> - <classpath> - <pathelement path="src"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="runtripws"> - <java classname="client.TripWsClient" fork="true"> - <classpath> - <pathelement path="src"/> - <pathelement path="target/classes"/> - <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/pom.xml deleted file mode 100644 index 97de81ad2e..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?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> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> - <!--relativePath>../../pom.xml</relativePath--> - </parent> - <artifactId>scatours-tripbooking-contribution</artifactId> - <name>Apache Tuscany SCA Tours Trip Booking Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-common-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-currency-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-shoppingcart-contribution</artifactId> - <version>1.6-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/java/scatours/tripbooking/TripBooking.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/java/scatours/tripbooking/TripBooking.java deleted file mode 100644 index 72320884e6..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/java/scatours/tripbooking/TripBooking.java +++ /dev/null @@ -1,32 +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.tripbooking; - -import org.osoa.sca.annotations.Remotable; - -import scatours.common.TripItem; - -/** - * The Trip service interface - */ -@Remotable -public interface TripBooking { - - TripItem bookTrip(String cartId, TripItem trip); -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/java/scatours/tripbooking/TripBookingImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/java/scatours/tripbooking/TripBookingImpl.java deleted file mode 100644 index 13c75de1f0..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/java/scatours/tripbooking/TripBookingImpl.java +++ /dev/null @@ -1,135 +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.tripbooking; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import scatours.common.Book; -import scatours.common.TripItem; -import scatours.shoppingcart.ShoppingCart; - -/** - * An implementation of the Trip service - */ -@Service(interfaces={TripBooking.class}) -public class TripBookingImpl implements TripBooking{ - - @Reference - protected Book hotelBook; - - @Reference - protected Book flightBook; - - @Reference - protected Book carBook; - - @Reference - protected Book tripBook; - - @Reference - protected ShoppingCart shoppingCart; - - @Context - protected ComponentContext componentContext; - - public TripItem bookTrip(String cartId, TripItem trip) { - - String bookingCode = ""; - - // book any nested items - TripItem[] nestedItems = trip.getTripItems(); - if (nestedItems != null){ - for(int i = 0; i < nestedItems.length; i++ ){ - TripItem tripItem = nestedItems[i]; - if (tripItem.getType().equals(TripItem.CAR)){ - tripItem.setBookingCode(carBook.book(tripItem)); - } else if (tripItem.getType().equals(TripItem.FLIGHT)){ - tripItem.setBookingCode(flightBook.book(tripItem)); - } else if (tripItem.getType().equals(TripItem.HOTEL)){ - tripItem.setBookingCode(hotelBook.book(tripItem)); - } else { - tripItem.setBookingCode(tripItem.getType() + " is invalid"); - } - } - } - - // book the top level item if it's a packaged trip - if (trip.getType().equals(TripItem.TRIP)){ - bookingCode = tripBook.book(trip); - trip.setBookingCode(bookingCode); - } - - // add trip to the shopping cart - //ServiceReference<ShoppingCart> cart = componentContext.getServiceReference(ShoppingCart.class, - // "shoppingCart"); - //cart.setConversationID(cartId); - //cart.getService().addTrip(trip); - - return trip; - } - - /* - @ConversationID - protected String conversationId; - - private Map<String, TripItem> tripItems = new HashMap<String, TripItem>(); - - // Trip methods - - @Init - public void initTrip() { - System.out.println("Trip init for id: " + conversationId); - } - - @Destroy - public void destroyTrip() { - System.out.println("Trip destroy for id: " + conversationId); - } - - - public void addTripItem(TripItem tripItem){ - tripItems.put(tripItem.getId(), tripItem); - } - - public void removeTripItem(String id){ - tripItems.remove(id); - } - - public TripItem[] getTripItems() { - return tripItems.values().toArray(new TripItem[tripItems.size()]); - } - - public double getTripPrice(){ - double totalPrice = 0.0; - - for (TripItem tripItem : tripItems.values()){ - totalPrice += tripItem.getPrice(); - } - - return totalPrice; - } - - public void bookTrip() { - // TODO - } - */ -} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2accecffaa..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/contrib/shared-contributions/tripbooking-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <import.java package="scatours.common"/> - <import.java package="scatours.currencyconverter"/> - <import.java package="scatours.shoppingcart"/> - <export.java package="scatours.tripbooking"/> -</contribution>
\ No newline at end of file |