diff options
Diffstat (limited to 'sca-java-2.x/trunk/tutorials/travelsample/contributions')
410 files changed, 0 insertions, 22442 deletions
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/build.xml deleted file mode 100644 index 2f0f6b12a5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/build.xml +++ /dev/null @@ -1,22 +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-contribution-blog-feed" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/pom.xml deleted file mode 100644 index e3f37cc21d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/pom.xml +++ /dev/null @@ -1,80 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-blog-feed</artifactId>
- <name>Apache Tuscany SCA Tours Blog Feed Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-atom</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-atom-runtime</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-rss-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/BlogPost.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/BlogPost.java deleted file mode 100644 index f93fe59b9d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/BlogPost.java +++ /dev/null @@ -1,68 +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.blog; - -import java.util.Date; - -/** - * Bean for blog posts. - */ -public class BlogPost { - - private final String author; - private final String title; - private final String content; - private final Date updated; - private final String link; - private final String related; - - public BlogPost(String author, String title, String content, Date updated, String link, String related) { - this.author = author; - this.title = title; - this.content = content; - this.updated = updated; - this.link = link; - this.related = related; - } - - public String getAuthor() { - return author; - } - - public String getTitle() { - return title; - } - - public String getContent() { - return content; - } - - public Date getUpdated() { - return updated; - } - - public String getLink() { - return link; - } - - public String getRelated() { - return related; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java deleted file mode 100644 index b7a392f927..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java +++ /dev/null @@ -1,124 +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.blog.feed.impl; - -import java.util.List; - -import org.apache.abdera.Abdera; -import org.apache.abdera.factory.Factory; -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.apache.tuscany.sca.binding.atom.collection.NotFoundException; - -import com.tuscanyscatours.blog.BlogPost; - -/** - * An Atom feed that implements the org.apache.tuscany.sca.binding.atom.collection.Collection - * interface and uses the Atom APIs to construct the Atom feed. - */ -public class AtomBlogFeedImpl extends BaseBlogFeedImpl implements - org.apache.tuscany.sca.binding.atom.collection.Collection { - - /** - * Gets an Atom feed containing all the blog posts. - * - * @return An Atom feed containing all the blog posts. - */ - public Feed getFeed() { - // Create SCA Tours blog Atom feed - final Factory factory = Abdera.getNewFactory(); - final Feed feed = factory.newFeed(); - feed.setTitle(FEED_TITLE); - feed.setSubtitle(FEED_DESCRIPTION); - feed.addAuthor(FEED_AUTHOR); - - // Get all blog posts and convert to Atom entries - final List<BlogPost> blogEntries = getAllBlogPosts(); - for (BlogPost blogEntry : blogEntries) { - final Entry entry = factory.newEntry(); - entry.setId(nextBlogID()); - entry.addAuthor(blogEntry.getAuthor()); - entry.setTitle(blogEntry.getTitle()); - entry.setContentAsHtml(blogEntry.getContent()); - entry.setUpdated(blogEntry.getUpdated()); - entry.addLink(blogEntry.getLink()); - feed.addEntry(entry); - } - - return feed; - } - - /** - * Query the feed. - * - * @param query The query - * @return Always returns null as method not implemented - */ - public Feed query(String query) { - // Not implemented - return null; - } - - /** - * Posts a new entry to the blog. - * - * @param entry The new entry - * @return Always returns null as method not implemented - */ - public Entry post(Entry entry) { - // Not implemented - return null; - } - - /** - * Gets the specified entry from the blog. - * - * @param id ID of the entry to get - * @return Not used - * @throws NotFoundException Always thrown as method not implemented - */ - public Entry get(String id) throws NotFoundException { - // Not implemented - throw new NotFoundException("You are not allowed to update entries"); - } - - /** - * Updates the specified entry on the blog. - * - * @param id ID of the entry to update - * @param entry The new entry - * @throws NotFoundException Always thrown as method not implemented - */ - public void put(String id, Entry entry) throws NotFoundException { - // Not implemented - throw new NotFoundException("You are not allowed to update entries"); - } - - /** - * Deletes the specified entry from the blog. - * - * @param id ID of the entry to delete - * @throws NotFoundException Always thrown as method not implemented - */ - public void delete(String id) throws NotFoundException { - // Not implemented - throw new NotFoundException("You are not allowed to delete entries"); - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java deleted file mode 100644 index f132d340ea..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.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 com.tuscanyscatours.blog.feed.impl; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - -import com.tuscanyscatours.blog.BlogPost; - -/** - * Base class for all blog feeds that provides the common methods - * that are shared by all the blog feed implementations. - */ -public abstract class BaseBlogFeedImpl { - - /** - * Title of the blog.feed. - */ - protected static final String FEED_TITLE = "Tuscany SCA Tours Blog Feed"; - - /** - * Description of the blog feed. - */ - protected static final String FEED_DESCRIPTION = "Feed contianing the latest blog posts from Tuscany SCA Tours"; - - /** - * Author of the blog feed. - */ - protected static final String FEED_AUTHOR = "SCA Tours CEO"; - - /** - * Used to generate unique IDs for the blog entries. - */ - protected static final AtomicInteger ID_GEN = new AtomicInteger(); - - /** - * Generates the next blog entry ID. - * - * @return Next blog entry ID - */ - protected String nextBlogID() { - return Integer.toString(ID_GEN.incrementAndGet()); - } - - /** - * Retrieves a list of all blog posts. - * - * @return A list of all blog posts. - */ - public List<BlogPost> getAllBlogPosts() { - // Note: To keep things simple, we will just hard code a sample post. - // A proper implementation would load all blog posts from some resource - // such as files or a database. - List<BlogPost> blogEntries = new ArrayList<BlogPost>(); - - // Create a sample entry - final BlogPost samplePost = - new BlogPost( - FEED_AUTHOR, - "Apache Tuscany in Action book features SCA Tours", - "We are famous as SCA Tours has been featured in the Apache Tuscany in Action book published by Manning", - new Date(), "http://www.manning.com/laws/", null); - - // Add sample post to the list of posts - blogEntries.add(samplePost); - - return blogEntries; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java deleted file mode 100644 index c427b658a4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.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 com.tuscanyscatours.blog.feed.impl; - -import java.util.List; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.Item; - -import com.tuscanyscatours.blog.BlogPost; - -/** - * Implementation of the blog feed that uses the Tuscany Data API so - * that it is independent of any Feed APIs such as Atom and RSS. - */ -public class GenericBlogFeedImpl extends BaseBlogFeedImpl { - - /** - * Implementation of the getAll() method from the Tuscany API - * that will return all of the blog posts as generic Tuscany - * feed items. - * - * @return All blog entries - */ - public Entry<Object, Object>[] getAll() { - final List<BlogPost> posts = getAllBlogPosts(); - - final Entry<Object, Object>[] entries = new Entry[posts.size()]; - int i = 0; - for (BlogPost post : posts) { - entries[i++] = convertBlogPostToFeedItem(post); - } - - return entries; - } - - /** - * Converts a blog post to a Tuscany API feed item. - * - * @param post The blog post to convert - * @return The blog post as a Tuscany API feed item - */ - private Entry<Object, Object> convertBlogPostToFeedItem(BlogPost post) { - // Convert Blog entry into an Item - final Item item = - new Item(post.getTitle(), post.getContent(), post.getLink(), post.getRelated(), post.getUpdated()); - - // Add item to entry - final Entry<Object, Object> entry = new Entry<Object, Object>(nextBlogID(), item); - - return entry; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java deleted file mode 100644 index efccffef67..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java +++ /dev/null @@ -1,94 +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.blog.feed.impl; - -import java.util.List; - -import org.apache.tuscany.sca.binding.rss.collection.NotFoundException; - -import com.sun.syndication.feed.synd.SyndContent; -import com.sun.syndication.feed.synd.SyndContentImpl; -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndEntryImpl; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.feed.synd.SyndFeedImpl; -import com.tuscanyscatours.blog.BlogPost; - -/** - * An RSS feed that implements the org.apache.tuscany.sca.binding.rss.collection.Collection - * interface and uses the RSS APIs to construct the RSS feed. - */ -public class RSSBlogFeedImpl extends BaseBlogFeedImpl implements - org.apache.tuscany.sca.binding.rss.collection.Collection { - - /** - * Gets an RSS feed containing all the blog posts. - * - * @return An RSS feed containing all the blog posts. - */ - public SyndFeed getFeed() { - // Create SCA Tours blog RSS feed - SyndFeed feed = new SyndFeedImpl(); - feed.setTitle(FEED_TITLE); - feed.setDescription(FEED_DESCRIPTION); - feed.setAuthor(FEED_AUTHOR); - - // Get all blog posts and convert to RSS entries - final List<BlogPost> blogEntries = getAllBlogPosts(); - for (BlogPost blogEntry : blogEntries) { - SyndEntry entry = new SyndEntryImpl(); - entry.setUri(nextBlogID()); - entry.setAuthor(blogEntry.getAuthor()); - entry.setTitle(blogEntry.getTitle()); - - SyndContent content = new SyndContentImpl(); - content.setType("text"); - content.setValue(blogEntry.getContent()); - - entry.setPublishedDate(blogEntry.getUpdated()); - entry.setLink(blogEntry.getLink()); - - feed.getEntries().add(entry); - } - - return feed; - } - - /** - * Query the feed. - * - * @param query The query - * @return Always returns null as method not implemented - */ - public SyndFeed query(String query) { - // Not implemented - return null; - } - - public SyndEntry get(String id) throws NotFoundException { - // Not implemented - return null; - } - - public List<SyndEntry> getAll() throws NotFoundException { - // Not implemented - return null; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 1259a688e3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,21 +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://docs.oasis-open.org/ns/opencsa/sca/200912">
-</contribution>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/blog-feed.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/blog-feed.composite deleted file mode 100644 index 8fb948dddc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/blog-feed.composite +++ /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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://tuscanyscatours.com/"
- name="blogFeed">
-
- <!-- Example that shows using the Tuscany Data APIs to create a feed that -->
- <!-- is independent of the Feed API -->
- <service name="BlogAtom" promote="BlogFeed">
- <tuscany:binding.atom uri="http://localhost:8090/BlogAtom"/>
- </service>
-
- <service name="BlogRSS" promote="BlogFeed">
- <tuscany:binding.rss uri="http://localhost:8090/BlogRSS"/>
- </service>
-
- <component name="BlogFeed">
- <implementation.java class="com.tuscanyscatours.blog.feed.impl.GenericBlogFeedImpl"/>
- </component>
-
- <!-- Example that shows using the Atom Collections API to create a feed that -->
- <!-- uses the Atom APIs -->
- <service name="BlogAtomAPIs" promote="BlogAtom">
- <tuscany:binding.atom uri="http://localhost:8090/BlogAtomAPIs"/>
- </service>
-
- <component name="BlogAtom">
- <implementation.java class="com.tuscanyscatours.blog.feed.impl.AtomBlogFeedImpl"/>
- </component>
-
- <!-- Example that shows using the RSS Collections API to create a feed that -->
- <!-- uses the RSS APIs -->
- <service name="BlogRSSAPIs" promote="BlogRSS">
- <tuscany:binding.rss uri="http://localhost:8090/BlogRSSAPIs"/>
- </service>
-
- <component name="BlogRSS">
- <implementation.java class="com.tuscanyscatours.blog.feed.impl.RSSBlogFeedImpl"/>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/build.xml deleted file mode 100644 index a30dd29ec9..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/build.xml +++ /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.
--->
-
-<project name="scatours-contributions" default="compile">
-
- <target name="compile">
- <antcall target="allsubdirs">
- <param name="target" value="compile"/>
- </antcall>
- </target>
-
- <target name="test">
- <antcall target="allsubdirs">
- <param name="target" value="test"/>
- </antcall>
- </target>
-
- <target name="clean">
- <antcall target="allsubdirs">
- <param name="target" value="clean"/>
- </antcall>
- </target>
-
- <target name="allsubdirs">
- <ant dir="blog-feed" target="${target}"/>
- <ant dir="introducing-trips" target="${target}"/> <!--needed by buildingblocks-->
- <ant dir="buildingblocks" target="${target}"/>
- <ant dir="buildingblocks-client" target="${target}"/>
- <ant dir="calendar" target="${target}"/>
- <ant dir="common" target="${target}"/> <!--needed by car-->
- <ant dir="car" target="${target}"/>
- <ant dir="creditcard-payment-jaxb" target="${target}"/>
- <ant dir="creditcard-payment-jaxb-policy" target="${target}"/>
- <ant dir="creditcard-payment-sdo" target="${target}"/>
- <ant dir="creditcard-payment-webapp" target="${target}"/>
- <ant dir="currency" target="${target}"/>
- <ant dir="currency-corba" target="${target}"/>
- <ant dir="currency-jms" target="${target}"/>
- <ant dir="currency-jsp" target="${target}"/>
- <ant dir="currency-rmi" target="${target}"/>
- <ant dir="currency-servlet" target="${target}"/>
- <ant dir="currency-ws" target="${target}"/>
- <ant dir="payment-java" target="${target}"/> <!--needed by databinding-client-->
- <ant dir="databinding-client" target="${target}"/>
- <ant dir="emailgateway" target="${target}"/>
- <ant dir="feed-logger" target="${target}"/>
- <ant dir="flight" target="${target}"/>
- <ant dir="fullapp-bespoketrip" target="${target}"/>
- <ant dir="fullapp-coordination" target="${target}"/>
- <ant dir="fullapp-currency" target="${target}"/>
- <ant dir="fullapp-packagedtrip" target="${target}"/>
- <ant dir="fullapp-shoppingcart" target="${target}"/>
- <ant dir="fullapp-ui" target="${target}"/>
- <ant dir="help-pages" target="${target}"/>
- <ant dir="hotel" target="${target}"/>
- <ant dir="shoppingcart" target="${target}"/> <!--needed by interaction-client-->
- <ant dir="interaction-client" target="${target}"/>
- <ant dir="interaction-service-remote" target="${target}"/>
- <ant dir="introducing-tours" target="${target}"/> <!--needed by introducing-client-->
- <ant dir="introducing-client" target="${target}"/>
- <ant dir="notification" target="${target}"/>
- <ant dir="notification-corba" target="${target}"/>
- <ant dir="notification-ejb" target="${target}"/>
- <ant dir="notification-jms" target="${target}"/>
- <ant dir="notification-rmi" target="${target}"/>
- <ant dir="notification-ws" target="${target}"/>
- <ant dir="payment-java-policy" target="${target}"/>
- <ant dir="payment-bpel-process" target="${target}"/> <!--needed by payment-bpel-->
- <ant dir="payment-bpel" target="${target}"/>
- <ant dir="payment-groovy" target="${target}"/>
- <ant dir="payment-spring" target="${target}"/>
- <ant dir="payment-spring-policy" target="${target}"/>
- <ant dir="payment-spring-scatag" target="${target}"/>
- <ant dir="policy-client" target="${target}"/>
- <ant dir="travelcatalog" target="${target}"/> <!--needed by scatours-->
- <ant dir="tripbooking" target="${target}"/> <!--needed by scatours-->
- <ant dir="scatours" target="${target}"/>
- <ant dir="trip" target="${target}"/>
- </target>
-
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/build.xml deleted file mode 100644 index 9ea7438516..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/build.xml +++ /dev/null @@ -1,22 +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-contribution-buildingblocks-client" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/pom.xml deleted file mode 100644 index 443edb6215..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/pom.xml +++ /dev/null @@ -1,111 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-buildingblocks-client</artifactId>
- <name>Apache Tuscany SCA Tours Building Blocks Client Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-buildingblocks</artifactId>
- <version>${pom.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-introducing-trips</artifactId>
- <version>${pom.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>${tuscany.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-all</artifactId>
- <version>5.2.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-web-demo</artifactId>
- </exclusion>
- </exclusions>
- <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-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Bookings.java deleted file mode 100644 index 9eb38a0a85..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/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 scatours;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Bookings {
- String newBooking(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.java deleted file mode 100644 index af9d8a1bbb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/Checkout.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 scatours;
-
-import java.math.BigDecimal;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Checkout {
- void makePayment(BigDecimal amount, String cardInfo);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.java deleted file mode 100644 index cd46a8915a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ApplClientImpl.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.impl;
-
-import java.math.BigDecimal;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import scatours.Bookings;
-import scatours.Checkout;
-
-@Service(Runnable.class)
-public class ApplClientImpl {
- @Reference
- protected Bookings bookings1, bookings2;
-
- @Reference
- protected Checkout checkout1, checkout2;
-
- public ApplClientImpl() {
- }
-
- public void run() {
- String bookingCode = bookings1.newBooking("FS1APR4", 1);
- System.out.println("Booking code is " + bookingCode);
-
- checkout1.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
-
- bookingCode = bookings2.newBooking("AC3MAY9", 2);
- System.out.println("Booking code is " + bookingCode);
-
- checkout2.makePayment(new BigDecimal("2295.00"), "9876123456784321 11/11");
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.java deleted file mode 100644 index d37860be3b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/java/scatours/impl/ToursClientImpl.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 scatours.impl;
-
-import java.math.BigDecimal;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import scatours.Bookings;
-import scatours.Checkout;
-
-@Service(Runnable.class)
-public class ToursClientImpl {
- @Reference
- protected Bookings bookings;
-
- @Reference
- protected Checkout checkout;
-
- public ToursClientImpl() {
- }
-
- public void run() {
- String bookingCode = bookings.newBooking("FS1APR4", 1);
- System.out.println("Booking code is " + bookingCode);
-
- checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 183ffa816b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tst="http://tuscanyscatours.com/">
- <deployable composite="tst:ToursApplClient" />
- <deployable composite="tst:ToursImplClient" />
- <deployable composite="tst:ToursImplIncludeClient" />
- <import namespace="http://tuscanyscatours.com/" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite deleted file mode 100644 index f0e33425e3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-appl-client.composite +++ /dev/null @@ -1,40 +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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- xmlns:tst="http://tuscanyscatours.com/"
- name="ToursApplClient">
-
- <component name="ApplClient">
- <implementation.java class="scatours.impl.ApplClientImpl" />
- <reference name="bookings1">
- <binding.ws uri="http://localhost:8081/BookTrip" />
- </reference>
- <reference name="checkout1">
- <binding.ws uri="http://localhost:8081/Checkout" />
- </reference>
- <reference name="bookings2">
- <binding.jms uri="jms:BookTrip" />
- </reference>
- <reference name="checkout2">
- <binding.jms uri="jms:Checkout" />
- </reference>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.composite deleted file mode 100644 index 6048ccda88..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-client.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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- xmlns:tst="http://tuscanyscatours.com/"
- name="ToursImplClient">
-
- <component name="ToursClient">
- <implementation.java class="scatours.impl.ToursClientImpl" />
- <reference name="bookings" target="MyTours/BookTrip" />
- <reference name="checkout" target="MyTours/Checkout" />
- </component>
-
- <include name="tst:ToursImpl" />
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.composite deleted file mode 100644 index 49967db666..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/main/resources/tours-impl-include-client.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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- xmlns:tst="http://tuscanyscatours.com/"
- name="ToursImplIncludeClient">
-
- <component name="ToursClient">
- <implementation.java class="scatours.impl.ToursClientImpl" />
- <reference name="bookings" target="MyTours/BookTrip" />
- <reference name="checkout" target="MyTours/Checkout" />
- </component>
-
- <include name="tst:ToursImplInclude" />
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.java deleted file mode 100644 index 6115833182..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksApplTestCase.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 scatours;
-
-import org.apache.activemq.broker.BrokerService;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests the Building Blocks Composite Application scenario
- */
-public class BuildingBlocksApplTestCase {
-
- private BrokerService jmsBroker;
- private Node node1, node2;
-
- @Before
- public void startServer() throws Exception {
- jmsBroker = new BrokerService();
- jmsBroker.setPersistent(false);
- jmsBroker.setUseJmx(false);
- jmsBroker.addConnector("tcp://localhost:61619");
-
- node1 = NodeFactory.getInstance().createNode("tours-appl.composite",
- new Contribution("introducing-trips", "../introducing-trips/target/classes"),
- new Contribution("buildingblocks", "../buildingblocks/target/classes"));
-
- node2 = NodeFactory.getInstance().createNode("tours-appl-client.composite",
- new Contribution("buildingblocks-client", "./target/classes"));
-
- jmsBroker.start();
- node1.start();
- node2.start();
- }
-
- @Test
- public void testAppl() {
- Runnable client = ((Node)node2).getService(Runnable.class, "ApplClient/Runnable");
- client.run();
- }
-
- @After
- public void stopServer() throws Exception {
- if (node2 != null) {
- node2.stop();
- }
- if (node1 != null) {
- node1.stop();
- }
- if (jmsBroker != null) {
- jmsBroker.stop();
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java deleted file mode 100644 index ebc278f5b4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java +++ /dev/null @@ -1,59 +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.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests the Building Blocks Composite Implementation Include scenario
- */
-public class BuildingBlocksImplIncludeTestCase {
-
- private Node node;
-
- @Before
- public void startServer() throws Exception {
- node = NodeFactory.getInstance().createNode("tours-impl-include-client.composite",
- new Contribution("introducing-trips", "../introducing-trips/target/classes"),
- new Contribution("buildingblocks", "../buildingblocks/target/classes"),
- new Contribution("buildingblocks-client", "./target/classes"));
-
- node.start();
- }
-
- @Test
- public void testImplInclude() {
- Runnable client = ((Node)node).getService(Runnable.class, "ToursClient/Runnable");
- client.run();
- }
-
- @After
- public void stopServer() throws Exception {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.java deleted file mode 100644 index 9356a2b146..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/java/scatours/BuildingBlocksImplTestCase.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;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests the Building Blocks Composite Implementation scenario
- */
-public class BuildingBlocksImplTestCase {
-
- private Node node;
-
- @Before
- public void startServer() throws Exception {
- node = NodeFactory.getInstance().createNode("tours-impl-client.composite",
- new Contribution("buildingblocks", "../buildingblocks/target/classes"),
- new Contribution("buildingblocks-client", "./target/classes"));
-
- node.start();
- }
-
- @Test
- public void testImpl() {
- Runnable client = ((Node)node).getService(Runnable.class, "ToursClient/Runnable");
- client.run();
- }
-
- @After
- public void stopServer() throws Exception {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties deleted file mode 100644 index 88270fd1e0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks-client/src/test/resources/jndi.properties +++ /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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.BookTrip = BookTripRequestQueue
-queue.Checkout = CheckoutRequestQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/build.xml deleted file mode 100644 index 1e23144229..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/build.xml +++ /dev/null @@ -1,22 +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-contribution-buildingblocks" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/pom.xml deleted file mode 100644 index bf5ad5c51a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/pom.xml +++ /dev/null @@ -1,84 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-buildingblocks</artifactId>
- <name>Apache Tuscany SCA Tours Building Blocks Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-introducing-trips</artifactId>
- <version>${pom.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/budgettours/Tours.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/budgettours/Tours.java deleted file mode 100644 index 748e88ee09..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/budgettours/Tours.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.budgettours;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Tours {
- String checkAvailability(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/budgettours/impl/TourProviderImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/budgettours/impl/TourProviderImpl.java deleted file mode 100644 index 8e48625f0c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/budgettours/impl/TourProviderImpl.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.budgettours.impl;
-
-import com.budgettours.Tours;
-
-public class TourProviderImpl implements Tours {
- public String checkAvailability(String trip, int people) {
- // call non-SCA code to reserve trip and return booking code
- return "5Q87X";
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/goodvaluetrips/Trips.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/goodvaluetrips/Trips.java deleted file mode 100644 index 5026d23c95..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Trips {
- String checkAvailability(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Bookings.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Bookings.java deleted file mode 100644 index 4ddd145778..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Bookings {
- String newBooking(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Checkout.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Checkout.java deleted file mode 100644 index 4e8f1481f5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Checkout.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;
-
-import java.math.BigDecimal;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Checkout {
- void makePayment(BigDecimal amount, String cardInfo);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Updates.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/Updates.java deleted file mode 100644 index beb5f529b1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Updates {
- void addTrip(String resCode);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/impl/ShoppingCartImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/impl/ShoppingCartImpl.java deleted file mode 100644 index 629ea7b5ec..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/impl/ShoppingCartImpl.java +++ /dev/null @@ -1,49 +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.impl;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.tuscanyscatours.Checkout;
-import com.tuscanyscatours.Updates;
-
-public class ShoppingCartImpl implements Checkout, Updates {
- private static List<String> bookedTrips = new ArrayList<String>();
-
- protected String currency = "USD";
-
- public void makePayment(BigDecimal amount, String cardInfo) {
- System.out.print("Charged " + currency + " " + amount
- + " to card "
- + cardInfo
- + " for "
- + (bookedTrips.size() > 1 ? "trips" : "trip"));
- for (String trip : bookedTrips) {
- System.out.print(" " + trip);
- }
- System.out.println();
- bookedTrips.clear();
- }
-
- public void addTrip(String resCode) {
- bookedTrips.add(resCode);
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/impl/TripBookingImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/impl/TripBookingImpl.java deleted file mode 100644 index 1259fa7d82..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/com/tuscanyscatours/impl/TripBookingImpl.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 com.tuscanyscatours.impl;
-
-import org.oasisopen.sca.annotation.Reference;
-
-import com.goodvaluetrips.Trips;
-import com.tuscanyscatours.Bookings;
-import com.tuscanyscatours.Updates;
-
-public class TripBookingImpl implements Bookings {
- @Reference
- protected 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-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/scatours/impl/TripProviderImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/scatours/impl/TripProviderImpl.java deleted file mode 100644 index a95f01c519..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/java/scatours/impl/TripProviderImpl.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 scatours.impl;
-
-import com.goodvaluetrips.Trips;
-
-public class TripProviderImpl implements Trips {
- public String checkAvailability(String trip, int people) {
- // scaffolded test code to return an arbitrary booking code
- return "7S09Z";
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 697b706163..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/META-INF/sca-contribution.xml +++ /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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tst="http://tuscanyscatours.com/">
- <deployable composite="tst:ToursAppl" />
- <deployable composite="tst:ToursImpl" />
- <deployable composite="tst:ToursImplInclude" />
- <import namespace="http://goodvaluetrips.com/" />
- <export namespace="http://tuscanyscatours.com/" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-appl.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-appl.composite deleted file mode 100644 index 6d0a1c1f0d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-appl.composite +++ /dev/null @@ -1,54 +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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- xmlns:bb="http://bb.tuscanyscatours.com/"
- xmlns:gvt="http://goodvaluetrips.com/"
- name="ToursAppl">
-
- <component name="WSTours">
- <implementation.composite name="bb:Tours" />
- <service name="BookTrip">
- <binding.ws uri="http://localhost:8081/BookTrip" />
- </service>
- <service name="Checkout">
- <binding.ws uri="http://localhost:8081/Checkout" />
- </service>
- <reference name="trips" target="TripProvider/Trips" />
- </component>
-
- <component name="JMSTours">
- <implementation.composite name="bb:Tours" />
- <service name="BookTrip">
- <binding.jms uri="jms:BookTrip" />
- </service>
- <service name="Checkout">
- <binding.jms uri="jms:Checkout" />
- </service>
- <reference name="trips" target="TourProvider/Tours" />
- </component>
-
- <include name="gvt:Trips" />
-
- <component name="TourProvider">
- <implementation.java class="com.budgettours.impl.TourProviderImpl" />
- <service name="Tours" />
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-impl-include.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-impl-include.composite deleted file mode 100644 index 1441702a98..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-impl-include.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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- xmlns:bb="http://bb.tuscanyscatours.com/"
- xmlns:gvt="http://goodvaluetrips.com/"
- name="ToursImplInclude">
-
- <component name="MyTours">
- <implementation.composite name="bb:Tours" />
- <reference name="trips" target="TripProvider/Trips" />
- <property name="currency">GBP</property>
- </component>
-
- <include name="gvt:Trips" />
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-impl.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-impl.composite deleted file mode 100644 index c1a7643df6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours-impl.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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://tuscanyscatours.com/"
- xmlns:bb="http://bb.tuscanyscatours.com/"
- name="ToursImpl">
-
- <component name="MyTours">
- <implementation.composite name="bb:Tours" />
- <reference name="trips" target="TripProvider/Trips" />
- <property name="currency">GBP</property>
- </component>
-
- <component name="TripProvider">
- <implementation.java class="scatours.impl.TripProviderImpl" />
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours.composite deleted file mode 100644 index d2d74d08fc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/main/resources/tours.composite +++ /dev/null @@ -1,43 +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/200912"
- targetNamespace="http://bb.tuscanyscatours.com/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- name="Tours">
-
- <service name="BookTrip" promote="TripBooking/Bookings" />
- <service name="Checkout" promote="ShoppingCart/Checkout" />
- <reference name="trips" promote="TripBooking/mytrips" />
- <property name="currency" type="xs:string">USD</property>
-
- <component name="TripBooking">
- <implementation.java class="com.tuscanyscatours.impl.TripBookingImpl" />
- <service name="Bookings" />
- <reference name="mytrips" />
- <reference name="cart" target="ShoppingCart/Updates" />
- </component>
-
- <component name="ShoppingCart">
- <implementation.java class="com.tuscanyscatours.impl.ShoppingCartImpl"/>
- <service name="Updates" />
- <service name="Checkout" />
- <property name="currency" source="$currency"/>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.java deleted file mode 100644 index 6c9079e5ab..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/test/java/scatours/BuildingBlocksImplIncludeTestCase.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.math.BigDecimal;
-
-import com.tuscanyscatours.Bookings;
-import com.tuscanyscatours.Checkout;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests the Building Blocks Composite Implementation Include scenario
- */
-public class BuildingBlocksImplIncludeTestCase {
-
- private Node node;
-
- @Before
- public void startServer() throws Exception {
- node = NodeFactory.getInstance().createNode("tours-impl-include.composite",
- new Contribution("introducing-trips", "../introducing-trips/target/classes"),
- new Contribution("buildingblocks", "./target/classes"));
- node.start();
- }
-
- @Test
- public void testImplInclude() {
- Bookings bookings = ((Node)node).getService(Bookings.class, "MyTours/BookTrip");
- String bookingCode = bookings.newBooking("FS1APR4", 1);
- System.out.println("Booking code is " + bookingCode);
-
- Checkout checkout = ((Node)node).getService(Checkout.class, "MyTours/Checkout");
- checkout.makePayment(new BigDecimal("1995.00"), "1234567801234567 11/10");
- }
-
- @After
- public void stopServer() throws Exception {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/test/java/scatours/BuildingBlocksImplTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/test/java/scatours/BuildingBlocksImplTestCase.java deleted file mode 100644 index f74304409d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/buildingblocks/src/test/java/scatours/BuildingBlocksImplTestCase.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.math.BigDecimal;
-
-import com.tuscanyscatours.Bookings;
-import com.tuscanyscatours.Checkout;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests the Building Blocks Composite Implementation scenario
- */
-public class BuildingBlocksImplTestCase {
-
- private Node node;
-
- @Before
- public void startServer() throws Exception {
- node = NodeFactory.getInstance().createNode("tours-impl.composite",
- new Contribution("buildingblocks", "./target/classes"));
- node.start();
- }
-
- @Test
- public void testImpl() {
- Bookings bookings = ((Node)node).getService(Bookings.class, "MyTours/BookTrip");
- String bookingCode = bookings.newBooking("FS1APR4", 1);
- System.out.println("Booking code is " + bookingCode);
-
- Checkout checkout = ((Node)node).getService(Checkout.class, "MyTours/Checkout");
- checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
- }
-
- @After
- public void stopServer() throws Exception {
- if (node != null) {
- node.stop();
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/build.xml deleted file mode 100644 index ae6a47dafb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/build.xml +++ /dev/null @@ -1,22 +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-contribution-calendar" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/pom.xml deleted file mode 100644 index b3926ca633..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/pom.xml +++ /dev/null @@ -1,64 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-calendar</artifactId>
- <name>Apache Tuscany SCA Tours Calendar Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>${tuscany.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-node-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/java/com/tuscanyscatours/calendar/Calendar.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/java/com/tuscanyscatours/calendar/Calendar.java deleted file mode 100644 index daa5127511..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/java/com/tuscanyscatours/calendar/Calendar.java +++ /dev/null @@ -1,25 +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.calendar;
-
-public interface Calendar {
-
- String getEndDate(String startDate, int duration);
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/java/com/tuscanyscatours/calendar/impl/CalendarImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/java/com/tuscanyscatours/calendar/impl/CalendarImpl.java deleted file mode 100644 index 4e6e7b161b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/java/com/tuscanyscatours/calendar/impl/CalendarImpl.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 com.tuscanyscatours.calendar.impl;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import com.tuscanyscatours.calendar.Calendar;
-
-/**
- * An implementation of the Calendar 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-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e37c61d48b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <export.java package="com.tuscanyscatours.calendar" />
- <export.java package="com.tuscanyscatours.calendar.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/java/scatours/calendar/CalendarTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/java/scatours/calendar/CalendarTestCase.java deleted file mode 100644 index 339c3ed41e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/java/scatours/calendar/CalendarTestCase.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.calendar;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.tuscanyscatours.calendar.Calendar;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class CalendarTestCase {
-
- private Node node;
-
- @Before
- public void startNode() throws Exception {
- node =
- NodeFactory.getInstance().createNode("calendar.composite",
- new Contribution("calendar", "./target/classes"),
- new Contribution("calendar-test", "./target/test-classes"));
- node.start();
- }
-
- @Test
- public void testCalendar() throws Exception {
- Calendar calendar = ((Node)node).getService(Calendar.class, "Calendar");
- System.out.println(calendar.getEndDate("07/10/96 04:05", 3));
- }
-
- @After
- public void stopNode() throws Exception {
- node.stop();
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 87e99010b8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.calendar" />
- <import.java package="com.tuscanyscatours.calendar.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/resources/calendar.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/resources/calendar.composite deleted file mode 100644 index 3ddb33db80..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/calendar/src/test/resources/calendar.composite +++ /dev/null @@ -1,28 +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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="calendar">
-
- <component name="Calendar">
- <implementation.java class="com.tuscanyscatours.calendar.impl.CalendarImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/build.xml deleted file mode 100644 index 46392d4b24..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/build.xml +++ /dev/null @@ -1,25 +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-contribution-car" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/pom.xml deleted file mode 100644 index e71040dc04..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-car</artifactId>
- <name>Apache Tuscany SCA Tours Car Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/car/src/main/java/com/tuscanyscatours/car/impl/CarImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/src/main/java/com/tuscanyscatours/car/impl/CarImpl.java deleted file mode 100644 index 672afbc609..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/src/main/java/com/tuscanyscatours/car/impl/CarImpl.java +++ /dev/null @@ -1,91 +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.car.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.Book;
-import com.tuscanyscatours.common.Search;
-import com.tuscanyscatours.common.SearchCallback;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-
-/**
- * An implementation of the Car service
- */
-@Scope("STATELESS")
-@Service({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) {
- System.out.println("Starting car search");
-
- try {
- Thread.sleep(4000);
- } catch (Exception ex) {
- // do nothing
- }
-
- // return available hotels
- searchCallback.searchResults(searchSynch(tripLeg));
- }
-
- public int getPercentComplete() {
- return 100;
- }
-
- public String book(TripItem tripItem) {
- return "car1";
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/src/main/java/com/tuscanyscatours/car/impl/CarInfo.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/src/main/java/com/tuscanyscatours/car/impl/CarInfo.java deleted file mode 100644 index c373079ac1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/src/main/java/com/tuscanyscatours/car/impl/CarInfo.java +++ /dev/null @@ -1,118 +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.car.impl;
-
-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-2.x/trunk/tutorials/travelsample/contributions/car/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 67fcaf8c6c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/car/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common"/>
- <export.java package="com.tuscanyscatours.car.impl"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/build.xml deleted file mode 100644 index 85cec507ff..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/build.xml +++ /dev/null @@ -1,22 +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-contribution-common" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/pom.xml deleted file mode 100644 index 2a8e684d5d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-common</artifactId>
- <name>Apache Tuscany SCA Tours Common Artefacts Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Book.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Book.java deleted file mode 100644 index 797957250a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.common;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Book {
- String book(TripItem tripItem);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.java deleted file mode 100644 index f304141a06..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.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.common;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.OneWay;
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-@Callback(SearchCallback.class)
-public interface Search {
- TripItem[] searchSynch(TripLeg tripLeg);
-
- @OneWay
- void searchAsynch(TripLeg tripLeg);
-
- int getPercentComplete();
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.java deleted file mode 100644 index 2a527d0461..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.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.common;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface SearchCallback {
- void searchResults(TripItem[] items);
- void setPercentComplete(String searchComponent, int percentComplete);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java deleted file mode 100644 index 2f2a6299f9..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java +++ /dev/null @@ -1,242 +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.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 String toString() {
- String tripString =
- "Trip: id " + this.tripId
- + " type "
- + this.type
- + " name "
- + this.name
- + " description "
- + this.description
- + " location "
- + this.location
- + " fromDate "
- + this.fromDate
- + " toDate "
- + this.toDate
- + " price "
- + this.price
- + " currency "
- + this.currency
- + " link "
- + this.link;
- return tripString;
- }
-
- @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-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java deleted file mode 100644 index 663634b1e9..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java +++ /dev/null @@ -1,85 +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.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-2.x/trunk/tutorials/travelsample/contributions/common/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index cebda8d6d6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/common/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <export.java package="com.tuscanyscatours.common" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/build.xml deleted file mode 100644 index 93d1c4ad47..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-creditcard-payment-jaxb-policy" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/maven-eclipse.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/maven-eclipse.xml deleted file mode 100644 index 3adfca89f4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/maven-eclipse.xml +++ /dev/null @@ -1,8 +0,0 @@ -<project default="copy-resources"> - <target name="init"/> - <target name="copy-resources" depends="init"> - <copy todir="target/classes/META-INF" filtering="true"> - <fileset dir="." includes="LICENSE|NOTICE" excludes="**/*.java"/> - </copy> - </target> -</project>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/pom.xml deleted file mode 100644 index 9cf48a1c7d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/pom.xml +++ /dev/null @@ -1,150 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-creditcard-payment-jaxb-policy</artifactId> - <name>Apache Tuscany SCA Tours Credit Card Payment Contribution JAXB Policy</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-interface-java-jaxws</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</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> - <snapshots> - <enabled>false</enabled> - </snapshots> - </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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java deleted file mode 100644 index f7723ab5b5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.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 com.tuscanyscatours.payment.creditcard.impl; - -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType; -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index f313043bf8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,134 +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/">
-
- <!-- https://jaxb.dev.java.net/issues/show_bug.cgi?id=518 -->
- <!-- I have to change the complex types to be annoymous -->
- <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: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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 6348027529..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:creditcard" /> - <export.java package="com.tuscanyscatours.payment.creditcard" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite deleted file mode 100644 index 77ecdef0df..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="creditcard"> - - <component name="CreditCardPayment"> - <implementation.java class="com.tuscanyscatours.payment.creditcard.impl.CreditCardPaymentImpl" /> - <service name="CreditCardPayment"> - <interface.wsdl interface="http://www.tuscanyscatours.com/CreditCardPayment/#wsdl.interface(CreditCardPayment)" /> - <binding.ws uri="http://localhost:8082/CreditCardPayment" requires="authentication"/> - <binding.sca/> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/definitions.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/definitions.xml deleted file mode 100644 index 97711eb9aa..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/definitions.xml +++ /dev/null @@ -1,36 +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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://itest/policy" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:ip="http://itest/policy" > - - - <policySet name="BasicAuthenticationPolicySet" - provides="authentication" - appliesTo="sca:binding.ws"> - <tuscany:basicAuthentication> - <tuscany:userName>myname</tuscany:userName> - <tuscany:password>mypassword</tuscany:password> - </tuscany:basicAuthentication> - </policySet> - -</definitions>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java deleted file mode 100644 index 38834709b0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.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.payment.creditcard; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception; -import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType; -import com.tuscanyscatours.payment.creditcard.CreditCardPayment; -import com.tuscanyscatours.payment.creditcard.CreditCardTypeType; -import com.tuscanyscatours.payment.creditcard.ObjectFactory; -import com.tuscanyscatours.payment.creditcard.PayerType; - -/** - * - */ -public class CreditCardPaymentTestCase { - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - try { - node = - NodeFactory.getInstance().createNode("creditcard.composite", new Contribution("creditcard", "./target/classes")); - - node.start(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @Test - public void testCreditCardPayment() { - Node client = (Node)node; - CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment"); - - ObjectFactory objectFactory = new ObjectFactory(); - CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType(); - ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa")); - PayerType ccOwner = objectFactory.createPayerType(); - ccOwner.setName("Fred"); - ccDetails.setCardOwner(ccOwner); - - try { - System.out.println(cc.authorize(ccDetails, 100.00f)); - } catch (AuthorizeFault_Exception e) { - System.err.println("Fault: " + e.getFaultInfo().getErrorCode()); - } - } - - @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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/build.xml deleted file mode 100644 index 9e0ac7fff9..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-creditcard-payment-jaxb" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/pom.xml deleted file mode 100644 index db519eb5cd..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/pom.xml +++ /dev/null @@ -1,150 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-creditcard-payment-jaxb</artifactId>
- <name>Apache Tuscany SCA Tours Credit Card Payment Contribution JAXB</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-java-jaxws</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</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>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java deleted file mode 100644 index 13dc7428d1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.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 com.tuscanyscatours.payment.creditcard.impl;
-
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 6dcc619c48..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,134 +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/">
-
- <!-- https://jaxb.dev.java.net/issues/show_bug.cgi?id=518 -->
- <!-- I have to change the complex types to be annoymous -->
- <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: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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f29ddff781..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:scatours="http://tuscanyscatours.com/">
- <deployable composite="scatours:creditcard" />
- <export.java package="com.tuscanyscatours.payment.creditcard" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/creditcard.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/creditcard.composite deleted file mode 100644 index 1e07159fbc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/main/resources/creditcard.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://docs.oasis-open.org/ns/opencsa/sca/200912" name="creditcard" targetNamespace="http://tuscanyscatours.com/"> - <component name="CreditCardPayment"> - <implementation.java class="com.tuscanyscatours.payment.creditcard.impl.CreditCardPaymentImpl"/> - <service name="CreditCardPayment"> - <interface.wsdl interface="http://www.tuscanyscatours.com/CreditCardPayment/#wsdl.interface(CreditCardPayment)"/> - <binding.ws uri="http://localhost:8082/CreditCardPayment"/> - <binding.sca/> - </service> - </component> -</composite>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java deleted file mode 100644 index ed3d33af21..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-jaxb/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.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.payment.creditcard;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception;
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
-import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
-import com.tuscanyscatours.payment.creditcard.CreditCardTypeType;
-import com.tuscanyscatours.payment.creditcard.ObjectFactory;
-import com.tuscanyscatours.payment.creditcard.PayerType;
-
-/**
- *
- */
-public class CreditCardPaymentTestCase {
- private static Node node;
-
- /**
- * @throws java.lang.Exception
- */
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- try {
- node =
- NodeFactory.getInstance().createNode(new Contribution("creditcard", "./target/classes"));
-
- node.start();
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
- @Test
- public void testCreditCardPayment() {
- Node client = (Node)node;
- CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment");
-
- ObjectFactory objectFactory = new ObjectFactory();
- CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
- ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa"));
- PayerType ccOwner = objectFactory.createPayerType();
- ccOwner.setName("Fred");
- ccDetails.setCardOwner(ccOwner);
-
- try {
- System.out.println(cc.authorize(ccDetails, 100.00f));
- } catch (AuthorizeFault_Exception e) {
- System.err.println("Fault: " + e.getFaultInfo().getErrorCode());
- }
- }
-
- @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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/build.xml deleted file mode 100644 index 2f9f3d9625..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-creditcard-payment-sdo" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="sdojavagen">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardDetailsType.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- <param name="prefix" value="CreditCardPayment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/pom.xml deleted file mode 100644 index 082d3e0fe5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/pom.xml +++ /dev/null @@ -1,142 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-creditcard-payment-sdo</artifactId> - <name>Apache Tuscany SCA Tours Credit Card Payment Contribution SDO</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.1</version> - <exclusions> - <exclusion> - <groupId>javax.xml.soap</groupId> - <artifactId>saaj-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-sdo</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/java/com/tuscanyscatours/payment/creditcard/CreditCardPayment.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/java/com/tuscanyscatours/payment/creditcard/CreditCardPayment.java deleted file mode 100644 index 9f508ecc59..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/java/com/tuscanyscatours/payment/creditcard/CreditCardPayment.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.tuscanyscatours.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://tuscanyscatours.com/CreditCardPayment/")
-public interface CreditCardPayment {
-
- /**
- *
- * @param amount
- * @param creditCard
- * @return
- * returns java.lang.String
- */
- @WebMethod(action = "http://tuscanyscatours.com/CreditCardPayment/authorize")
- @WebResult(name = "Status", targetNamespace = "")
- @RequestWrapper(localName = "authorize", targetNamespace = "http://tuscanyscatours.com/CreditCardPayment/", className = "com.tuscanyscatours.payment.creditcard.AuthorizeType")
- @ResponseWrapper(localName = "authorizeResponse", targetNamespace = "http://tuscanyscatours.com/CreditCardPayment/", className = "com.tuscanyscatours.payment.creditcard.AuthorizeResponseType")
- public String authorize(@WebParam(name = "CreditCard", targetNamespace = "") CreditCardDetailsType creditCard,
- @WebParam(name = "Amount", targetNamespace = "") float amount);
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java deleted file mode 100644 index 13dc7428d1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.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 com.tuscanyscatours.payment.creditcard.impl;
-
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index d7e274aeee..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/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/">
-
- <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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 34f5ec3d0e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tours="http://tuscanyscatours.com/"> - <deployable composite="tours:creditcard" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/creditcard.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/creditcard.composite deleted file mode 100644 index 392af83d2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/main/resources/creditcard.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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="creditcard"> - - <component name="CreditCardPayment"> - <implementation.java class="com.tuscanyscatours.payment.creditcard.impl.CreditCardPaymentImpl" /> - <service name="CreditCardPayment"> - <interface.wsdl interface="http://www.tuscanyscatours.com/CreditCardPayment/#wsdl.interface(CreditCardPayment)"/> - <binding.ws uri="http://localhost:8082/CreditCardPayment" /> - <binding.sca /> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java deleted file mode 100644 index b2ffc3fc4d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-sdo/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.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.payment.creditcard;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
-import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
-import com.tuscanyscatours.payment.creditcard.CreditCardPaymentFactory;
-import com.tuscanyscatours.payment.creditcard.PayerType;
-
-/**
- *
- */
-public class CreditCardPaymentTestCase {
- private static Node node;
-
- /**
- * @throws java.lang.Exception
- */
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- NodeFactory factory = NodeFactory.getInstance();
- node = factory.createNode(new Contribution("creditcard-sdo", "./target/classes"));
- node.start();
- }
-
- @Test
- public void testCreditCardPayment() {
- Node client = (Node)node;
- CreditCardPayment cc = client.getService(CreditCardPayment.class, "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));
- }
-
- /**
- * @throws java.lang.Exception
- */
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- if (node != null) {
- node.stop();
- node = null;
- }
- }
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/build.xml deleted file mode 100644 index 7c3a55c530..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-creditcard-payment-webapp" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- </target>
-
- <target name="copy-lib">
- <antcall target="add-implementation-web"/>
- <copy todir="target/lib">
- <fileset file="../creditcard-payment-jaxb/target/scatours-contribution-creditcard-payment-jaxb.jar"/>
- <fileset refid="tuscany-modules"/>
- <fileset refid="tuscany-dependencies"/>
- </copy>
- </target>
-
- <fileset id="tuscany-modules" dir="${env.TUSCANY_HOME}/modules">
- <include name="tuscany-assembly-1.*.jar"/>
- <include name="tuscany-assembly-xml-1.*.jar"/>
- <include name="tuscany-assembly-xsd-1.*.jar"/>
- <include name="tuscany-binding-jsonrpc-1.*.jar"/>
- <include name="tuscany-binding-jsonrpc-runtime-1.*.jar"/>
- <include name="tuscany-binding-sca-1.*.jar"/>
- <include name="tuscany-binding-sca-xml-1.*.jar"/>
- <include name="tuscany-binding-ws-1.*.jar"/>
- <include name="tuscany-binding-ws-axis2-1.*.jar"/>
- <include name="tuscany-binding-ws-axis2-policy-1.*.jar"/>
- <include name="tuscany-binding-ws-wsdlgen-1.*.jar"/>
- <include name="tuscany-binding-ws-xml-1.*.jar"/>
- <include name="tuscany-contribution-1.*.jar"/>
- <include name="tuscany-contribution-impl-1.*.jar"/>
- <include name="tuscany-contribution-java-1.*.jar"/>
- <include name="tuscany-contribution-jee-1.*.jar"/>
- <include name="tuscany-contribution-namespace-1.*.jar"/>
- <include name="tuscany-contribution-xml-1.*.jar"/>
- <include name="tuscany-core-1.*.jar"/>
- <include name="tuscany-core-databinding-1.*.jar"/>
- <include name="tuscany-core-spi-1.*.jar"/>
- <include name="tuscany-databinding-1.*.jar"/>
- <include name="tuscany-databinding-axiom-1.*.jar"/>
- <include name="tuscany-databinding-jaxb-1.*.jar"/>
- <include name="tuscany-databinding-jaxb-axiom-1.*.jar"/>
- <include name="tuscany-databinding-json-1.*.jar"/>
- <include name="tuscany-definitions-1.*.jar"/>
- <include name="tuscany-definitions-xml-1.*.jar"/>
- <include name="tuscany-endpoint-1.*.jar"/>
- <include name="tuscany-extensibility-1.*.jar"/>
- <include name="tuscany-host-embedded-1.*.jar"/>
- <include name="tuscany-host-http-1.*.jar"/>
- <include name="tuscany-host-jetty-1.*.jar"/>
- <include name="tuscany-host-webapp-1.*.jar"/>
- <include name="tuscany-implementation-java-1.*.jar"/>
- <include name="tuscany-implementation-java-runtime-1.*.jar"/>
- <include name="tuscany-implementation-java-xml-1.*.jar"/>
- <include name="tuscany-implementation-node-1.*.jar"/>
- <include name="tuscany-implementation-web-1.*.jar"/>
- <include name="tuscany-implementation-web-runtime-1.*.jar"/>
- <include name="tuscany-interface-1.*.jar"/>
- <include name="tuscany-interface-java-1.*.jar"/>
- <include name="tuscany-interface-java-jaxws-1.*.jar"/>
- <include name="tuscany-interface-java-xml-1.*.jar"/>
- <include name="tuscany-interface-wsdl-1.*.jar"/>
- <include name="tuscany-interface-wsdl-xml-1.*.jar"/>
- <include name="tuscany-monitor-1.*.jar"/>
- <include name="tuscany-node-api-1.*.jar"/>
- <include name="tuscany-node-impl-1.*.jar"/>
- <include name="tuscany-policy-1.*.jar"/>
- <include name="tuscany-policy-security-1.*.jar"/>
- <include name="tuscany-policy-xml-1.*.jar"/>
- <include name="tuscany-policy-xml-ws-1.*.jar"/>
- <include name="tuscany-sca-api-1.*.jar"/>
- <include name="tuscany-sca-api-extension-1.*.jar"/>
- <include name="tuscany-xsd-1.*.jar"/>
- <include name="tuscany-xsd-xml-1.*.jar"/>
- </fileset>
-
- <fileset id="tuscany-dependencies" dir="${env.TUSCANY_HOME}/lib">
- <include name="activation-1.1.jar"/>
- <include name="annogen-0.1.0.jar"/>
- <include name="asm-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="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-logging-1.1.1.jar"/>
- <include name="dom4j-1.6.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-jms_1.1_spec-1.1.jar"/>
- <include name="geronimo-stax-api_1.0_spec-1.0.1.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="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.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="XmlSchema-1.4.2.jar"/>
- <include name="xmlsec-1.4.2.jar"/>
- </fileset>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/pom.xml deleted file mode 100644 index 60df41705a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/pom.xml +++ /dev/null @@ -1,66 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-creditcard-payment-webapp</artifactId>
- <packaging>war</packaging>
- <name>Apache Tuscany SCA Tours CreditCard Payment WebApp Contribution</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-web-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-webapp</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-creditcard-payment-jaxb</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 6dcc619c48..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,134 +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/">
-
- <!-- https://jaxb.dev.java.net/issues/show_bug.cgi?id=518 -->
- <!-- I have to change the complex types to be annoymous -->
- <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: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-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index a0bfe2c713..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:creditcard-webapp" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index cf146e4f5b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite +++ /dev/null @@ -1,43 +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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="creditcard-webapp">
-
- <component name="CreditCardPaymentWeb">
- <implementation.web web-uri="" />
- <reference name="service" target="CreditCardPayment">
- <interface.java interface="com.tuscanyscatours.payment.creditcard.CreditCardPayment"/>
- <!--
- <binding.ws uri="http://localhost:8082/CreditCardPayment" />
- -->
- </reference>
- </component>
-
- <component name="CreditCardPayment">
- <implementation.java class="com.tuscanyscatours.payment.creditcard.impl.CreditCardPaymentImpl" />
- <service name="CreditCardPayment">
- <interface.wsdl interface="http://www.tuscanyscatours.com/CreditCardPayment/#wsdl.interface(CreditCardPayment)" />
- <binding.ws uri="http://localhost:8080/CreditCardPayment" />
- <binding.sca/>
- </service>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a6188e25ba..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.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.
--->
-
-<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>SCA Tours Credit Card Payment 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>
- <welcome-file>creditcard.jsp</welcome-file>
- </welcome-file-list>
-</web-app>
-
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp b/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp deleted file mode 100644 index 98b7f41e7b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/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="com.tuscanyscatours.payment.creditcard.CreditCardPayment" />
-
-
-<%@page import="com.tuscanyscatours.payment.creditcard.CreditCardPaymentService"%>
-<%@page import="com.tuscanyscatours.payment.creditcard.ObjectFactory"%>
-<%@page import="com.tuscanyscatours.payment.creditcard.CreditCardDetailsType"%>
-<%@page import="com.tuscanyscatours.payment.creditcard.CreditCardTypeType"%>
-<%@page import="com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/currency-corba/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/build.xml deleted file mode 100644 index fa2ac47a64..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/build.xml +++ /dev/null @@ -1,22 +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-contribution-currency-corba" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/pom.xml deleted file mode 100644 index dbcacc4d7f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency-corba</artifactId>
- <name>Apache Tuscany SCA Tours Currency Converter Contribution With CORBA Binding</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/currency-corba/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 6a067411f1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.currencyconverter"/>
- <import.java package="com.tuscanyscatours.currencyconverter.impl"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/src/main/resources/currency-converter-corba.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/src/main/resources/currency-converter-corba.composite deleted file mode 100644 index bd1c23e6f6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-corba/src/main/resources/currency-converter-corba.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/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://tuscanyscatours.com/"
- name="currencyconverter">
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl" />
- <service name="CurrencyConverter">
- <interface.java interface="com.tuscanyscatours.currencyconverter.CurrencyConverter" />
- <tuscany:binding.corba host="localhost" port="5080" name="CurrencyConverterCORBAService"/>
- </service>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/build.xml deleted file mode 100644 index 1b5cef445b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/build.xml +++ /dev/null @@ -1,22 +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-contribution-currency-jms" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/pom.xml deleted file mode 100644 index 1b63b608fc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/pom.xml +++ /dev/null @@ -1,77 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency-jms</artifactId>
- <name>Apache Tuscany SCA Tours Currency Converter Contribution With JMS Binding</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-all</artifactId>
- <version>5.2.0</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-web-demo</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 0eea8a6b52..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.currencyconverter" />
- <import.java package="com.tuscanyscatours.currencyconverter.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/src/main/resources/currency-converter-jms.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/src/main/resources/currency-converter-jms.composite deleted file mode 100644 index cc73ceb3ef..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jms/src/main/resources/currency-converter-jms.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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="currencyconverter">
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/>
- <service name="CurrencyConverter">
- <interface.java interface="com.tuscanyscatours.currencyconverter.CurrencyConverter"/>
- <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
- jndiURL="tcp://localhost:61619">
- <destination name="RequestQueue" create="ifnotexist"/>
- <response>
- <destination name="ResponseQueue" create="ifnotexist"/>
- </response>
- </binding.jms>
- </service>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/build.xml deleted file mode 100644 index d1b0d955ac..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-currency-jsp" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="copy-lib">
- <antcall target="add-implementation-web"/>
- <copy todir="target/lib">
- <fileset file="../currency/target/scatours-contribution-currency.jar"/>
- <fileset refid="tuscany-modules"/>
- <fileset refid="tuscany-dependencies"/>
- </copy>
- </target>
-
- <fileset id="tuscany-modules" dir="${env.TUSCANY_HOME}/modules">
- <include name="tuscany-assembly-1.*.jar"/>
- <include name="tuscany-assembly-xml-1.*.jar"/>
- <include name="tuscany-assembly-xsd-1.*.jar"/>
- <include name="tuscany-binding-sca-1.*.jar"/>
- <include name="tuscany-binding-sca-xml-1.*.jar"/>
- <include name="tuscany-contribution-1.*.jar"/>
- <include name="tuscany-contribution-impl-1.*.jar"/>
- <include name="tuscany-contribution-java-1.*.jar"/>
- <include name="tuscany-contribution-jee-1.*.jar"/>
- <include name="tuscany-contribution-namespace-1.*.jar"/>
- <include name="tuscany-contribution-xml-1.*.jar"/>
- <include name="tuscany-core-1.*.jar"/>
- <include name="tuscany-core-databinding-1.*.jar"/>
- <include name="tuscany-core-spi-1.*.jar"/>
- <include name="tuscany-databinding-1.*.jar"/>
- <include name="tuscany-databinding-jaxb-1.*.jar"/>
- <include name="tuscany-definitions-1.*.jar"/>
- <include name="tuscany-definitions-xml-1.*.jar"/>
- <include name="tuscany-endpoint-1.*.jar"/>
- <include name="tuscany-extensibility-1.*.jar"/>
- <include name="tuscany-host-embedded-1.*.jar"/>
- <include name="tuscany-host-http-1.*.jar"/>
- <include name="tuscany-host-webapp-1.*.jar"/>
- <include name="tuscany-implementation-java-1.*.jar"/>
- <include name="tuscany-implementation-java-runtime-1.*.jar"/>
- <include name="tuscany-implementation-java-xml-1.*.jar"/>
- <include name="tuscany-implementation-node-1.*.jar"/>
- <include name="tuscany-implementation-web-1.*.jar"/>
- <include name="tuscany-implementation-web-runtime-1.*.jar"/>
- <include name="tuscany-interface-1.*.jar"/>
- <include name="tuscany-interface-java-1.*.jar"/>
- <include name="tuscany-interface-java-jaxws-1.*.jar"/>
- <include name="tuscany-interface-java-xml-1.*.jar"/>
- <include name="tuscany-monitor-1.*.jar"/>
- <include name="tuscany-node-api-1.*.jar"/>
- <include name="tuscany-node-impl-1.*.jar"/>
- <include name="tuscany-policy-1.*.jar"/>
- <include name="tuscany-policy-xml-1.*.jar"/>
- <include name="tuscany-sca-api-1.*.jar"/>
- <include name="tuscany-sca-api-extension-1.*.jar"/>
- <include name="tuscany-xsd-1.*.jar"/>
- </fileset>
-
- <fileset id="tuscany-dependencies" dir="${env.TUSCANY_HOME}/lib">
- <include name="activation-1.1.jar"/>
- <include name="asm-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="common-2.2.3.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"/>
- <include name="XmlSchema-1.4.2.jar"/>
- </fileset>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/pom.xml deleted file mode 100644 index 3aa04a0b7d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/pom.xml +++ /dev/null @@ -1,65 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency-jsp</artifactId>
- <packaging>war</packaging>
- <name>Apache Tuscany SCA Tours Currency Converter JSP Contribution</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-web-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-webapp</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-currency</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/META-INF/sca-deployables/web.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index 2c209b0651..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/META-INF/sca-deployables/web.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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://tuscanyscatours.com/"
- name="CurrencyConverterJSP">
-
- <component name="WebClient">
- <implementation.web web-uri=""/>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- </component>
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/>
- <service name="CurrencyConverter"/>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 3b2c79ca76..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/WEB-INF/web.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.
--->
-
-<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>SCA Tours Currency Converter JSP</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>
- <welcome-file>currency-converter.jsp</welcome-file>
- </welcome-file-list>
-</web-app>
-
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/currency-converter.jsp b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/currency-converter.jsp deleted file mode 100644 index daf8c5cff1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-jsp/src/main/webapp/currency-converter.jsp +++ /dev/null @@ -1,49 +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="currencyConverter" type="com.tuscanyscatours.currencyconverter.CurrencyConverter"/>
-
-<html>
-<body>
-<h2>SCA Tours Currency Converter JSP</h2>
-Welcome to the SCA Tours Currency Converter:
-<p>
-
-<form method=post action="currency-converter.jsp">
-Enter value in US Dollars
-<input type=text name=dollars size=15>
-<p>
-<input type=submit>
-</form>
-
-<p>
-
-<%
- String dollarsStr = request.getParameter( "dollars" );
- if ( dollarsStr != null) {
- double dollars = Double.parseDouble(dollarsStr);
- double converted = currencyConverter.convert("USD", "GBP", dollars);
- out.println(dollars + " US Dollars = " + converted + " GB Pounds");
- }
-%>
-</body>
-</html>
-
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/build.xml deleted file mode 100644 index a969f0c819..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/build.xml +++ /dev/null @@ -1,22 +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-contribution-currency-rmi" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/pom.xml deleted file mode 100644 index 7c3f88c18f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency-rmi</artifactId>
- <name>Apache Tuscany SCA Tours Currency Converter Contribution With RMI Binding</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e335c8d4f3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.currencyconverter" />
- <import.java package="com.tuscanyscatours.currencyconverter.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/src/main/resources/currency-converter-rmi.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/src/main/resources/currency-converter-rmi.composite deleted file mode 100644 index 55a815572b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-rmi/src/main/resources/currency-converter-rmi.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/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://tuscanyscatours.com/"
- name="currencyconverter">
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl" />
- <service name="CurrencyConverter">
- <interface.java interface="com.tuscanyscatours.currencyconverter.CurrencyConverter" />
- <tuscany:binding.rmi host="localhost" port="8099" serviceName="CurrencyConverterRMI"/>
- </service>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/build.xml deleted file mode 100644 index 23edaad6a6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-currency-servlet" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../currency/target/scatours-contribution-currency.jar"/>
- </path>
-
- <target name="copy-lib">
- <antcall target="add-implementation-web"/>
- <copy todir="target/lib">
- <fileset file="../currency/target/scatours-contribution-currency.jar"/>
- <fileset refid="tuscany-modules"/>
- <fileset refid="tuscany-dependencies"/>
- </copy>
- </target>
-
- <fileset id="tuscany-modules" dir="${env.TUSCANY_HOME}/modules">
- <include name="tuscany-assembly-1.*.jar"/>
- <include name="tuscany-assembly-xml-1.*.jar"/>
- <include name="tuscany-assembly-xsd-1.*.jar"/>
- <include name="tuscany-binding-sca-1.*.jar"/>
- <include name="tuscany-binding-sca-xml-1.*.jar"/>
- <include name="tuscany-contribution-1.*.jar"/>
- <include name="tuscany-contribution-impl-1.*.jar"/>
- <include name="tuscany-contribution-java-1.*.jar"/>
- <include name="tuscany-contribution-jee-1.*.jar"/>
- <include name="tuscany-contribution-namespace-1.*.jar"/>
- <include name="tuscany-contribution-xml-1.*.jar"/>
- <include name="tuscany-core-1.*.jar"/>
- <include name="tuscany-core-databinding-1.*.jar"/>
- <include name="tuscany-core-spi-1.*.jar"/>
- <include name="tuscany-databinding-1.*.jar"/>
- <include name="tuscany-databinding-jaxb-1.*.jar"/>
- <include name="tuscany-definitions-1.*.jar"/>
- <include name="tuscany-definitions-xml-1.*.jar"/>
- <include name="tuscany-endpoint-1.*.jar"/>
- <include name="tuscany-extensibility-1.*.jar"/>
- <include name="tuscany-host-embedded-1.*.jar"/>
- <include name="tuscany-host-http-1.*.jar"/>
- <include name="tuscany-host-webapp-1.*.jar"/>
- <include name="tuscany-implementation-java-1.*.jar"/>
- <include name="tuscany-implementation-java-runtime-1.*.jar"/>
- <include name="tuscany-implementation-java-xml-1.*.jar"/>
- <include name="tuscany-implementation-node-1.*.jar"/>
- <include name="tuscany-implementation-web-1.*.jar"/>
- <include name="tuscany-implementation-web-runtime-1.*.jar"/>
- <include name="tuscany-interface-1.*.jar"/>
- <include name="tuscany-interface-java-1.*.jar"/>
- <include name="tuscany-interface-java-jaxws-1.*.jar"/>
- <include name="tuscany-interface-java-xml-1.*.jar"/>
- <include name="tuscany-monitor-1.*.jar"/>
- <include name="tuscany-node-api-1.*.jar"/>
- <include name="tuscany-node-impl-1.*.jar"/>
- <include name="tuscany-policy-1.*.jar"/>
- <include name="tuscany-policy-xml-1.*.jar"/>
- <include name="tuscany-sca-api-1.*.jar"/>
- <include name="tuscany-sca-api-extension-1.*.jar"/>
- <include name="tuscany-xsd-1.*.jar"/>
- </fileset>
-
- <fileset id="tuscany-dependencies" dir="${env.TUSCANY_HOME}/lib">
- <include name="activation-1.1.jar"/>
- <include name="asm-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="common-2.2.3.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"/>
- <include name="XmlSchema-1.4.2.jar"/>
- </fileset>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/pom.xml deleted file mode 100644 index bce29ad874..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/pom.xml +++ /dev/null @@ -1,72 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency-servlet</artifactId>
- <packaging>war</packaging>
- <name>Apache Tuscany SCA Tours Currency Converter Servlet Contribution</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-web-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-webapp</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.3</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-currency</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/java/com/tuscanyscatours/currencyconverter/servlet/CurrencyConverterServlet.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/java/com/tuscanyscatours/currencyconverter/servlet/CurrencyConverterServlet.java deleted file mode 100644 index 465c667f0b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/java/com/tuscanyscatours/currencyconverter/servlet/CurrencyConverterServlet.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 com.tuscanyscatours.currencyconverter.servlet; - -import java.io.IOException; -import java.io.Writer; - -import javax.servlet.ServletConfig; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.annotation.Reference; - -import com.tuscanyscatours.currencyconverter.CurrencyConverter; - -public class CurrencyConverterServlet extends HttpServlet { - - @Reference - protected CurrencyConverter currencyConverter; - - @Override - public void init(ServletConfig config) { - if (currencyConverter == null) { - // The Currency Converter reference will only be injected from the @Reference - // annotation in containers supporting SCA "deep" integration. In other - // environments in can be looked up from the ComponentContext. - ComponentContext context = - (ComponentContext)config.getServletContext().getAttribute("org.oasisopen.sca.ComponentContext"); - currencyConverter = context.getService(CurrencyConverter.class, "currencyConverter"); - } - } - - @Override - protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - Writer out = response.getWriter(); - out.write("<html><body><h2>SCA Tours Currency Converter Servlet</h2>"); - out.write("Welcome to the SCA Tours Currency Converter Servlet<p>"); - out.write("<form method=post action=\"CurrencyConverterServlet\">"); - out.write("Enter value in US Dollars"); - out.write("<input type=text name=dollars size=15><p>"); - out.write("<input type=submit>"); - out.write("</form><p>"); - - String dollarsStr = request.getParameter("dollars"); - if (dollarsStr != null) { - double dollars = Double.parseDouble(dollarsStr); - double converted = currencyConverter.convert("USD", "GBP", dollars); - out.write(dollars + " US Dollars = " + converted + " GB Pounds"); - } - - out.write("</body></html>"); - out.flush(); - out.close(); - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/webapp/META-INF/sca-deployables/web.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index bea526802f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/webapp/META-INF/sca-deployables/web.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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://scatours.com"
- name="CurrencyConverterServlet">
-
- <component name="WebClient">
- <implementation.web web-uri=""/>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- </component>
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/>
- <service name="CurrencyConverter"/>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 2204c67870..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-servlet/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +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>SCA Tours Currency Converter Servlet</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>
-
- <servlet>
- <servlet-name>CurrencyConverterServlet</servlet-name>
- <servlet-class>com.tuscanyscatours.currencyconverter.servlet.CurrencyConverterServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>CurrencyConverterServlet</servlet-name>
- <url-pattern>/CurrencyConverterServlet</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>CurrencyConverterServlet</welcome-file>
- </welcome-file-list>
-</web-app>
-
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/build.xml deleted file mode 100644 index bf87bbfba6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/build.xml +++ /dev/null @@ -1,22 +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-contribution-currency-ws" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/pom.xml deleted file mode 100644 index 5286b36170..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency-ws</artifactId>
- <name>Apache Tuscany SCA Tours Currency Converter Contribution With Web Service Binding</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/currency-ws/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e335c8d4f3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.currencyconverter" />
- <import.java package="com.tuscanyscatours.currencyconverter.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/src/main/resources/currency-converter-ws.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/src/main/resources/currency-converter-ws.composite deleted file mode 100644 index a1be5f52c3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency-ws/src/main/resources/currency-converter-ws.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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="currencyconverter">
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl" />
- <service name="CurrencyConverter">
- <interface.java interface="com.tuscanyscatours.currencyconverter.CurrencyConverter" />
- <binding.ws />
- </service>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/build.xml deleted file mode 100644 index 0f5811e299..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/build.xml +++ /dev/null @@ -1,22 +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-contribution-currency" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/pom.xml deleted file mode 100644 index fa9a7a4f34..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-currency</artifactId>
- <name>Apache Tuscany SCA Tours Currency Converter Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java deleted file mode 100644 index 3ebd23b2d0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.currencyconverter;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * The CurrencyConverter service interface
- */
-@Remotable
-public interface CurrencyConverter {
-
- double getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
-
- double convert(String fromCurrencyCode, String toCurrencyCode, double amount);
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/java/com/tuscanyscatours/currencyconverter/impl/CurrencyConverterImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/java/com/tuscanyscatours/currencyconverter/impl/CurrencyConverterImpl.java deleted file mode 100644 index ee81973986..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/java/com/tuscanyscatours/currencyconverter/impl/CurrencyConverterImpl.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 com.tuscanyscatours.currencyconverter.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.currencyconverter.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 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-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index cfd2a68821..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <export.java package="com.tuscanyscatours.currencyconverter" />
- <export.java package="com.tuscanyscatours.currencyconverter.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/resources/currency-converter.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/resources/currency-converter.composite deleted file mode 100644 index edfa249cb9..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/currency/src/main/resources/currency-converter.composite +++ /dev/null @@ -1,28 +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/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="currencyconverter">
-
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl" />
- <service name="CurrencyConverter"/>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/build.xml deleted file mode 100644 index 94f9290854..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/build.xml +++ /dev/null @@ -1,25 +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-contribution-databinding-client" default="compile"> - <import file="../../antdefs.xml"/> - <path id="compile-path"> - <pathelement path="../payment-java/target/scatours-contribution-payment-java.jar"/> - </path> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/pom.xml deleted file mode 100644 index b64ebb984f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-databinding-client</artifactId> - <name>Apache Tuscany SCA Tours Databinding Client Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-payment-java</artifactId> - <version>${pom.version}</version> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/java/scatours/client/TestClient.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/java/scatours/client/TestClient.java deleted file mode 100644 index cf5b20f902..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/java/scatours/client/TestClient.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.client; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.payment.Payment; - -@Service(Runnable.class) -public class TestClient { - @Reference - protected Payment payment; - - public TestClient() { - } - - public void run() { - System.out.println("Call Payment component"); - System.out.println(payment.makePaymentMember("c-0", 100.00f)); - System.out.println(payment.makePaymentMember("c-1", 100.00f)); - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 1df20c6ecd..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:client="http://client.scatours/"> - <deployable composite="client:Client" /> - <import.java package="com.tuscanyscatours.payment" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/resources/client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/resources/client.composite deleted file mode 100644 index bb5a4952c4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/databinding-client/src/main/resources/client.composite +++ /dev/null @@ -1,28 +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/200912" - targetNamespace="http://client.scatours/" - name="Client"> - - <component name="TestClient"> - <implementation.java class="scatours.client.TestClient" /> - <reference name="payment" target="Payment" /> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/build.xml deleted file mode 100644 index ec234bcb4a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-emailgateway" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="EmailGateway.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/emailgateway/EmailGateway.class"/>
- <param name="package" value="com.tuscanyscatours.emailgateway"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/pom.xml deleted file mode 100644 index d2a4b6777a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/pom.xml +++ /dev/null @@ -1,137 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-emailgateway</artifactId>
- <name>Apache Tuscany SCA Tours Email Gateway Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</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>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java deleted file mode 100644 index 1371811619..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java +++ /dev/null @@ -1,38 +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.emailgateway.impl;
-
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.emailgateway.EmailGateway;
-import com.tuscanyscatours.emailgateway.EmailType;
-
-/**
- *
- */
-@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-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index bb9cd27027..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/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="EmailGatewayBinding" 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:EmailGatewayBinding">
- <soap:address location="http://localhost:8088/EmailGateway" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="EmailGatewayLinkType">
- <plnk:role name="forward" portType="tns:EmailGateway"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2bb1f7f6d1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:e="http://emailgateway" >
- <deployable composite="e:emailgateway" />
- <export.java package="com.tuscanyscatours.emailgateway" />
- <export.java package="com.tuscanyscatours.emailgateway.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/emailgateway.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/emailgateway.composite deleted file mode 100644 index aae417fb23..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/main/resources/emailgateway.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/200912" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:e="http://emailgateway" - targetNamespace="http://emailgateway" - name="emailgateway"> - - <component name="EmailGateway"> - <implementation.java class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl" /> - <service name="EmailGateway"> - <binding.ws uri="http://localhost:8088/EmailGateway" /> - </service> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java deleted file mode 100644 index e6afc6c62f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.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 scatours.emailgateway;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.tuscanyscatours.emailgateway.EmailGateway;
-import com.tuscanyscatours.emailgateway.EmailType;
-import com.tuscanyscatours.emailgateway.ObjectFactory;
-
-/**
- *
- */
-public class EmailGatewayTestCase {
- private static Node node;
-
- /**
- * @throws java.lang.Exception
- */
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- NodeFactory factory = NodeFactory.getInstance();
- node =
- factory.createNode(
- new Contribution("emailgateway", "./target/classes"),
- new Contribution("emailgateway-test", "./target/test-classes"));
- node.start();
- }
-
- @Test
- public void testEmailGateway() {
- Node client = (Node)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));
- }
-
- /**
- * @throws java.lang.Exception
- */
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- if (node != null) {
- node.stop();
- node = null;
- }
- }
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/client/impl/EmailGatewayClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/client/impl/EmailGatewayClientImpl.java deleted file mode 100644 index 7b21cdecf3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/client/impl/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.impl;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.emailgateway.EmailGateway;
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index ee15d8e5ed..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:e="http://emailgateway-test">
- <deployable composite="e:emailgateway-test" />
- <import.java package="com.tuscanyscatours.emailgateway" />
- <import.java package="com.tuscanyscatours.emailgateway.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/resources/emailgateway-test.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/resources/emailgateway-test.composite deleted file mode 100644 index 8283d54ab6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/emailgateway/src/test/resources/emailgateway-test.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/200912"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:e="http://emailgateway-test"
- targetNamespace="http://emailgateway-test"
- name="emailgateway-test">
- <component name="EmailGatewayClient">
- <implementation.java class="scatours.emailgateway.client.impl.EmailGatewayClientImpl" />
- <reference name="emailGateway">
- <binding.ws uri="http://localhost:8088/EmailGateway" />
- </reference>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/build.xml deleted file mode 100644 index c23a99e6ca..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/build.xml +++ /dev/null @@ -1,22 +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-contribution-feed-logger" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/pom.xml deleted file mode 100644 index 547ebe5d78..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/pom.xml +++ /dev/null @@ -1,80 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-feed-logger</artifactId>
- <name>Apache Tuscany SCA Tours Feed Logger Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-atom</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-atom-runtime</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-rss-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.java deleted file mode 100644 index 0f5d18d53b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/FeedLogger.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 com.tuscanyscatours.feedlogger; - -public interface FeedLogger { - - /** - * Captures the configured feeds and logs the feed entries. - * - * @param maxEntriesPerFeed The maximum number of entries to log per feed - */ - public void logFeeds(int maxEntriesPerFeed); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.java deleted file mode 100644 index daab1be2b4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/java/com/tuscanyscatours/feedlogger/impl/FeedLoggerImpl.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 com.tuscanyscatours.feedlogger.impl; - -import java.util.List; - -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.oasisopen.sca.annotation.Reference; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; -import com.tuscanyscatours.feedlogger.FeedLogger; - -public class FeedLoggerImpl implements FeedLogger { - - /** - * Reference to the SCA Tours Blog Atom feed. - */ - @Reference - public org.apache.tuscany.sca.binding.atom.collection.Collection scaToursBlogAtom; - - /** - * Reference to the SCA Tours Blog RSS feed. - */ - @Reference - public org.apache.tuscany.sca.binding.rss.collection.Collection scaToursBlogRSS; - - /** - * Reference to the BBC News RSS feed. - */ - @Reference - public org.apache.tuscany.sca.binding.rss.collection.Collection bbcNews; - - /** - * {@inheritDoc} - */ - public void logFeeds(int maxEntriesPerFeed) { - System.out.println("Logging SCA Tours Blog Atom feed:"); - logAtomFeed(scaToursBlogAtom, maxEntriesPerFeed); - - System.out.println("Logging SCA Tours Blog RSS feed:"); - logRSSFeed(scaToursBlogRSS, maxEntriesPerFeed); - - System.out.println("Logging BBC News feed:"); - logRSSFeed(bbcNews, maxEntriesPerFeed); - } - - /** - * Logs up to maxEntries entries from the specified feed. - * - * @param maxEntries The maximum number of entries to log per feed - */ - private void logAtomFeed(org.apache.tuscany.sca.binding.atom.collection.Collection atomFeed, int maxEntries) { - final Feed feed = atomFeed.getFeed(); - System.out.println("Feed: " + feed.getTitle()); - final List<Entry> entries = feed.getEntries(); - - for (int i = 0; i < entries.size() && i < maxEntries; i++) { - Entry entry = entries.get(i); - System.out.println("Entry: " + entry.getTitle()); - } - System.out.println(); - } - - /** - * Logs up to maxEntries entries from the specified feed. - * - * @param maxEntries The maximum number of entries to log - */ - private void logRSSFeed(org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed, int maxEntries) { - SyndFeed feed = rssFeed.getFeed(); - System.out.println("Feed: " + feed.getTitle()); - - List<SyndEntry> entries = feed.getEntries(); - for (int i = 0; i < entries.size() && i < maxEntries; i++) { - SyndEntry entry = entries.get(i); - System.out.println("Entry: " + entry.getTitle()); - } - System.out.println(); - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index dd76faefad..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,21 +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://docs.oasis-open.org/ns/opencsa/sca/200912">
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite deleted file mode 100644 index 7dac81cfc8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/feed-logger/src/main/resources/feed-logger.composite +++ /dev/null @@ -1,40 +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/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://tuscanyscatours.com/"
- name="feedLogger">
-
- <service name="FeedLogger" promote="FeedLogger">
- </service>
-
- <component name="FeedLogger">
- <implementation.java class="com.tuscanyscatours.feedlogger.impl.FeedLoggerImpl"/>
- <reference name="scaToursBlogAtom">
- <tuscany:binding.atom uri="http://scatours.wordpress.com/?feed=atom"/>
- </reference>
- <reference name="scaToursBlogRSS">
- <tuscany:binding.rss uri="http://scatours.wordpress.com/?feed=rss"/>
- </reference>
- <reference name="bbcNews">
- <tuscany:binding.rss uri="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml"/>
- </reference>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/build.xml deleted file mode 100644 index 0a151c1a20..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/build.xml +++ /dev/null @@ -1,25 +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-contribution-flight" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/pom.xml deleted file mode 100644 index 9ece98565f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-flight</artifactId>
- <name>Apache Tuscany SCA Tours Flight Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/java/com/tuscanyscatours/flight/impl/FlightImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/java/com/tuscanyscatours/flight/impl/FlightImpl.java deleted file mode 100644 index 82caab00e3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/java/com/tuscanyscatours/flight/impl/FlightImpl.java +++ /dev/null @@ -1,121 +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.flight.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.ComponentName;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.Book;
-import com.tuscanyscatours.common.Search;
-import com.tuscanyscatours.common.SearchCallback;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-
-/**
- * An implementation of the Flight service
- */
-@Scope("CONVERSATION")
-@Service({Search.class, Book.class})
-public class FlightImpl implements Search, Book {
-
- private List<FlightInfo> flights = new ArrayList<FlightInfo>();
-
- @Callback
- protected SearchCallback searchCallback;
-
- @ComponentName
- protected String componentName;
-
- private int percentComplete = 0;
-
- @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) {
- System.out.println("Starting flight search");
-
- // pretend that this processing takes some time to complete
- while (percentComplete < 100) {
- try {
- Thread.sleep(50);
- } catch (Exception ex) {
- // do nothing
- }
- percentComplete = percentComplete + 10;
- searchCallback.setPercentComplete(componentName, percentComplete);
- }
-
- // return available flights
- searchCallback.searchResults(searchSynch(tripLeg));
- }
-
- public int getPercentComplete() {
- return 100;
- }
-
- public String book(TripItem tripItem) {
- return "flight1";
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/java/com/tuscanyscatours/flight/impl/FlightInfo.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/java/com/tuscanyscatours/flight/impl/FlightInfo.java deleted file mode 100644 index 5f7de69229..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/java/com/tuscanyscatours/flight/impl/FlightInfo.java +++ /dev/null @@ -1,140 +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.flight.impl;
-
-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;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2d4964501a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/flight/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common"/>
- <export.java package="com.tuscanyscatours.flight.impl"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/build.xml deleted file mode 100644 index 8428af49f5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/build.xml +++ /dev/null @@ -1,22 +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-contribution-fullapp-bespoketrip" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/pom.xml deleted file mode 100644 index bf4bbfca77..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/pom.xml +++ /dev/null @@ -1,90 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-fullapp-bespoketrip</artifactId> - <name>Apache Tuscany SCA Tours Full Application Bespoke Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 4de92453fe..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,28 +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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:fullapp-bespoketrip" /> - <import.java package="com.tuscanyscatours.common" /> - <import.java package="com.tuscanyscatours.hotel" /> - <import.java package="com.tuscanyscatours.hotel.impl" /> - <import.java package="com.tuscanyscatours.flight.impl" /> - <import.java package="com.tuscanyscatours.car.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/src/main/resources/fullapp-bespoketrip.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/src/main/resources/fullapp-bespoketrip.composite deleted file mode 100644 index 12dad69674..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-bespoketrip/src/main/resources/fullapp-bespoketrip.composite +++ /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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - name="fullapp-bespoketrip"> - - <component name="HotelPartner"> - <implementation.java class="com.tuscanyscatours.hotel.impl.HotelImpl"/> - <service name="Search"> - <binding.ws name="searchws" uri="http://localhost:8086/Hotel/Search"/> - <!-- tuscany:binding.jsonrpc name="searchjsonrpc"/--> - <callback> - <binding.ws/> - </callback> - </service> - <service name="Book"/> - </component> - - <component name="FlightPartner"> - <implementation.java class="com.tuscanyscatours.flight.impl.FlightImpl"/> - <service name="Search"> - <interface.java interface="com.tuscanyscatours.common.Search" - callbackInterface="com.tuscanyscatours.common.SearchCallback"/> - <binding.ws name="searchws" uri="http://localhost:8086/Flight/Search"/> - <tuscany:binding.jsonrpc name="searchjsonrpc"/> - <callback> - <binding.ws/> - </callback> - </service> - <service name="Book"/> - </component> - - <component name="CarPartner"> - <implementation.java class="com.tuscanyscatours.car.impl.CarImpl"/> - <service name="Search"> - <binding.ws name="searchws" uri="http://localhost:8086/Car/Search"/> - <tuscany:binding.jsonrpc name="searchjsonrpc"/> - <callback> - <binding.ws/> - </callback> - </service> - <service name="Book"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/build.xml deleted file mode 100644 index 0da4e5aebd..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/build.xml +++ /dev/null @@ -1,22 +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-contribution-fullapp-coordination" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/pom.xml deleted file mode 100644 index a752d4e102..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/pom.xml +++ /dev/null @@ -1,90 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-fullapp-coordination</artifactId> - <name>Apache Tuscany SCA Tours Full Application Coordination Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f7973ba37a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/src/main/resources/META-INF/sca-contribution.xml +++ /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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:fullapp-coordination" /> - <import.java package="com.tuscanyscatours.common" /> - <import.java package="com.tuscanyscatours.currencyconverter" /> - <import.java package="com.tuscanyscatours.travelcatalog" /> - <import.java package="com.tuscanyscatours.travelcatalog.impl" /> - <import.java package="com.tuscanyscatours.shoppingcart" /> - <import.java package="com.tuscanyscatours.tripbooking" /> - <import.java package="com.tuscanyscatours.tripbooking.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/src/main/resources/fullapp-coordination.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/src/main/resources/fullapp-coordination.composite deleted file mode 100644 index ee8978a615..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-coordination/src/main/resources/fullapp-coordination.composite +++ /dev/null @@ -1,72 +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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="fullapp-coordination"> - - <component name="TravelCatalog"> - <implementation.java class="com.tuscanyscatours.travelcatalog.impl.TravelCatalogImpl"/> - <service name="TravelCatalogSearch"/> - <reference name="hotelSearch"> - <binding.ws uri="http://localhost:8086/Hotel/Search"/> - <callback> - <binding.ws name="callback" - uri="http://localhost:8084/Hotel/SearchCallback"/> - </callback> - </reference> - <reference name="flightSearch"> - <interface.java interface="com.tuscanyscatours.common.Search" - callbackInterface="com.tuscanyscatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8086/Flight/Search"/> - <callback> - <binding.ws name="callback" - uri="http://localhost:8084/Flight/SearchCallback"/> - </callback> - </reference> - <reference name="carSearch"> - <binding.ws uri="http://localhost:8086/Car/Search"/> - <callback> - <binding.ws name="callback" - uri="http://localhost:8084/Car/SearchCallback"/> - </callback> - </reference> - <reference name="tripSearch"> - <binding.ws uri="http://localhost:8085/Trip/Search"/> - <callback> - <binding.ws name="callback" - uri="http://localhost:8084/Trip/SearchCallback"/> - </callback> - </reference> - <reference name="currencyConverter" target="CurrencyConverter"> - </reference> - <property name="quoteCurrencyCode">GBP</property> - </component> - - <component name="TripBooking"> - <implementation.java class="com.tuscanyscatours.tripbooking.impl.TripBookingImpl"/> - <service name="TripBooking"/> - <reference name="hotelBook" target="HotelPartner/Book"/> - <reference name="flightBook" target="TripPartner/Book"/> - <reference name="carBook" target="CarPartner/Book"/> - <reference name="tripBook" target="TripPartner/Book"/> - <reference name="cartUpdates" target="ShoppingCart/CartUpdates"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/build.xml deleted file mode 100644 index aa6127daf0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/build.xml +++ /dev/null @@ -1,22 +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-contribution-fullapp-currency" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/pom.xml deleted file mode 100644 index a21140d871..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/pom.xml +++ /dev/null @@ -1,90 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-fullapp-currency</artifactId> - <name>Apache Tuscany SCA Tours Full Application Currency Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 98673ded6e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:fullapp-currency" /> - <import.java package="com.tuscanyscatours.currencyconverter" /> - <import.java package="com.tuscanyscatours.currencyconverter.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/src/main/resources/fullapp-currency.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/src/main/resources/fullapp-currency.composite deleted file mode 100644 index 3bbcfca7d9..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-currency/src/main/resources/fullapp-currency.composite +++ /dev/null @@ -1,28 +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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="fullapp-currency"> - - <component name="CurrencyConverter"> - <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/build.xml deleted file mode 100644 index 491f9cafd1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/build.xml +++ /dev/null @@ -1,22 +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-contribution-fullapp-packagedtrip" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/pom.xml deleted file mode 100644 index 184814d0fb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/pom.xml +++ /dev/null @@ -1,90 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-fullapp-packagedtrip</artifactId> - <name>Apache Tuscany SCA Tours Full Application Packaged Trip Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7ec170f9cb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:fullapp-packagedtrip" /> - <import.java package="com.tuscanyscatours.common" /> - <import.java package="com.tuscanyscatours.trip.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/src/main/resources/fullapp-packagedtrip.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/src/main/resources/fullapp-packagedtrip.composite deleted file mode 100644 index 72c5ae93c5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-packagedtrip/src/main/resources/fullapp-packagedtrip.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - name="fullapp-packagedtrip"> - - <component name="TripPartner"> - <implementation.java class="com.tuscanyscatours.trip.impl.TripImpl"/> - <service name="Search"> - <binding.ws name="searchws" uri="http://localhost:8085/Trip/Search"/> - <tuscany:binding.jsonrpc name="searchjsonrpc"/> - <callback> - <binding.ws/> - </callback> - </service> - <service name="Book"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/build.xml deleted file mode 100644 index eccff2291f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/build.xml +++ /dev/null @@ -1,22 +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-contribution-fullapp-shoppingcart" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/pom.xml deleted file mode 100644 index d56ced5852..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/pom.xml +++ /dev/null @@ -1,90 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-fullapp-shoppingcart</artifactId> - <name>Apache Tuscany SCA Tours Full Application Shopping Cart Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 1c1fe43b53..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:fullapp-shoppingcart" /> - <import.java package="com.tuscanyscatours.payment" /> - <import.java package="com.tuscanyscatours.shoppingcart" /> - <import.java package="com.tuscanyscatours.shoppingcart.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/src/main/resources/fullapp-shoppingcart.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/src/main/resources/fullapp-shoppingcart.composite deleted file mode 100644 index 1d6a5d60b6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-shoppingcart/src/main/resources/fullapp-shoppingcart.composite +++ /dev/null @@ -1,36 +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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="fullapp-shoppingcart"> - - <component name="ShoppingCart"> - <implementation.java class="com.tuscanyscatours.shoppingcart.impl.ShoppingCartImpl"/> - <reference name="cartStore" target="CartStore"/> - <reference name="payment"> - <binding.ws uri="http://localhost:8081/Payment" /> - </reference> - </component> - - <component name="CartStore"> - <implementation.java class="com.tuscanyscatours.shoppingcart.impl.CartStoreImpl"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/build.xml deleted file mode 100644 index 51aef70837..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/build.xml +++ /dev/null @@ -1,22 +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-contribution-fullapp-ui" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/pom.xml deleted file mode 100644 index 7320851863..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/pom.xml +++ /dev/null @@ -1,90 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-fullapp-ui</artifactId> - <name>Apache Tuscany SCA Tours Full Application User Interface Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 96ff425edb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,28 +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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:fullapp-ui" /> - <import.java package="com.tuscanyscatours" /> - <import.java package="com.tuscanyscatours.impl" /> - <import.java package="com.tuscanyscatours.shoppingcart" /> - <import.java package="com.tuscanyscatours.travelcatalog" /> - <import.java package="com.tuscanyscatours.tripbooking" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/fullapp-ui.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/fullapp-ui.composite deleted file mode 100644 index 34c4d66059..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/fullapp-ui.composite +++ /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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - name="fullapp-ui"> - - <component name="SCAToursUserInterface"> - <tuscany:implementation.widget location="scatours.html"/> - <service name="Widget"> - <tuscany:binding.http uri="/scatours"/> - </service> - <reference name="scaToursCatalog" target="SCATours/SCAToursSearch"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursBooking" target="SCATours/SCAToursBooking"> - <tuscany:binding.jsonrpc/> - </reference> - <reference name="scaToursCart" target="SCATours/SCAToursCart"> - <tuscany:binding.jsonrpc/> - </reference> - </component> - - <component name="SCATours"> - <implementation.java class="com.tuscanyscatours.impl.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="TravelCatalog/TravelCatalogSearch"/> - <reference name="tripBooking" target="TripBooking"/> - <reference name="cartInitialize" target="ShoppingCart/CartInitialize"/> - <reference name="cartCheckout" target="ShoppingCart/CartCheckout"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.html b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.html deleted file mode 100644 index 52479c1cde..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.html +++ /dev/null @@ -1,399 +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 tuscany.sca.Reference("scaToursCatalog"); - - //@Reference - var scaToursBooking = new tuscany.sca.Reference("scaToursBooking"); - - //@Reference - var scaToursCart = new tuscany.sca.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; - var currency = '?'; - - 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>'; - if (totalPrice == 0.0) { - currency = trips[x].currency; - } - 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>'; - if (totalPrice == 0.0) { - currency = tripItems[i].currency; - } - totalPrice = totalPrice + tripItems[i].price; - } - } - - itemsHTML += '</table>'; - } - - document.getElementById('cartItems').innerHTML = itemsHTML; - document.getElementById('cartPrice').innerHTML = totalPrice + ' ' + 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; - init(); - } - - 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-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.odg b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.odg Binary files differdeleted file mode 100644 index 8466377374..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.odg +++ /dev/null diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.png b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.png Binary files differdeleted file mode 100644 index 563bf4ea91..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/scatours.png +++ /dev/null diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/style.css b/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/src/main/resources/style.css deleted file mode 100644 index 6e17c2747b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/fullapp-ui/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-2.x/trunk/tutorials/travelsample/contributions/help-pages/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/build.xml deleted file mode 100644 index 7f77b9270d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/build.xml +++ /dev/null @@ -1,22 +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-contribution-help-pages" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/pom.xml deleted file mode 100644 index 92dda106b6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-help-pages</artifactId>
- <name>Apache Tuscany SCA Tours Help Pages Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-resource-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-http-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2b875a4906..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <export.resource uri="help_pages"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help-pages.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help-pages.composite deleted file mode 100644 index e68c5873c2..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help-pages.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/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - targetNamespace="http://www.tuscanyscatours.com/" - name="helpPages"> - - <component name="Help"> - <tuscany:implementation.resource location="help_pages"/> - <service name="Resource"> - <tuscany:binding.http uri="http://localhost:8085/help/"/> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/BookingAHoliday.html b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/BookingAHoliday.html deleted file mode 100644 index 194ecd1183..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/BookingAHoliday.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - --> - -<head> -<title>Tuscany SCA Tours Help - Booking a holiday</title> -</head> - -<body> -<h1>Tuscany SCA Tours Help Pages - Booking a holiday</h1> - -<p>This page contains instructions on how to book a holiday with SCA Tours</p> - -<p>More help text would go here.....</p> - -</body> -</html>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/BookingAHotel.html b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/BookingAHotel.html deleted file mode 100644 index bde4d25226..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/BookingAHotel.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - --> - -<head> -<title>Tuscany SCA Tours Help - Booking a hotel</title> -</head> - -<body> -<h1>Tuscany SCA Tours Help Pages - Booking a hotel</h1> - -<p>This page contains instructions on how to book a hotel with SCA Tours</p> - -<p>More help text would go here.....</p> - -</body> -</html>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/MakingPayments.html b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/MakingPayments.html deleted file mode 100644 index a1b24f4d23..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/MakingPayments.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - --> - -<head> -<title>Tuscany SCA Tours Help - Making Payments</title> -</head> - -<body> -<h1>Tuscany SCA Tours Help Pages - Making Payments</h1> - -<p>This page contains instructions on how to make payments to SCA Tours</p> - -<p>More help text would go here.....</p> - -</body> -</html>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/index.html b/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/index.html deleted file mode 100644 index 4972752ea1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/help-pages/src/main/resources/help_pages/index.html +++ /dev/null @@ -1,59 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - --> - -<head> -<title>Tuscany SCA Tours Help</title> -</head> - -<body> -<h1>Tuscany SCA Tours Help Pages</h1> - -<p>Welcome to the Tuscany SCA Tours help pages.</p> -<p>How can we help you?</p> - -<h3>Making a booking</h3> -<ul> -<li><a href="BookingAHoliday.html">Booking a holiday</a></li> -<li><a href="BookingAHotel.html">Booking a hotel</a></li> -<li>Booking a car</li> -</ul> - -<h3>Making payments</h3> -<ul> -<li><a href="MakingPayments.html">Paying for my bookings</a></li> -<li>Checking the status of my payment</li> -</ul> - -<h3>Preparing to travel</h3> -<ul> -<li>Passports and Visas</li> -<li>Pre-travel health checks</li> -<li>Things to pack checklist</li> -</ul> - -<h3>Contact customer support</h3> -<ul> -<li>By Email</li> -<li>By Phone</li> -<li>By Post</li> -</ul> -</body> -</html>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/build.xml deleted file mode 100644 index f624c43a01..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/build.xml +++ /dev/null @@ -1,25 +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-contribution-hotel" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/pom.xml deleted file mode 100644 index d023268437..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-hotel</artifactId>
- <name>Apache Tuscany SCA Tours Hotel Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/HotelInfo.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/HotelInfo.java deleted file mode 100644 index e2912c50fc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/HotelInfo.java +++ /dev/null @@ -1,118 +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.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-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/HotelManagement.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/HotelManagement.java deleted file mode 100644 index 476da9a544..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/HotelManagement.java +++ /dev/null @@ -1,24 +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.hotel; - -public interface HotelManagement { - void addHotelInfo(HotelInfo hotelInfo); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/impl/HotelImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/impl/HotelImpl.java deleted file mode 100644 index c56b5ad1d3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/java/com/tuscanyscatours/hotel/impl/HotelImpl.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 com.tuscanyscatours.hotel.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.Book;
-import com.tuscanyscatours.common.Search;
-import com.tuscanyscatours.common.SearchCallback;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-import com.tuscanyscatours.hotel.HotelInfo;
-import com.tuscanyscatours.hotel.HotelManagement;
-
-/**
- * An implementation of the Hotel service
- */
-@Scope("STATELESS")
-@Service({Search.class, Book.class, HotelManagement.class})
-public class HotelImpl implements Search, Book, HotelManagement {
-
- 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) {
- System.out.println("Starting hotel search");
-
- // pretend that this processing takes some time to complete
- try {
- Thread.sleep(3000);
- } catch (Exception ex) {
- // do nothing
- }
-
- // return available hotels
- TripItem[] items = searchSynch(tripLeg);
- searchCallback.searchResults(items);
- }
-
- public int getPercentComplete() {
- return 100;
- }
-
- public String book(TripItem tripItem) {
- return "hotel1";
- }
-
- public void addHotelInfo(HotelInfo hotelInfo) {
- hotels.add(hotelInfo);
- System.out.println("Added hotel info - " + hotelInfo.getName());
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 4dac3ec671..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/hotel/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common"/>
- <export.java package="com.tuscanyscatours.hotel"/>
- <export.java package="com.tuscanyscatours.hotel.impl"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/build.xml deleted file mode 100644 index 0d03b5401d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/build.xml +++ /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. ---> - -<project name="scatours-contribution-interaction-client" default="compile"> - <import file="../../antdefs.xml"/> - <path id="compile-path"> - <pathelement path="../calendar/target/scatours-contribution-calendar.jar"/> - <pathelement path="../common/target/scatours-contribution-common.jar"/> - <pathelement path="../currency/target/scatours-contribution-currency.jar"/> - <pathelement path="../shoppingcart/target/scatours-contribution-shoppingcart.jar"/> - </path> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/pom.xml deleted file mode 100644 index fd34f4cf36..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/pom.xml +++ /dev/null @@ -1,72 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-interaction-client</artifactId> - <name>Apache Tuscany SCA Tours Interaction Client Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-common</artifactId> - <version>${pom.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-calendar</artifactId> - <version>${pom.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-hotel</artifactId> - <version>${pom.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-currency</artifactId> - <version>${pom.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-shoppingcart</artifactId> - <version>${pom.version}</version> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionConversationClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionConversationClientImpl.java deleted file mode 100644 index 7ad0d15442..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionConversationClientImpl.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 scatours.client.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.common.TripItem; -import com.tuscanyscatours.shoppingcart.CartStore; - -@Scope("COMPOSITE") -@Service(Runnable.class) -public class InteractionConversationClientImpl implements Runnable { - - @Reference - protected CartStore cartStoreConversation; - - public void run() { - System.out.println("\nCalling cart store using the conversational interaction pattern"); - - // add some trip items to the cart store - TripItem tripItem = getTestTripItem(); - cartStoreConversation.addTrip(tripItem); - - tripItem.setDescription("2nd trip item"); - cartStoreConversation.addTrip(tripItem); - - tripItem.setDescription("3rd trip item"); - cartStoreConversation.addTrip(tripItem); - - System.out.println("Trip items now in cart"); - TripItem[] tripItems = cartStoreConversation.getTrips(); - for (TripItem item : tripItems) { - System.out.println("Item - " + item.getDescription()); - } - - System.out.println("Reset the cart"); - cartStoreConversation.reset(); - - System.out.println("Trip items now in cart"); - tripItems = cartStoreConversation.getTrips(); - for (TripItem item : tripItems) { - System.out.println("Item - " + item.getDescription()); - } - } - - private TripItem getTestTripItem() { - TripItem tripItem = new TripItem(); - tripItem.setLocation("FLR"); - tripItem.setFromDate("06/12/09 00:00"); - tripItem.setToDate("13/12/09 00:00"); - tripItem.setDescription("1st trip item"); - return tripItem; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionLocalClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionLocalClientImpl.java deleted file mode 100644 index c12c709461..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionLocalClientImpl.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.client.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.calendar.Calendar; -import com.tuscanyscatours.common.TripLeg; - -@Service(Runnable.class) -public class InteractionLocalClientImpl implements Runnable { - - @Reference - protected Calendar calendarLocal; - - public void run() { - System.out.println("\nCalling calendar component over a local binding"); - TripLeg tripLeg = getTestTripLeg(); - String toDate = calendarLocal.getEndDate(tripLeg.getFromDate(), 10); - tripLeg.setToDate(toDate); - System.out.println("Calculated trip end date - " + toDate); - ; - } - - private TripLeg getTestTripLeg() { - TripLeg tripLeg = new TripLeg(); - tripLeg.setFromLocation("LGW"); - tripLeg.setToLocation("FLR"); - tripLeg.setFromDate("06/12/09 00:00"); - tripLeg.setToDate("13/12/09 00:00"); - tripLeg.setNoOfPeople("1"); - tripLeg.setId("TRIP27"); - return tripLeg; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionOneWayCallbackClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionOneWayCallbackClientImpl.java deleted file mode 100644 index 0b52d2d516..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionOneWayCallbackClientImpl.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 scatours.client.impl; - -import java.util.concurrent.CountDownLatch; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.common.Search; -import com.tuscanyscatours.common.SearchCallback; -import com.tuscanyscatours.common.TripItem; -import com.tuscanyscatours.common.TripLeg; - -@Scope("COMPOSITE") -@Service(Runnable.class) -public class InteractionOneWayCallbackClientImpl implements Runnable, SearchCallback { - - @Reference - protected Search hotelSearchOneWayCallback; - - CountDownLatch resultsReceivedCountdown; - - public void run() { - System.out.println("\nCalling hotel component using both one way and callback interation patterns"); - resultsReceivedCountdown = new CountDownLatch(1); - TripLeg tripLeg = getTestTripLeg(); - hotelSearchOneWayCallback.searchAsynch(tripLeg); - - // start other searched here while the hotel search progresses - - // wait for responses to come back - try { - resultsReceivedCountdown.await(); - } catch (InterruptedException ex) { - } - } - - public void searchResults(TripItem[] items) { - for (TripItem tripItem : items) { - System.out.println("Found hotel - " + tripItem.getName()); - } - resultsReceivedCountdown.countDown(); - } - - public void setPercentComplete(String searchComponent, int percentComplete) { - // Not used in this sample - } - - private TripLeg getTestTripLeg() { - TripLeg tripLeg = new TripLeg(); - tripLeg.setFromLocation("LGW"); - tripLeg.setToLocation("FLR"); - tripLeg.setFromDate("06/12/09 00:00"); - tripLeg.setToDate("13/12/09 00:00"); - tripLeg.setNoOfPeople("1"); - tripLeg.setId("TRIP27"); - return tripLeg; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionRemoteClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionRemoteClientImpl.java deleted file mode 100644 index 0026b2e0b7..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionRemoteClientImpl.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 scatours.client.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.common.Search; -import com.tuscanyscatours.common.SearchCallback; -import com.tuscanyscatours.common.TripItem; -import com.tuscanyscatours.common.TripLeg; - -@Service(Runnable.class) -public class InteractionRemoteClientImpl implements Runnable, SearchCallback { - - @Reference - protected Search hotelSearchRemote; - - public void run() { - System.out.println("\nCalling hotel component over a remote binding"); - TripLeg tripLeg = getTestTripLeg(); - TripItem[] tripItems = hotelSearchRemote.searchSynch(tripLeg); - for (TripItem tripItem : tripItems) { - System.out.println("Found hotel - " + tripItem.getName()); - } - } - - public void searchResults(TripItem[] items) { - // we are calling the hotel component synchronously here - // so the callback interface is not used - } - - public void setPercentComplete(String searchComponent, int percentComplete) { - // Not used in this sample - } - - private TripLeg getTestTripLeg() { - TripLeg tripLeg = new TripLeg(); - tripLeg.setFromLocation("LGW"); - tripLeg.setToLocation("FLR"); - tripLeg.setFromDate("06/12/09 00:00"); - tripLeg.setToDate("13/12/09 00:00"); - tripLeg.setNoOfPeople("1"); - tripLeg.setId("TRIP27"); - return tripLeg; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionRequestResponseClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionRequestResponseClientImpl.java deleted file mode 100644 index f25a069713..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/java/scatours/client/impl/InteractionRequestResponseClientImpl.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.client.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.currencyconverter.CurrencyConverter; - -@Service(Runnable.class) -public class InteractionRequestResponseClientImpl implements Runnable { - - @Reference - protected CurrencyConverter currencyConverterRequestResponse; - - public void run() { - System.out.println("\nCalling currency converter component using request response interation pattern"); - double exchangeRate = currencyConverterRequestResponse.getExchangeRate("GBP", "USD"); - System.out.println("GBP to USD exchange rate is " + exchangeRate); - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 24349299a4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/resources/META-INF/sca-contribution.xml +++ /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. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tours="http://tucsanyscatours.com/"> - <deployable composite="tours:client" /> - <import.java package="com.tuscanyscatours.calendar" /> - <import.java package="com.tuscanyscatours.calendar.impl" /> - <import.java package="com.tuscanyscatours.common" /> - <import.java package="com.tuscanyscatours.currencyconverter" /> - <import.java package="com.tuscanyscatours.currencyconverter.impl" /> - <import.java package="com.tuscanyscatours.shoppingcart" /> - <import.java package="com.tuscanyscatours.shoppingcart.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/resources/client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/resources/client.composite deleted file mode 100644 index 5fc2006cf0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-client/src/main/resources/client.composite +++ /dev/null @@ -1,77 +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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="Client"> - - <!-- Local interaction --> - <component name="InteractionLocalClient"> - <implementation.java class="scatours.client.impl.InteractionLocalClientImpl" /> - <reference name="calendarLocal" - target="Calendar"/> - </component> - - <component name="Calendar"> - <implementation.java class="com.tuscanyscatours.calendar.impl.CalendarImpl"/> - </component> - - <!-- Remote interaction --> - <component name="InteractionRemoteClient"> - <implementation.java class="scatours.client.impl.InteractionRemoteClientImpl" /> - <reference name="hotelSearchRemote"> - <binding.ws uri="http://localhost:8081/Hotel/Search"/> - </reference> - </component> - - <!-- Request response interaction --> - <component name="InteractionRequestResponseClient"> - <implementation.java class="scatours.client.impl.InteractionRequestResponseClientImpl" /> - <reference name="currencyConverterRequestResponse" target="CurrencyConverter"/> - </component> - - <component name="CurrencyConverter"> - <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/> - </component> - - <!-- One way and callback interaction --> - <component name="InteractionOneWayCallbackClient"> - <implementation.java class="scatours.client.impl.InteractionOneWayCallbackClientImpl" /> - <reference name="hotelSearchOneWayCallback"> - <interface.java interface="com.tuscanyscatours.common.Search" - callbackInterface="com.tuscanyscatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8081/Hotel/Search"/> - <callback> - <binding.ws name="callback" uri="http://localhost:8080/Client/SearchCallback"/> - </callback> - </reference> - </component> - - <!-- Conversational interaction --> - <component name="InteractionConversationClient"> - <implementation.java class="scatours.client.impl.InteractionConversationClientImpl" /> - <reference name="cartStoreConversation" target="CartStore"/> - </component> - - <component name="CartStore"> - <implementation.java class="com.tuscanyscatours.shoppingcart.impl.CartStoreImpl"/> - <service name="CartStore"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/build.xml deleted file mode 100644 index 10451b6248..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/build.xml +++ /dev/null @@ -1,22 +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-contribution-interaction-service-remote" default="compile"> - <import file="../../antdefs.xml"/> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/pom.xml deleted file mode 100644 index 0b0ffd41c3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-interaction-service-remote</artifactId> - <name>Apache Tuscany SCA Tours Interaction Service Remote Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-common</artifactId> - <version>${pom.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-flight</artifactId> - <version>${pom.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours-contribution-hotel</artifactId> - <version>${pom.version}</version> - <scope>runtime</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index bcd545afe3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tours="http://com.tuscanyscatours/"> - <deployable composite="tours:service" /> - <import.java package="com.tuscanyscatours.common" /> - <import.java package="com.tuscanyscatours.flight.impl" /> - <import.java package="com.tuscanyscatours.hotel.impl" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/src/main/resources/service.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/src/main/resources/service.composite deleted file mode 100644 index 4f070ea934..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/interaction-service-remote/src/main/resources/service.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="Service"> - - <component name="Hotel"> - <implementation.java class="com.tuscanyscatours.hotel.impl.HotelImpl"/> - <service name="Search"> - <interface.java interface="com.tuscanyscatours.common.Search" - callbackInterface="com.tuscanyscatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8081/Hotel/Search"/> - <callback> - <binding.ws name="callback"/> - </callback> - </service> - </component> - - <component name="Flight"> - <implementation.java class="com.tuscanyscatours.flight.impl.FlightImpl"/> - <service name="Search"> - <interface.java interface="com.tuscanyscatours.common.Search" - callbackInterface="com.tuscanyscatours.common.SearchCallback"/> - <binding.ws uri="http://localhost:8081/Hotel/SearchConversational"/> - <callback> - <binding.ws name="callback"/> - </callback> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/build.xml deleted file mode 100644 index 6a85f2066e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/build.xml +++ /dev/null @@ -1,25 +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-contribution-introducing-client" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../introducing-tours/target/scatours-contribution-introducing-tours.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/pom.xml deleted file mode 100644 index b163304934..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-introducing-client</artifactId>
- <name>Apache Tuscany SCA Tours Introducing Client Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-introducing-tours</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/java/scatours/client/impl/TestClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/java/scatours/client/impl/TestClientImpl.java deleted file mode 100644 index c89eec07fe..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/java/scatours/client/impl/TestClientImpl.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 scatours.client.impl;
-
-import java.math.BigDecimal;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.Bookings;
-import com.tuscanyscatours.Checkout;
-
-@Service(Runnable.class)
-public class TestClientImpl {
- @Reference
- protected Bookings bookings;
-
- @Reference
- protected Checkout checkout;
-
- public TestClientImpl() {
- }
-
- public void run() {
- String bookingCode = bookings.newBooking("FS1APR4", 1);
- System.out.println("Booking code is " + bookingCode);
-
- checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7548d3d99e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:client="http://client.scatours/">
- <deployable composite="client:Client" />
- <import.java package="com.tuscanyscatours" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/resources/client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/src/main/resources/client.composite deleted file mode 100644 index fbefc7b35b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-client/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://client.scatours/"
- name="Client">
-
- <component name="TestClient">
- <implementation.java class="scatours.client.impl.TestClientImpl" />
- <reference name="bookings" target="TripBooking/Bookings" />
- <reference name="checkout" target="ShoppingCart/Checkout" />
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/build.xml deleted file mode 100644 index f269f6577b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/build.xml +++ /dev/null @@ -1,22 +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-contribution-introducing-tours" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/pom.xml deleted file mode 100644 index ba0c405364..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-introducing-tours</artifactId>
- <name>Apache Tuscany SCA Tours Introducing Tours Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/goodvaluetrips/Trips.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/goodvaluetrips/Trips.java deleted file mode 100644 index 5026d23c95..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Trips {
- String checkAvailability(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Bookings.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Bookings.java deleted file mode 100644 index 4ddd145778..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Bookings {
- String newBooking(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Checkout.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Checkout.java deleted file mode 100644 index 4e8f1481f5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Checkout.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;
-
-import java.math.BigDecimal;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Checkout {
- void makePayment(BigDecimal amount, String cardInfo);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Updates.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/Updates.java deleted file mode 100644 index beb5f529b1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Updates {
- void addTrip(String resCode);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/impl/ShoppingCartImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/impl/ShoppingCartImpl.java deleted file mode 100644 index 629ea7b5ec..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/impl/ShoppingCartImpl.java +++ /dev/null @@ -1,49 +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.impl;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.tuscanyscatours.Checkout;
-import com.tuscanyscatours.Updates;
-
-public class ShoppingCartImpl implements Checkout, Updates {
- private static List<String> bookedTrips = new ArrayList<String>();
-
- protected String currency = "USD";
-
- public void makePayment(BigDecimal amount, String cardInfo) {
- System.out.print("Charged " + currency + " " + amount
- + " to card "
- + cardInfo
- + " for "
- + (bookedTrips.size() > 1 ? "trips" : "trip"));
- for (String trip : bookedTrips) {
- System.out.print(" " + trip);
- }
- System.out.println();
- bookedTrips.clear();
- }
-
- public void addTrip(String resCode) {
- bookedTrips.add(resCode);
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/impl/TripBookingImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/impl/TripBookingImpl.java deleted file mode 100644 index 1259fa7d82..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/java/com/tuscanyscatours/impl/TripBookingImpl.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 com.tuscanyscatours.impl;
-
-import org.oasisopen.sca.annotation.Reference;
-
-import com.goodvaluetrips.Trips;
-import com.tuscanyscatours.Bookings;
-import com.tuscanyscatours.Updates;
-
-public class TripBookingImpl implements Bookings {
- @Reference
- protected 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-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f2f0a85f00..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tst="http://tuscanyscatours.com/">
- <deployable composite="tst:Tours" />
- <export.java package="com.tuscanyscatours" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/resources/tours.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/src/main/resources/tours.composite deleted file mode 100644 index b468b9c053..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-tours/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="Tours">
-
- <component name="TripBooking">
- <implementation.java class="com.tuscanyscatours.impl.TripBookingImpl" />
- <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.impl.ShoppingCartImpl"/>
- <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-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/build.xml deleted file mode 100644 index 9d65c703b7..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/build.xml +++ /dev/null @@ -1,22 +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-contribution-introducing-trips" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/pom.xml deleted file mode 100644 index 9d601ab670..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-introducing-trips</artifactId>
- <name>Apache Tuscany SCA Tours Introducing Trips Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/java/com/goodvaluetrips/Trips.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/java/com/goodvaluetrips/Trips.java deleted file mode 100644 index 5026d23c95..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/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.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Trips {
- String checkAvailability(String trip, int people);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/java/com/goodvaluetrips/impl/TripProviderImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/java/com/goodvaluetrips/impl/TripProviderImpl.java deleted file mode 100644 index 06f93f2637..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/java/com/goodvaluetrips/impl/TripProviderImpl.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.goodvaluetrips.impl;
-
-import com.goodvaluetrips.Trips;
-
-public class TripProviderImpl 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-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 12ac4d4327..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:gvt="http://goodvaluetrips.com/">
- <deployable composite="gvt:Trips" />
- <export namespace="http://goodvaluetrips.com/" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/resources/trips.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/src/main/resources/trips.composite deleted file mode 100644 index 28c6f0c4a0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/introducing-trips/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://goodvaluetrips.com/"
- name="Trips">
-
- <component name="TripProvider">
- <implementation.java class="com.goodvaluetrips.impl.TripProviderImpl" />
- <service name="Trips">
- <interface.java interface="com.goodvaluetrips.Trips" />
- </service>
- </component>
-</composite>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/build.xml deleted file mode 100644 index 1baf6ab153..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/build.xml +++ /dev/null @@ -1,22 +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-contribution-notification-corba" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/pom.xml deleted file mode 100644 index 99a5deaa79..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-notification-corba</artifactId>
- <name>Apache Tuscany SCA Tours Notification Contribution Which Uses SMSGateway CORBA Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/notification-corba/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 68b39b735a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.notification" />
- <import.java package="com.tuscanyscatours.notification.impl" />
- <import.java package="com.tuscanyscatours.smsgateway" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/src/main/resources/notification-corba.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/src/main/resources/notification-corba.composite deleted file mode 100644 index 67ede84df1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-corba/src/main/resources/notification-corba.composite +++ /dev/null @@ -1,36 +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/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - targetNamespace="http://tuscanyscatours.com/" - name="notification"> - - <component name="Notification"> - <implementation.java class="com.tuscanyscatours.notification.impl.NotificationImpl" /> - <service name="Notification"> - <interface.java interface="com.tuscanyscatours.notification.Notification"/> - </service> - - <reference name="smsGateway"> - <interface.java interface="com.tuscanyscatours.smsgateway.SMSGateway"/> - <tuscany:binding.corba host="localhost" port="5080" name="SMSGatewayCORBAService"/> - </reference> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/build.xml deleted file mode 100644 index 3b7e660a5d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/build.xml +++ /dev/null @@ -1,22 +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-contribution-notification-ejb" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/pom.xml deleted file mode 100644 index 7eb553d975..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-notification-ejb</artifactId>
- <name>Apache Tuscany SCA Tours Notification Contribution Which Uses SMSGateway EJB Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 68b39b735a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.notification" />
- <import.java package="com.tuscanyscatours.notification.impl" />
- <import.java package="com.tuscanyscatours.smsgateway" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/src/main/resources/notification-ejb.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/src/main/resources/notification-ejb.composite deleted file mode 100644 index 333eeb2d97..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ejb/src/main/resources/notification-ejb.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="notification"> - - <component name="Notification"> - <implementation.java class="com.tuscanyscatours.notification.impl.NotificationImpl" /> - <service name="Notification"> - <interface.java interface="com.tuscanyscatours.notification.Notification"/> - </service> - - <reference name="smsGateway"> - <interface.java interface="com.tuscanyscatours.smsgateway.SMSGateway"/> - <binding.ejb uri="SMSGatewayImplRemote"/> - </reference> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/build.xml deleted file mode 100644 index 0b1b80c44f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/build.xml +++ /dev/null @@ -1,22 +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-contribution-notification-jms" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/pom.xml deleted file mode 100644 index 5a34e41dc5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-notification-jms</artifactId>
- <name>Apache Tuscany SCA Tours Notification Contribution Which Uses SMSGateway JMS Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/notification-jms/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 68b39b735a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.notification" />
- <import.java package="com.tuscanyscatours.notification.impl" />
- <import.java package="com.tuscanyscatours.smsgateway" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/src/main/resources/notification-jms.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/src/main/resources/notification-jms.composite deleted file mode 100644 index 9b965ca8b8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-jms/src/main/resources/notification-jms.composite +++ /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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="notification"> - - <component name="Notification"> - <implementation.java class="com.tuscanyscatours.notification.impl.NotificationImpl" /> - <service name="Notification"> - <interface.java interface="com.tuscanyscatours.notification.Notification"/> - </service> - - <reference name="smsGateway"> - <interface.java interface="com.tuscanyscatours.smsgateway.SMSGateway"/> - <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" - jndiURL="tcp://localhost:61619"> - <destination name="SMSRequestQueue" create="ifnotexist"/> - <response> - <destination name="SMSResponseQueue" create="ifnotexist"/> - </response> - </binding.jms> - </reference> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/build.xml deleted file mode 100644 index de8d5bbb06..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/build.xml +++ /dev/null @@ -1,22 +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-contribution-notification-rmi" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/pom.xml deleted file mode 100644 index fb427a243b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-notification-rmi</artifactId>
- <name>Apache Tuscany SCA Tours Notification Contribution Which Uses SMSGateway RMI Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 68b39b735a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.notification" />
- <import.java package="com.tuscanyscatours.notification.impl" />
- <import.java package="com.tuscanyscatours.smsgateway" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/src/main/resources/notification-rmi.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/src/main/resources/notification-rmi.composite deleted file mode 100644 index 6c74fe9143..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-rmi/src/main/resources/notification-rmi.composite +++ /dev/null @@ -1,36 +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/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - targetNamespace="http://tuscanyscatours.com/" - name="notification"> - - <component name="Notification"> - <implementation.java class="com.tuscanyscatours.notification.impl.NotificationImpl" /> - <service name="Notification"> - <interface.java interface="com.tuscanyscatours.notification.Notification"/> - </service> - - <reference name="smsGateway"> - <interface.java interface="com.tuscanyscatours.smsgateway.SMSGateway"/> - <tuscany:binding.rmi host="localhost" port="8099" serviceName="SMSGatewayRMI"/> - </reference> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/build.xml deleted file mode 100644 index bac935bc5a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/build.xml +++ /dev/null @@ -1,22 +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-contribution-notification-ws" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/pom.xml deleted file mode 100644 index 0e7fd6c692..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-notification-ws</artifactId>
- <name>Apache Tuscany SCA Tours Notification Contribution Which Uses SMSGateway Web Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/notification-ws/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 68b39b735a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.notification" />
- <import.java package="com.tuscanyscatours.notification.impl" />
- <import.java package="com.tuscanyscatours.smsgateway" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/src/main/resources/notification-ws.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/src/main/resources/notification-ws.composite deleted file mode 100644 index 6e3fba0a75..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification-ws/src/main/resources/notification-ws.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="notification"> - - <component name="Notification"> - <implementation.java class="com.tuscanyscatours.notification.impl.NotificationImpl" /> - <service name="Notification"> - <interface.java interface="com.tuscanyscatours.notification.Notification" /> - </service> - - <reference name="smsGateway"> - <interface.java interface="com.tuscanyscatours.smsgateway.SMSGateway" /> - <binding.ws uri="http://localhost:8081/SMSGatewayService" /> - </reference> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/build.xml deleted file mode 100644 index ff7e56c8b7..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/build.xml +++ /dev/null @@ -1,22 +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-contribution-notification" default="compile">
- <import file="../../antdefs.xml"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/pom.xml deleted file mode 100644 index b48e92150e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-notification</artifactId>
- <name>Apache Tuscany SCA Tours Notification Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</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-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/notification/Notification.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/notification/Notification.java deleted file mode 100644 index 7ae26b93e4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/notification/Notification.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.notification; - -public interface Notification { - - boolean notify(String accountID, String subject, String message); - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/notification/impl/NotificationImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/notification/impl/NotificationImpl.java deleted file mode 100644 index cdd61f901b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/notification/impl/NotificationImpl.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 com.tuscanyscatours.notification.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.notification.Notification; -import com.tuscanyscatours.smsgateway.SMSGateway; - -@Service(Notification.class) -public class NotificationImpl implements Notification { - - /** - * Use "Fake" phone number that has been reserved by Ofcom. - * See: http://www.ofcom.org.uk/telecoms/ioi/numbers/num_drama?a=87101 - */ - private static final String SCA_TOURS_SMS = "+44(0)2079460723"; - - @Reference - protected SMSGateway smsGateway; - - public boolean notify(String accountID, String subject, String message) { - - boolean result = true; - - String sms = getSMSAddress(accountID); - if (sms != null) { - System.out.println("Sending SMS to " + sms + " for accountID " + accountID); - result &= smsGateway.sendSMS(SCA_TOURS_SMS, sms, subject + ". " + message); - } - - return result; - } - - private String getSMSAddress(String accountID) { - // Use "Fake" phone number that has been reserved by Ofcom. - // See: http://www.ofcom.org.uk/telecoms/ioi/numbers/num_drama?a=87101 - return "+44(0)7700900812"; - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java deleted file mode 100644 index 7699868da5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.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 com.tuscanyscatours.smsgateway; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * A gateway to send SMS messages. - */ -@Remotable -public interface SMSGateway { - boolean sendSMS(String fromNumber, String toNumber, String text); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 3442da25d5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/notification/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <export.java package="com.tuscanyscatours.notification" />
- <export.java package="com.tuscanyscatours.notification.impl" />
- <export.java package="com.tuscanyscatours.smsgateway" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/build.xml deleted file mode 100644 index 5e2921995c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/build.xml +++ /dev/null @@ -1,23 +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-contribution-payment-bpel-process" default="compile">
- <import file="../../antdefs.xml"/>
- <target name="wsdljava"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/pom.xml deleted file mode 100644 index 4b3b63aa9d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/pom.xml +++ /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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-payment-bpel-process</artifactId>
- <name>Apache Tuscany SCA Tours Payment BPEL Process Contribution</name>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <excludes>
- <exclude>**/*.cbp</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 22ef6de317..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 9ce3ed273c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <export namespace="http://www.tuscanyscatours.com/Payment"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/payment.bpel b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/src/main/resources/payment.bpel deleted file mode 100644 index 8f11d76888..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel-process/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/build.xml deleted file mode 100644 index 29e317cf4d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/build.xml +++ /dev/null @@ -1,49 +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-contribution-payment-bpel" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="EmailGateway.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/emailgateway/EmailGateway.class"/>
- <param name="package" value="com.tuscanyscatours.emailgateway"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-
- <property name="test-setup" value="yes"/>
- <target name="testsetup">
- <unzip dest="target/test-classes">
- <fileset dir="${env.TUSCANY_HOME}/lib">
- <include name="ode-dao-jpa-ojpa-derby-*.zip"/>
- </fileset>
- </unzip>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/log4j.properties b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/log4j.properties deleted file mode 100644 index 7ed0bcaf77..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/pom.xml deleted file mode 100644 index 63a047ee49..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/pom.xml +++ /dev/null @@ -1,221 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-bpel</artifactId> - <name>Apache Tuscany SCA Tours Payment BPEL Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-api</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.1</version> - </dependency> - - <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.1</version> - <exclusions> - <exclusion> - <groupId>javax.xml.soap</groupId> - <artifactId>saaj-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-bpel-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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.12</version> - <executions> - <execution> - <id>wsimport</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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>com.tuscanyscatours.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> - <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.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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 22ef6de317..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 10d81a42e2..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:pp="http://www.tuscanyscatours.com/Payment"> - <deployable composite="pp:payment"/> - <import namespace="http://www.tuscanyscatours.com/Payment"/> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/payment.composite deleted file mode 100644 index 1032a37fbd..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/main/resources/payment.composite +++ /dev/null @@ -1,40 +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/200912" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment" - name="payment"> - - <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:8082/CreditCardPayment"/> - </reference> - <reference name="emailGatewayPartnerLink"> - <binding.ws uri="http://localhost:8088/EmailGateway"/> - </reference> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index 59fc9ef68c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.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 scatours.payment; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.tuscanyscatours.payment.Payment; - -/** - * - */ -public class PaymentTestCase { - private static Node paymentNode; - private static Node creditCardNode; - private static Node emailGatewayNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - creditCardNode = - NodeFactory.getInstance() - .createNode("creditcard.composite", - new Contribution("creditcard", "../creditcard-payment-jaxb/target/classes")); - - creditCardNode.start(); - - emailGatewayNode = - NodeFactory.getInstance().createNode("emailgateway.composite", - new Contribution("emailgateway", - "../emailgateway/target/classes"), - new Contribution("emailgateway-test", - "../emailgateway/target/test-classes")); - - emailGatewayNode.start(); - - paymentNode = - NodeFactory.getInstance() - .createNode( - new Contribution("payment-bpel-process", - "../payment-bpel-process/target/classes"), - new Contribution("payment-bpel", "./target/classes"), - new Contribution("payment-bpel-test", "./target/test-classes")); - - paymentNode.start(); - } - - @Test - public void testPayment() { - Node client = (Node)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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java deleted file mode 100644 index 3b8d8ad88a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/client/impl/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.impl;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7112bd3820..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:pp="http://www.tuscanyscatours.com/Payment"> - <deployable composite="pp:paymentClient" /> - <import.java package="com.tuscanyscatours.payment" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/resources/payment-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/resources/payment-client.composite deleted file mode 100644 index 5243752a08..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/resources/payment-client.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/200912" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:pp="http://www.tuscanyscatours.com/Payment" - targetNamespace="http://www.tuscanyscatours.com/Payment" - name="paymentClient"> - - <component name="PaymentClient"> - <implementation.java class="scatours.payment.client.impl.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8080/Payment" /> - </reference> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/build.xml deleted file mode 100644 index 3a86952fc1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-payment-groovy" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="EmailGateway.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/emailgateway/EmailGateway.class"/>
- <param name="package" value="com.tuscanyscatours.emailgateway"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/pom.xml deleted file mode 100644 index 40a16070b2..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/pom.xml +++ /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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-groovy</artifactId> - <name>Apache Tuscany SCA Tours Payment Groovy Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-script</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</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.12</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 1813c77436..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index a097d9b7e4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 63b79a7f63..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tours="http://tuscanyscatours.com/"> - <deployable composite="tours:payment" /> - <export.java package="com.tuscanyscatours.payment" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/Payment.wsdl deleted file mode 100644 index 2519d7642e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/payment.composite deleted file mode 100644 index f0b25e41d6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/payment.composite +++ /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. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="payment"> - - <component name="Payment"> - <t:implementation.script script="payment/PaymentImpl.groovy"/> - <service name="Payment"> - <interface.java interface="com.tuscanyscatours.payment.Payment" /> - <binding.ws uri="http://localhost:8081/Payment"/> - </service> - <reference name="emailGateway"> - <interface.java interface="com.tuscanyscatours.emailgateway.EmailGateway" /> - <binding.ws uri="http://localhost:8088/EmailGateway"/> - </reference> - <property name="transactionFee" type="xsd:float">0.02</property> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/payment/PaymentImpl.groovy b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/main/resources/payment/PaymentImpl.groovy deleted file mode 100644 index 854fbd2f4a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/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 + transactionFee;
-
- com.tuscanyscatours.emailgateway.EmailType email = new com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index 440fbd9721..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java +++ /dev/null @@ -1,82 +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.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.tuscanyscatours.payment.Payment;
-
-/**
- *
- */
-public class PaymentTestCase {
-
- private static Node paymentNode;
- private static Node creditCardNode;
- private static Node emailGatewayNode;
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- creditCardNode =
- NodeFactory.getInstance()
- .createNode("creditcard.composite",
- new Contribution("creditcard", "../creditcard-payment-jaxb/target/classes"));
-
- creditCardNode.start();
-
- emailGatewayNode =
- NodeFactory.getInstance().createNode("emailgateway.composite",
- new Contribution("emailgateway",
- "../emailgateway/target/classes"),
- new Contribution("emailgateway-test",
- "../emailgateway/target/test-classes"));
-
- emailGatewayNode.start();
-
- paymentNode =
- NodeFactory.getInstance().createNode(
- new Contribution("payment-groovy", "./target/classes"),
- new Contribution("payment-groovy-test",
- "./target/test-classes"));
-
- paymentNode.start();
- }
-
- @Test
- public void testPayment() {
- Node client = (Node)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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java deleted file mode 100644 index 3b8d8ad88a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/client/impl/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.impl;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 666769fef5..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tours="http://tuscanyscatours.com/" > - <deployable composite="tours:paymentClient" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/resources/payment-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/resources/payment-client.composite deleted file mode 100644 index 93482dfb45..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/resources/payment-client.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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="paymentClient"> - - <component name="PaymentClient"> - <implementation.java class="scatours.payment.client.impl.PaymentClientImpl" /> - <reference name="payment"> - <interface.java interface="com.tuscanyscatours.payment.Payment" /> - <binding.ws uri="http://localhost:8081/Payment" /> - </reference> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/build.xml deleted file mode 100644 index 4c943a7370..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-payment-java-policy" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml deleted file mode 100644 index 3adfca89f4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml +++ /dev/null @@ -1,8 +0,0 @@ -<project default="copy-resources"> - <target name="init"/> - <target name="copy-resources" depends="init"> - <copy todir="target/classes/META-INF" filtering="true"> - <fileset dir="." includes="LICENSE|NOTICE" excludes="**/*.java"/> - </copy> - </target> -</project>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml deleted file mode 100644 index b04b40b6a0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml +++ /dev/null @@ -1,176 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-java-policy</artifactId> - <name>Apache Tuscany SCA Tours Payment Java Policy Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-security</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - -<!-- - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-transaction</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> ---> - - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - <version>1.0</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</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> - <snapshots> - <enabled>false</enabled> - </snapshots> - </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>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/Customer.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/Customer.java deleted file mode 100644 index 3b72f81b33..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java deleted file mode 100644 index b08f76e0fa..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.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 com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java deleted file mode 100644 index 706167d567..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer; - -import java.util.Collection; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java deleted file mode 100644 index d0b1736e98..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java +++ /dev/null @@ -1,115 +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.customer.impl; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Requires; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.customer.Customer; -import com.tuscanyscatours.customer.CustomerNotFoundException; -import com.tuscanyscatours.customer.CustomerRegistry; -import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType; -import com.tuscanyscatours.payment.creditcard.CreditCardTypeType; -import com.tuscanyscatours.payment.creditcard.ObjectFactory; -import com.tuscanyscatours.payment.creditcard.PayerType; - -/** - * An in-memory customer registry implementation - */ -@Service(CustomerRegistry.class) -@Scope("COMPOSITE") -@EagerInit -@Requires("{http://docs.oasis-open.org/ns/opencsa/sca/200912}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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java deleted file mode 100644 index 716ea18ee4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.emailgateway; - -import org.oasisopen.sca.annotation.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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java deleted file mode 100644 index 3556b4855b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.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 com.tuscanyscatours.emailgateway.impl; - -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.emailgateway.EmailGateway; - -@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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java deleted file mode 100644 index e25505ce45..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java +++ /dev/null @@ -1,74 +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.payment.impl; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Requires; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.customer.Customer; -import com.tuscanyscatours.customer.CustomerNotFoundException; -import com.tuscanyscatours.customer.CustomerRegistry; -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.payment.Payment; -import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception; -import com.tuscanyscatours.payment.creditcard.CreditCardPayment; - -/** - * The payment implementation - */ -@Service(Payment.class) -//@RolesAllowed({"Admin", "Billing"}) -//@RunAs("Billing") -public class PaymentImpl implements Payment { - - @Reference - protected CustomerRegistry customerRegistry; - - @Reference - //@Authentication - not supported - @Requires("{http://docs.oasis-open.org/ns/opencsa/sca/200912}authentication") - protected CreditCardPayment creditCardPayment; - - @Reference - protected EmailGateway emailGateway; - - @Property - protected float transactionFee = 0.01f; - - public String makePaymentMember(String customerId, float amount) { - try { - Customer customer = customerRegistry.getCustomer(customerId); - String status = creditCardPayment.authorize(customer.getCreditCard(), amount + transactionFee); - emailGateway.sendEmail("order@tuscanyscatours.com", - customer.getEmail(), - "Status for your payment", - customer + " >>> Status = " + status); - return status; - } catch (CustomerNotFoundException ex) { - return "Payment failed due to " + ex.getMessage(); - } catch (AuthorizeFault_Exception e) { - return e.getFaultInfo().getErrorCode(); - } catch (Throwable t) { - return "Payment failed due to system error " + t.getMessage(); - } - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 9a87f1d2ae..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,132 +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: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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index abe5ba8718..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:payment" /> - <export.java package="com.tuscanyscatours.payment" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/Payment.wsdl deleted file mode 100644 index 2519d7642e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/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-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml deleted file mode 100644 index 98f9db7ed3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml +++ /dev/null @@ -1,48 +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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <!-- Policy Intents Defined by the SCA Runtime --> - <intent name="authorization" constrains="sca:implementation"/> - <intent name="managedTransaction" constrains="sca:implementation"/> - <intent name="managedTransaction.global"/> - - <!-- Policy Sets --> - <policySet name="ps1" - provides="sca:authorization" - appliesTo="sca:implementation.java"/> - - <policySet name="ps2" - provides="sca:managedTransaction.global" - appliesTo="sca:implementation.java"/> - - <policySet name="BasicAuthenticationPolicySet" - provides="authentication" - appliesTo="sca:binding.ws"> - <tuscany:basicAuthentication> - <tuscany:userName>myname</tuscany:userName> - <tuscany:password>mypassword</tuscany:password> - </tuscany:basicAuthentication> - </policySet> - -</definitions> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite deleted file mode 100644 index 8050d19771..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="payment"> - - <component name="Payment"> - <implementation.java class="com.tuscanyscatours.payment.impl.PaymentImpl" /> - <service name="Payment"> - <binding.sca/> - <binding.ws uri="http://localhost:8081/Payment"/> - </service> - <reference name="customerRegistry" target="CustomerRegistry"/> - <!-- reference name="creditCardPayment" policySets="BasicAuthenticationPolicySet"--> - <!-- reference name="creditCardPayment" requires="authentication"--> - <reference name="creditCardPayment"> - <binding.ws uri="http://localhost:8082/CreditCardPayment"/> - </reference> - <reference name="emailGateway" target="EmailGateway"/> - <property name="transactionFee">0.02</property> - </component> - - <component name="CustomerRegistry"> - <implementation.java class="com.tuscanyscatours.customer.impl.CustomerRegistryImpl" /> - </component> - - <component name="EmailGateway"> - <implementation.java class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl" /> - </component> - -</composite>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index 6ebcc4f2dc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java +++ /dev/null @@ -1,85 +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.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import com.tuscanyscatours.payment.Payment; - -public class PaymentTestCase { - private static Node node1; - private static Node node2; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - node1 = - NodeFactory.getInstance() - .createNode("payment.composite", - new Contribution("payment", "./target/classes")); - node2 = - NodeFactory.getInstance() - .createNode("creditcard.composite", - new Contribution("creditcard", - "../../contributions/creditcard-payment-jaxb/target/classes")); - node1.start(); - node2.start(); - } - - @Test - public void testPayment() { - Node client = (Node)node1; - Payment payment = client.getService(Payment.class, "Payment"); - - System.out.println("\n\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); - System.out.println("\n\nFailed Payment - Status = \n\n" + 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"); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node1 != null) { - node1.stop(); - node1 = null; - } - - if (node2 != null) { - node2.stop(); - node2 = null; - } - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/build.xml deleted file mode 100644 index 4ddd9fbba0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-payment-java" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/pom.xml deleted file mode 100644 index f8c27ca09b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/pom.xml +++ /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. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-java</artifactId> - <name>Apache Tuscany SCA Tours Payment Java Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-security</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> - <version>1.0</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</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> - <snapshots> - <enabled>false</enabled> - </snapshots> - </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>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/Customer.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/Customer.java deleted file mode 100644 index c97ba8fb9f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer;
-
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java deleted file mode 100644 index 7f028c301e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.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 com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java deleted file mode 100644 index 38a2759660..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer;
-
-import java.util.Collection;
-
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java deleted file mode 100644 index 906e392459..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java +++ /dev/null @@ -1,115 +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.customer.impl;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.oasisopen.sca.annotation.Destroy;
-import org.oasisopen.sca.annotation.EagerInit;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Requires;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.customer.Customer;
-import com.tuscanyscatours.customer.CustomerNotFoundException;
-import com.tuscanyscatours.customer.CustomerRegistry;
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
-import com.tuscanyscatours.payment.creditcard.CreditCardTypeType;
-import com.tuscanyscatours.payment.creditcard.ObjectFactory;
-import com.tuscanyscatours.payment.creditcard.PayerType;
-
-/**
- * An in-memory customer registry implementation
- */
-@Service(CustomerRegistry.class)
-@Scope("COMPOSITE")
-@EagerInit
-@Requires("{http://docs.oasis-open.org/ns/opencsa/sca/200912}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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java deleted file mode 100644 index d4aa8125e7..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.emailgateway;
-
-import org.oasisopen.sca.annotation.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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java deleted file mode 100644 index 1ae87d00cc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.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 com.tuscanyscatours.emailgateway.impl;
-
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.emailgateway.EmailGateway;
-
-@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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java deleted file mode 100644 index f384a9ac2a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java +++ /dev/null @@ -1,69 +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.payment.impl;
-
-import org.oasisopen.sca.annotation.Property;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.customer.Customer;
-import com.tuscanyscatours.customer.CustomerNotFoundException;
-import com.tuscanyscatours.customer.CustomerRegistry;
-import com.tuscanyscatours.emailgateway.EmailGateway;
-import com.tuscanyscatours.payment.Payment;
-import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception;
-import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
-
-/**
- * The payment implementation
- */
-@Service(Payment.class)
-public class PaymentImpl implements Payment {
-
- @Reference
- protected CustomerRegistry customerRegistry;
-
- @Reference
- protected CreditCardPayment creditCardPayment;
-
- @Reference
- protected EmailGateway emailGateway;
-
- @Property
- protected float transactionFee = 0.01f;
-
- public String makePaymentMember(String customerId, float amount) {
- try {
- Customer customer = customerRegistry.getCustomer(customerId);
- String status = creditCardPayment.authorize(customer.getCreditCard(), amount + transactionFee);
- emailGateway.sendEmail("order@tuscanyscatours.com",
- customer.getEmail(),
- "Status for your payment",
- customer + " >>> Status = " + status);
- return status;
- } catch (CustomerNotFoundException ex) {
- return "Payment failed due to " + ex.getMessage();
- } catch (AuthorizeFault_Exception e) {
- return e.getFaultInfo().getErrorCode();
- } catch (Throwable t) {
- return "Payment failed due to system error " + t.getMessage();
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index d17497d1f6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/CreditCardPayment.wsdl +++ /dev/null @@ -1,132 +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: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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 52b8928c7e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:scatours="http://tuscanyscatours.com/">
- <deployable composite="scatours:payment" />
- <export.java package="com.tuscanyscatours.payment" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl deleted file mode 100644 index 3885764899..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/definitions.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/definitions.xml deleted file mode 100644 index a5f3379087..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/definitions.xml +++ /dev/null @@ -1,34 +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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912">
-
- <!-- Policy Intents Defined by the SCA Runtime -->
- <intent name="authorization" constrains="sca:implementation"/>
- <intent name="managedTransaction" constrains="sca:implementation"/>
- <intent name="managedTransaction.global"/>
-
- <!-- 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-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/main/resources/payment.composite deleted file mode 100644 index b90c94b845..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://tuscanyscatours.com/"
- name="payment">
-
- <component name="Payment">
- <implementation.java class="com.tuscanyscatours.payment.impl.PaymentImpl" />
- <service name="Payment">
- <binding.ws uri="http://localhost:8081/Payment" />
- <binding.sca />
- </service>
- <reference name="customerRegistry" target="CustomerRegistry" />
- <reference name="creditCardPayment">
- <binding.ws uri="http://localhost:8082/CreditCardPayment" />
- </reference>
- <reference name="emailGateway" target="EmailGateway" />
- <property name="transactionFee">0.02</property>
- </component>
-
- <component name="CustomerRegistry">
- <implementation.java class="com.tuscanyscatours.customer.impl.CustomerRegistryImpl" />
- </component>
-
- <component name="EmailGateway">
- <implementation.java class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl" />
- </component>
-
-</composite>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index b5345d6be8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java +++ /dev/null @@ -1,75 +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.Node;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.tuscanyscatours.payment.Payment;
-
-public class PaymentTestCase {
- private static Node node;
-
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- node =
- NodeFactory.getInstance()
- .createNode(
- new Contribution("payment", "./target/classes"),
- new Contribution("creditcard",
- "../../contributions/creditcard-payment-jaxb/target/classes"));
- node.start();
- }
-
- @Test
- public void testPayment() {
- Node client = (Node)node;
- Payment payment = client.getService(Payment.class, "Payment");
-
- System.out.println("\n\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
- System.out.println("\n\nFailed Payment - Status = \n\n" + 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");
- }
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- if (node != null) {
- node.stop();
- node = null;
- }
- }
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/build.xml deleted file mode 100644 index db0e41b22f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-payment-spring-policy" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="EmailGateway.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/emailgateway/EmailGateway.class"/>
- <param name="package" value="com.tuscanyscatours.emailgateway"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/pom.xml deleted file mode 100644 index a7eafd0235..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/pom.xml +++ /dev/null @@ -1,189 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-spring-policy</artifactId> - <name>Apache Tuscany SCA Tours Payment Spring Policy Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <!-- - https://issues.apache.org/jira/browse/TUSCANY-3069 - --> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring-sca</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</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> - <snapshots> - <enabled>false</enabled> - </snapshots> - </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>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/Customer.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/Customer.java deleted file mode 100644 index 3b72f81b33..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java deleted file mode 100644 index b08f76e0fa..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.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 com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java deleted file mode 100644 index 706167d567..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer; - -import java.util.Collection; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java deleted file mode 100644 index 147526dfd3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java +++ /dev/null @@ -1,113 +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.customer.impl; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.customer.Customer; -import com.tuscanyscatours.customer.CustomerNotFoundException; -import com.tuscanyscatours.customer.CustomerRegistry; -import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType; -import com.tuscanyscatours.payment.creditcard.CreditCardTypeType; -import com.tuscanyscatours.payment.creditcard.ObjectFactory; -import com.tuscanyscatours.payment.creditcard.PayerType; - -/** - * An in-memory customer registry implementation - */ -@Service(CustomerRegistry.class) -@Scope("COMPOSITE") -@EagerInit -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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java deleted file mode 100644 index 5eb825cb85..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.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 com.tuscanyscatours.emailgateway.impl; - -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.emailgateway.EmailType; - -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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java deleted file mode 100644 index a35f761dc7..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.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 com.tuscanyscatours.payment.impl; - -import com.tuscanyscatours.customer.Customer; -import com.tuscanyscatours.customer.CustomerNotFoundException; -import com.tuscanyscatours.customer.CustomerRegistry; -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.emailgateway.EmailType; -import com.tuscanyscatours.payment.Payment; -import com.tuscanyscatours.payment.creditcard.CreditCardPayment; - -public class PaymentImpl implements Payment { - - private CreditCardPayment creditCardPayment; - private CustomerRegistry customerRegistry; - private EmailGateway emailGateway; - private float transactionFee; - - public void setCreditCardPayment(CreditCardPayment creditCardPayment) { - this.creditCardPayment = creditCardPayment; - } - - public void setCustomerRegistry(CustomerRegistry customerRegistry) { - this.customerRegistry = customerRegistry; - } - - public void setEmailGateway(EmailGateway emailGateway) { - this.emailGateway = emailGateway; - } - - public void setTransactionFee(Float transactionFee) { - this.transactionFee = transactionFee; - } - - public String makePaymentMember(String customerId, float amount) { - try { - Customer customer = customerRegistry.getCustomer(customerId); - - amount += transactionFee; - - String status = creditCardPayment.authorize(customer.getCreditCard(), amount); - - com.tuscanyscatours.emailgateway.ObjectFactory emailFactory = - new com.tuscanyscatours.emailgateway.ObjectFactory(); - EmailType email = emailFactory.createEmailType(); - email.setTitle("Payment Received"); - email.setTo(customerId); - - emailGateway.sendEmail(email); - - return status; - } catch (CustomerNotFoundException ex) { - return "Payment failed due to " + ex.getMessage(); - } catch (Throwable t) { - return "Payment failed due to system error " + t.getMessage(); - } - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 8224cd126f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/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: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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index 9e9a6ea685..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/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:8088/EmailGateway" /> - </wsdl:port> - </wsdl:service> - - <plnk:partnerLinkType name="EmailGatewayLinkType"> - <plnk:role name="forward" portType="tns:EmailGateway"/> - </plnk:partnerLinkType> -</wsdl:definitions> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 41677f6601..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:payment" /> - <export.java package="com.tuscanyscatours.payment"/> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/Payment-context.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/Payment-context.xml deleted file mode 100644 index bcb965924b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/Payment-context.xml +++ /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. ---> -<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="com.tuscanyscatours.payment.impl.PaymentImpl"> - <property name="creditCardPayment" ref="creditCardPaymentReference"/> - <property name="emailGateway" ref="emailGateway"/> - <property name="customerRegistry" ref="customerRegistry"/> - <property name="transactionFee" value="0.5f"/> - </bean> - -</beans> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/definitions.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/definitions.xml deleted file mode 100644 index 07092deba3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/definitions.xml +++ /dev/null @@ -1,35 +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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <!-- Policy Sets --> - <policySet name="BasicAuthenticationPolicySet" - provides="authentication" - appliesTo="sca:binding.ws"> - <tuscany:basicAuthentication> - <tuscany:userName>myname</tuscany:userName> - <tuscany:password>mypassword</tuscany:password> - </tuscany:basicAuthentication> - </policySet> - -</definitions> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/payment.composite deleted file mode 100644 index 5ee7ef73b0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/main/resources/payment.composite +++ /dev/null @@ -1,45 +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/200912" - targetNamespace="http://tuscanyscatours.com/" - name="payment"> - - <component name="Payment"> - <implementation.spring location="Payment-context.xml"/> - <service name="Payment"> - <binding.ws uri="http://localhost:8081/Payment"/> - </service> - <reference name="creditCardPaymentReference" > - <binding.ws uri="http://localhost:8082/CreditCardPayment" requires="authentication"/> - </reference> - <reference name="emailGateway" target="EmailGateway"/> - <reference name="customerRegistry" target="CustomerRegistry"/> - <property name="transactionFee">1.23</property> - </component> - - <component name="CustomerRegistry"> - <implementation.java class="com.tuscanyscatours.customer.impl.CustomerRegistryImpl" /> - </component> - - <component name="EmailGateway"> - <implementation.java class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl" /> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index 1c03ef1572..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.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.payment; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.tuscanyscatours.payment.Payment; - -/** - * - */ -public class PaymentTestCase { - private static Node paymentNode; - private static Node creditCardNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - creditCardNode = - NodeFactory.getInstance() - .createNode("creditcard.composite", - new Contribution("creditcard", "../creditcard-payment-jaxb-policy/target/classes")); - - creditCardNode.start(); - - paymentNode = - NodeFactory.getInstance() - .createNode( - new Contribution("payment-spring-policy", "./target/classes"), - new Contribution("payment-spring-policy-test", "./target/test-classes")); - - paymentNode.start(); - } - - @Test - public void testPayment() { - Node client = (Node)paymentNode; - Payment payment = client.getService(Payment.class, "PaymentClient"); - System.out.println("Result = " + payment.makePaymentMember("c-0", 100.00f)); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - paymentNode.stop(); - creditCardNode.stop(); - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java deleted file mode 100644 index 3fee35a1db..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/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.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 969a5286cc..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:scatours="http://tuscanyscatours.com/"> - <deployable composite="scatours:paymentClient" /> - <import.java package="com.tuscanyscatours.payment"/> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/resources/payment-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/resources/payment-client.composite deleted file mode 100644 index b442a46101..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/resources/payment-client.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="paymentClient"> - - <component name="PaymentClient"> - <implementation.java class="scatours.payment.client.impl.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8081/Payment" /> - </reference> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/build.xml deleted file mode 100644 index 6ad2ea55ad..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-payment-spring-scatag" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="EmailGateway.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/emailgateway/EmailGateway.class"/>
- <param name="package" value="com.tuscanyscatours.emailgateway"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/pom.xml deleted file mode 100644 index 74aea4b05b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/pom.xml +++ /dev/null @@ -1,189 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-spring-scatag</artifactId> - <name>Apache Tuscany SCA Tours Payment Spring SCA Tag Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <!-- - https://issues.apache.org/jira/browse/TUSCANY-3069 - --> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring-sca</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</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> - <snapshots> - <enabled>false</enabled> - </snapshots> - </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>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java deleted file mode 100644 index 5eb825cb85..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.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 com.tuscanyscatours.emailgateway.impl; - -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.emailgateway.EmailType; - -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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java deleted file mode 100644 index 42d995aa88..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.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 com.tuscanyscatours.payment.impl; - -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.emailgateway.EmailType; -import com.tuscanyscatours.payment.Payment; -import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType; -import com.tuscanyscatours.payment.creditcard.CreditCardPayment; -import com.tuscanyscatours.payment.creditcard.CreditCardTypeType; -import com.tuscanyscatours.payment.creditcard.ObjectFactory; -import com.tuscanyscatours.payment.creditcard.PayerType; - -//@Service(Payment.class) -public class PaymentImpl implements Payment { - - protected CreditCardPayment creditCardPayment; - protected EmailGateway emailGateway; - protected float transactionFee = 0; - - //@Reference - public void setCreditCardPayment(CreditCardPayment creditCardPayment) { - this.creditCardPayment = creditCardPayment; - } - - public void setEmailGateway(EmailGateway emailGateway) { - this.emailGateway = emailGateway; - } - - //@Property - public void setTransactionFee(Float transactionFee) { - this.transactionFee = transactionFee; - } - - 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 += transactionFee; - - String status = creditCardPayment.authorize(ccDetails, amount); - - com.tuscanyscatours.emailgateway.ObjectFactory emailFactory = - new com.tuscanyscatours.emailgateway.ObjectFactory(); - EmailType email = emailFactory.createEmailType(); - email.setTitle("Payment Received"); - email.setTo(customerId); - - emailGateway.sendEmail(email); - - return status; - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 8224cd126f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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: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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index 44867f794c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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:8088/EmailGateway" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="EmailGatewayLinkType">
- <plnk:role name="forward" portType="tns:EmailGateway"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 976e2fc0b6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:scatours="http://tuscanyscatours.com/">
- <deployable composite="scatours:payment" />
- <export.java package="com.tuscanyscatours.payment"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/Payment-context.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/Payment-context.xml deleted file mode 100644 index d2f757c8ca..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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://docs.oasis-open.org/ns/opencsa/sca/200912/spring-sca.xsd"> - - <sca:service name="Payment" - type="com.tuscanyscatours.payment.Payment" - target="Payment"/> - - <bean id="Payment" class="com.tuscanyscatours.payment.impl.PaymentImpl"> - <property name="creditCardPayment" ref="creditCardPayment"/> - <property name="emailGateway" ref="EmailGateway"/> - <property name="transactionFee" ref="transactionFee"/> - </bean> - - <bean id="EmailGateway" class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl"> - </bean> - - <sca:reference name="creditCardPayment" - type="com.tuscanyscatours.payment.creditcard.CreditCardPayment"/> - - <sca:property name="transactionFee" - type="java.lang.Float"/> -</beans> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/payment.composite deleted file mode 100644 index 7b923e397e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/main/resources/payment.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="payment"> - - <component name="Payment"> - <implementation.spring location="Payment-context.xml"/> - <service name="Payment"> - <binding.ws uri="http://localhost:8081/Payment"/> - </service> - <reference name="creditCardPayment"> - <binding.ws uri="http://localhost:8082/CreditCardPayment"/> - </reference> - <property name="transactionFee">1.23</property> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index f2a4ecbcb6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.tuscanyscatours.payment.Payment; - -/** - * - */ -public class PaymentTestCase { - private static Node paymentNode; - private static Node creditCardNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - creditCardNode = - NodeFactory.getInstance() - .createNode("creditcard.composite", - new Contribution("creditcard", "../creditcard-payment-jaxb/target/classes")); - - creditCardNode.start(); - - paymentNode = - NodeFactory.getInstance().createNode( - new Contribution("payment-spring-annotation", - "./target/classes"), - new Contribution("payment-spring-annotation-test", - "./target/test-classes")); - - paymentNode.start(); - } - - @Test - public void testPayment() { - Node client = (Node)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(); - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java deleted file mode 100644 index 3fee35a1db..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/client/impl/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.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d4b14f7c88..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:scatours="http://tuscanyscatours.com/">
- <deployable composite="scatours:paymentClient" />
- <import.java package="com.tuscanyscatours.payment"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/resources/payment-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/resources/payment-client.composite deleted file mode 100644 index b442a46101..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/resources/payment-client.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="paymentClient"> - - <component name="PaymentClient"> - <implementation.java class="scatours.payment.client.impl.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8081/Payment" /> - </reference> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/build.xml deleted file mode 100644 index 93c9dfc660..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-payment-spring" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="CreditCardPayment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/creditcard/CreditCardPayment.class"/>
- <param name="package" value="com.tuscanyscatours.payment.creditcard"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="EmailGateway.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/emailgateway/EmailGateway.class"/>
- <param name="package" value="com.tuscanyscatours.emailgateway"/>
- </antcall>
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/pom.xml deleted file mode 100644 index 9d4b80510e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/pom.xml +++ /dev/null @@ -1,189 +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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-payment-spring</artifactId> - <name>Apache Tuscany SCA Tours Payment Spring Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <!-- - https://issues.apache.org/jira/browse/TUSCANY-3069 - --> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-spring-sca</artifactId> - <version>${tuscany.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</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> - <snapshots> - <enabled>false</enabled> - </snapshots> - </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>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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>com.tuscanyscatours.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>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/Customer.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/Customer.java deleted file mode 100644 index 3b72f81b33..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.java deleted file mode 100644 index b08f76e0fa..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/CustomerNotFoundException.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 com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/CustomerRegistry.java deleted file mode 100644 index 706167d567..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.customer; - -import java.util.Collection; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java deleted file mode 100644 index d0b1736e98..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java +++ /dev/null @@ -1,115 +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.customer.impl; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Requires; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.customer.Customer; -import com.tuscanyscatours.customer.CustomerNotFoundException; -import com.tuscanyscatours.customer.CustomerRegistry; -import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType; -import com.tuscanyscatours.payment.creditcard.CreditCardTypeType; -import com.tuscanyscatours.payment.creditcard.ObjectFactory; -import com.tuscanyscatours.payment.creditcard.PayerType; - -/** - * An in-memory customer registry implementation - */ -@Service(CustomerRegistry.class) -@Scope("COMPOSITE") -@EagerInit -@Requires("{http://docs.oasis-open.org/ns/opencsa/sca/200912}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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java deleted file mode 100644 index 5eb825cb85..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.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 com.tuscanyscatours.emailgateway.impl; - -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.emailgateway.EmailType; - -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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java deleted file mode 100644 index a35f761dc7..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.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 com.tuscanyscatours.payment.impl; - -import com.tuscanyscatours.customer.Customer; -import com.tuscanyscatours.customer.CustomerNotFoundException; -import com.tuscanyscatours.customer.CustomerRegistry; -import com.tuscanyscatours.emailgateway.EmailGateway; -import com.tuscanyscatours.emailgateway.EmailType; -import com.tuscanyscatours.payment.Payment; -import com.tuscanyscatours.payment.creditcard.CreditCardPayment; - -public class PaymentImpl implements Payment { - - private CreditCardPayment creditCardPayment; - private CustomerRegistry customerRegistry; - private EmailGateway emailGateway; - private float transactionFee; - - public void setCreditCardPayment(CreditCardPayment creditCardPayment) { - this.creditCardPayment = creditCardPayment; - } - - public void setCustomerRegistry(CustomerRegistry customerRegistry) { - this.customerRegistry = customerRegistry; - } - - public void setEmailGateway(EmailGateway emailGateway) { - this.emailGateway = emailGateway; - } - - public void setTransactionFee(Float transactionFee) { - this.transactionFee = transactionFee; - } - - public String makePaymentMember(String customerId, float amount) { - try { - Customer customer = customerRegistry.getCustomer(customerId); - - amount += transactionFee; - - String status = creditCardPayment.authorize(customer.getCreditCard(), amount); - - com.tuscanyscatours.emailgateway.ObjectFactory emailFactory = - new com.tuscanyscatours.emailgateway.ObjectFactory(); - EmailType email = emailFactory.createEmailType(); - email.setTitle("Payment Received"); - email.setTo(customerId); - - emailGateway.sendEmail(email); - - return status; - } catch (CustomerNotFoundException ex) { - return "Payment failed due to " + ex.getMessage(); - } catch (Throwable t) { - return "Payment failed due to system error " + t.getMessage(); - } - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/CreditCardPayment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/CreditCardPayment.wsdl deleted file mode 100644 index 8224cd126f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/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: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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/EmailGateway.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/EmailGateway.wsdl deleted file mode 100644 index 44867f794c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/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:8088/EmailGateway" />
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="EmailGatewayLinkType">
- <plnk:role name="forward" portType="tns:EmailGateway"/>
- </plnk:partnerLinkType>
-</wsdl:definitions>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 976e2fc0b6..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:scatours="http://tuscanyscatours.com/">
- <deployable composite="scatours:payment" />
- <export.java package="com.tuscanyscatours.payment"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/Payment-context.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/Payment-context.xml deleted file mode 100644 index f27280bf2f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/Payment-context.xml +++ /dev/null @@ -1,39 +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="com.tuscanyscatours.payment.impl.PaymentImpl"> - <property name="creditCardPayment" ref="creditCardPaymentReference"/> - <property name="emailGateway" ref="EmailGateway"/> - <property name="customerRegistry" ref="CustomerRegistry"/> - <property name="transactionFee" value="0.5f"/> - </bean> - - <bean id="CustomerRegistry" class="com.tuscanyscatours.customer.impl.CustomerRegistryImpl"> - </bean> - - <bean id="EmailGateway" class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl"> - </bean> - -</beans> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/Payment.wsdl deleted file mode 100644 index e2c4062f2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/payment.composite deleted file mode 100644 index 48ef93ba2e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/main/resources/payment.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="payment"> - - <component name="Payment"> - <implementation.spring location="Payment-context.xml"/> - <service name="Payment"> - <binding.ws uri="http://localhost:8081/Payment"/> - </service> - <reference name="creditCardPaymentReference"> - <binding.ws uri="http://localhost:8082/CreditCardPayment"/> - </reference> - <property name="transactionFee">1.23</property> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java deleted file mode 100644 index 09420600fb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.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.payment; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.tuscanyscatours.payment.Payment; - -/** - * - */ -public class PaymentTestCase { - private static Node paymentNode; - private static Node creditCardNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - creditCardNode = - NodeFactory.getInstance() - .createNode("creditcard.composite", - new Contribution("creditcard", "../creditcard-payment-jaxb/target/classes")); - - creditCardNode.start(); - - paymentNode = - NodeFactory.getInstance().createNode( - new Contribution("payment-spring", "./target/classes"), - new Contribution("payment-spring-test", - "./target/test-classes")); - - paymentNode.start(); - } - - @Test - public void testPayment() { - Node client = (Node)paymentNode; - Payment payment = client.getService(Payment.class, "PaymentClient"); - System.out.println("Result = " + payment.makePaymentMember("c-0", 100.00f)); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - paymentNode.stop(); - creditCardNode.stop(); - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java deleted file mode 100644 index 3fee35a1db..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/client/impl/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.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d4b14f7c88..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:scatours="http://tuscanyscatours.com/">
- <deployable composite="scatours:paymentClient" />
- <import.java package="com.tuscanyscatours.payment"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/resources/payment-client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/resources/payment-client.composite deleted file mode 100644 index b442a46101..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/resources/payment-client.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscanyscatours.com/" - name="paymentClient"> - - <component name="PaymentClient"> - <implementation.java class="scatours.payment.client.impl.PaymentClientImpl" /> - <reference name="payment"> - <binding.ws uri="http://localhost:8081/Payment" /> - </reference> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/build.xml deleted file mode 100644 index a621364d9d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/build.xml +++ /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. ---> - -<project name="scatours-contribution-policy-client" default="compile"> - <import file="../../antdefs.xml"/> - - <target name="wsdljava"> - <antcall target="wsimport"> - <param name="wsdlfile" value="Payment.wsdl"/> - <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/> - <param name="package" value="com.tuscanyscatours.payment"/> - </antcall> - </target> -</project> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/maven-eclipse.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/maven-eclipse.xml deleted file mode 100644 index 3adfca89f4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/maven-eclipse.xml +++ /dev/null @@ -1,8 +0,0 @@ -<project default="copy-resources"> - <target name="init"/> - <target name="copy-resources" depends="init"> - <copy todir="target/classes/META-INF" filtering="true"> - <fileset dir="." includes="LICENSE|NOTICE" excludes="**/*.java"/> - </copy> - </target> -</project>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/pom.xml deleted file mode 100644 index 303122f92d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/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>scatours</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent><version>2.0-SNAPSHOT</version> - <artifactId>scatours-contribution-policy-client</artifactId> - <name>Apache Tuscany SCA Tours Policy Client Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>${tuscany.version}</version> - </dependency> - - <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.1</version> - <exclusions> - <exclusion> - <groupId>javax.xml.soap</groupId> - <artifactId>saaj-api</artifactId> - </exclusion> - </exclusions> - </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.12</version> - <executions> - <execution> - <id>payment</id> - <phase>generate-sources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java deleted file mode 100644 index 2f69f4d6a0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java +++ /dev/null @@ -1,38 +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 org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.payment.Payment; - -@Service(Runnable.class) -public class TestClient { - @Reference - protected Payment payment; - - public TestClient() { - } - - public void run() { - System.out.println("TestClient - Successful Payment - Status = " + payment.makePaymentMember("c-0", 100.00f)); - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 583bda3361..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:client="http://client.scatours/"> - <deployable composite="client:Client" /> - <import.java package="payment" /> -</contribution> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/Payment.wsdl deleted file mode 100644 index 2519d7642e..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/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-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/client.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/client.composite deleted file mode 100644 index 6971c8d423..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/policy-client/src/main/resources/client.composite +++ /dev/null @@ -1,28 +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/200912" - targetNamespace="http://client.scatours/" - name="Client"> - - <component name="TestClient"> - <implementation.java class="scatours.client.TestClient" /> - <reference name="payment" target="Payment/Payment" /> - </component> -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/pom.xml deleted file mode 100644 index a08a3f06e0..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/pom.xml +++ /dev/null @@ -1,99 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contributions</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tuscany SCA Tours Contributions</name>
-
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>blog-feed</module>
- <module>buildingblocks</module>
- <module>buildingblocks-client</module>
- <module>calendar</module>
- <module>car</module>
- <module>common</module>
- <module>creditcard-payment-jaxb</module>
- <module>creditcard-payment-jaxb-policy</module>
- <module>creditcard-payment-sdo</module>
- <module>creditcard-payment-webapp</module>
- <module>currency</module>
- <module>currency-corba</module>
- <module>currency-jms</module>
- <module>currency-jsp</module>
- <module>currency-rmi</module>
- <module>currency-servlet</module>
- <module>currency-ws</module>
- <module>databinding-client</module>
- <module>emailgateway</module>
- <module>feed-logger</module>
- <module>flight</module>
- <module>fullapp-ui</module>
- <module>fullapp-coordination</module>
- <module>fullapp-currency</module>
- <module>fullapp-packagedtrip</module>
- <module>fullapp-bespoketrip</module>
- <module>fullapp-shoppingcart</module>
- <module>help-pages</module>
- <module>hotel</module>
- <module>interaction-client</module>
- <module>interaction-service-remote</module>
- <module>introducing-client</module>
- <module>introducing-tours</module>
- <module>introducing-trips</module>
- <module>notification</module>
- <module>notification-ws</module>
- <module>notification-corba</module>
- <module>notification-ejb</module>
- <module>notification-jms</module>
- <module>notification-rmi</module>
- <module>shoppingcart</module>
- <module>travelcatalog</module>
- <module>tripbooking</module>
- <module>trip</module>
- <module>scatours</module>
- <module>payment-java</module>
- <module>payment-java-policy</module>
- <module>payment-spring</module>
- <module>payment-spring-policy</module>
- <module>payment-spring-scatag</module>
- <module>payment-bpel-process</module>
- <module>payment-bpel</module>
- <module>payment-groovy</module>
- <module>policy-client</module>
- </modules>
- </profile>
-
- </profiles>
-
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/build.xml deleted file mode 100644 index bdb8f8ecc4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-scatours" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- <pathelement path="../shoppingcart/target/scatours-contribution-shoppingcart.jar"/>
- <pathelement path="../travelcatalog/target/scatours-contribution-travelcatalog.jar"/>
- <pathelement path="../tripbooking/target/scatours-contribution-tripbooking.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/pom.xml deleted file mode 100644 index 85388dde97..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/pom.xml +++ /dev/null @@ -1,80 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-scatours</artifactId>
- <name>Apache Tuscany SCA Tours SCATours Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-travelcatalog</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-tripbooking</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-shoppingcart</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursBooking.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursBooking.java deleted file mode 100644 index c3514d6910..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursBooking.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 com.tuscanyscatours;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-import com.tuscanyscatours.common.TripItem;
-
-/**
- * The SCA Tours trip booking service interface
- */
-@Remotable
-public interface SCAToursBooking {
- String bookTrip(String cartId, TripItem tripId);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursCart.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursCart.java deleted file mode 100644 index 720c739aeb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursCart.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.oasisopen.sca.annotation.Remotable;
-
-import com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursSearch.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/SCAToursSearch.java deleted file mode 100644 index 9551ab7e2c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-
-/**
- * The Search service interface
- */
-@Remotable
-public interface SCAToursSearch {
- TripItem[] search(TripLeg tripLeg);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/impl/SCAToursImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/impl/SCAToursImpl.java deleted file mode 100644 index 9e664a874b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/java/com/tuscanyscatours/impl/SCAToursImpl.java +++ /dev/null @@ -1,84 +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.impl;
-
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.SCAToursBooking;
-import com.tuscanyscatours.SCAToursCart;
-import com.tuscanyscatours.SCAToursSearch;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-import com.tuscanyscatours.shoppingcart.CartCheckout;
-import com.tuscanyscatours.shoppingcart.CartInitialize;
-import com.tuscanyscatours.travelcatalog.TravelCatalogSearch;
-import com.tuscanyscatours.tripbooking.TripBooking;
-
-/**
- * An implementation of the SCA tours component. it's just a pass through and allows
- * the outward facing bindings to be changed without changing the individual contributions
- */
-@Scope("COMPOSITE")
-@Service({SCAToursSearch.class, SCAToursBooking.class, SCAToursCart.class})
-public class SCAToursImpl implements SCAToursSearch, SCAToursBooking, SCAToursCart {
-
- @Reference
- protected TravelCatalogSearch travelCatalogSearch;
-
- @Reference
- protected TripBooking tripBooking;
-
- @Reference
- protected CartInitialize cartInitialize;
-
- @Reference
- protected CartCheckout cartCheckout;
-
- // 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);
- return bookedTrip.getBookingCode();
- }
-
- // SCAToursCart methods
-
- public String newCart() {
- String cartId = cartInitialize.newCart();
- return cartId;
- }
-
- public TripItem[] getTrips(String cartId) {
- return cartInitialize.getTrips(cartId);
- }
-
- public void checkout(String cartId) {
- // need to get the user id from the context here but
- // just make one up for the time being
- cartCheckout.checkout(cartId, "c-0");
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e16cf2c94f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/scatours/src/main/resources/META-INF/sca-contribution.xml +++ /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.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common" />
- <import.java package="com.tuscanyscatours.travelcatalog" />
- <import.java package="com.tuscanyscatours.tripbooking" />
- <import.java package="com.tuscanyscatours.shoppingcart" />
- <export.java package="com.tuscanyscatours" />
- <export.java package="com.tuscanyscatours.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/build.xml deleted file mode 100644 index 1976d2b5ed..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-shoppingcart" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- </path>
-
- <target name="wsdljava">
- <antcall target="wsimport">
- <param name="wsdlfile" value="Payment.wsdl"/>
- <param name="javaclass" value="com/tuscanyscatours/payment/Payment.class"/>
- <param name="package" value="com.tuscanyscatours.payment"/>
- </antcall>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/pom.xml deleted file mode 100644 index 4f91b07022..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-shoppingcart</artifactId>
- <name>Apache Tuscany SCA Tours Shopping Cart Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.xml.ws</groupId>
- <artifactId>jaxws-api</artifactId>
- <version>2.1</version>
- <exclusions>
- <exclusion>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</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>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </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>payment</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>wsimport</goal>
- </goals>
- <configuration>
- <packageName>com.tuscanyscatours.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-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.java deleted file mode 100644 index ff453d6a78..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.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.shoppingcart; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CartCheckout { - void checkout(String cartId, String name); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.java deleted file mode 100644 index 0966c6b2b3..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.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 com.tuscanyscatours.shoppingcart; - -import org.oasisopen.sca.annotation.Remotable; - -import com.tuscanyscatours.common.TripItem; - -@Remotable -public interface CartInitialize { - String newCart(); - - TripItem[] getTrips(String cartId); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.java deleted file mode 100644 index 836f06ed7f..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.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 com.tuscanyscatours.shoppingcart; - -import org.oasisopen.sca.annotation.Remotable; - -import com.tuscanyscatours.common.TripItem; - -/** - * The CartStore service interface - */ -@Remotable -public interface CartStore { - void addTrip(TripItem trip); - - void removeTrip(TripItem trip); - - TripItem[] getTrips(); - - void reset(); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.java deleted file mode 100644 index a9729fb98b..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.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 com.tuscanyscatours.shoppingcart; - -import org.oasisopen.sca.annotation.Remotable; - -import com.tuscanyscatours.common.TripItem; - -@Remotable -public interface CartUpdates { - void addTrip(String cartId, TripItem trip); - - void removeTrip(String cartId, TripItem trip); -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java deleted file mode 100644 index ff83a7586a..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java +++ /dev/null @@ -1,68 +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.shoppingcart.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -import com.tuscanyscatours.common.TripItem; -import com.tuscanyscatours.shoppingcart.CartStore; - -/** - * An implementation of the CartStore service - */ -@Scope("CONVERSATION") -@Service({CartStore.class}) -public class CartStoreImpl implements CartStore { - - protected String cartId; - - private List<TripItem> trips = new ArrayList<TripItem>(); - - @Init - public void initCart() { - System.out.println("CartStore init for id: " + cartId); - } - - @Destroy - public void destroyCart() { - System.out.println("CartStore 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 reset() { - trips.clear(); - } -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java deleted file mode 100644 index daaf187dbb..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java +++ /dev/null @@ -1,104 +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.shoppingcart.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.payment.Payment;
-import com.tuscanyscatours.shoppingcart.CartCheckout;
-import com.tuscanyscatours.shoppingcart.CartInitialize;
-import com.tuscanyscatours.shoppingcart.CartStore;
-import com.tuscanyscatours.shoppingcart.CartUpdates;
-
-/**
- * An implementation of the ShoppingCart service
- */
-@Service({CartInitialize.class, CartUpdates.class, CartCheckout.class})
-public class ShoppingCartImpl implements CartInitialize, CartUpdates, CartCheckout {
-
- @Reference
- protected Payment payment;
-
- @Reference
- protected CartStore cartStore;
-
- @Context
- protected ComponentContext componentContext;
-
- private static Map<String, CartStore> cartStores = new HashMap<String, CartStore>();
-
- public String newCart() {
- String cartId = UUID.randomUUID().toString();
- ServiceReference<CartStore> cartStore = componentContext.getServiceReference(CartStore.class, "cartStore");
- // cartStore.setConversationID(cartId);
- cartStores.put(cartId, cartStore.getService());
-
- return cartId;
- }
-
- public void addTrip(String cartId, TripItem trip) {
- cartStores.get(cartId).addTrip(trip);
- }
-
- public void removeTrip(String cartId, TripItem trip) {
- cartStores.get(cartId).addTrip(trip);
- }
-
- public TripItem[] getTrips(String cartId) {
- return cartStores.get(cartId).getTrips();
- }
-
- public void checkout(String cartId, 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;
-
- TripItem[] trips = getTrips(cartId);
-
- 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);
-
- // reset the cart store
- cartStores.get(cartId).reset();
- cartStores.remove(cartId);
- }
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 55165fd9c4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common" />
- <export.java package="com.tuscanyscatours.payment" />
- <export.java package="com.tuscanyscatours.shoppingcart" />
- <export.java package="com.tuscanyscatours.shoppingcart.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/Payment.wsdl b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/Payment.wsdl deleted file mode 100644 index 3885764899..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/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-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/build.xml deleted file mode 100644 index 45373a4910..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-travelcatalog" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- <pathelement path="../currency/target/scatours-contribution-currency.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/pom.xml deleted file mode 100644 index c1591336c8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/pom.xml +++ /dev/null @@ -1,68 +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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-travelcatalog</artifactId>
- <name>Apache Tuscany SCA Tours Travel Catalog Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-currency</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/java/com/tuscanyscatours/travelcatalog/TravelCatalogSearch.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/java/com/tuscanyscatours/travelcatalog/TravelCatalogSearch.java deleted file mode 100644 index 53997a23c2..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.travelcatalog;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-
-/**
- * The TravelCatalogSearch service interface
- */
-@Remotable
-public interface TravelCatalogSearch {
- TripItem[] search(TripLeg tripLeg);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/java/com/tuscanyscatours/travelcatalog/impl/TravelCatalogImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/java/com/tuscanyscatours/travelcatalog/impl/TravelCatalogImpl.java deleted file mode 100644 index c77b7a03c4..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/java/com/tuscanyscatours/travelcatalog/impl/TravelCatalogImpl.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 com.tuscanyscatours.travelcatalog.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import java.util.concurrent.CountDownLatch;
-
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.RequestContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Property;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.Search;
-import com.tuscanyscatours.common.SearchCallback;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-import com.tuscanyscatours.currencyconverter.CurrencyConverter;
-import com.tuscanyscatours.travelcatalog.TravelCatalogSearch;
-
-/**
- * An implementation of the travel catalog service
- */
-@Scope("COMPOSITE")
-@Service({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 List<TripItem> searchResults = new ArrayList<TripItem>();
-
- CountDownLatch resultsReceivedCountdown;
-
- // TravelSearch methods
-
- public TripItem[] search(TripLeg tripLeg) {
-
- resultsReceivedCountdown = new CountDownLatch(4);
- searchResults.clear();
-
- 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);
-
- System.out.println("going into wait");
-
- try {
- resultsReceivedCountdown.await();
- } catch (InterruptedException ex) {
- }
-
- 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 synchronized void searchResults(TripItem[] items) {
- RequestContext requestContext = componentContext.getRequestContext();
- // Object callbackID = requestContext.getServiceReference().getCallbackID();
- // System.out.println("Asynch response - " + callbackID);
-
- if (items != null) {
- for (int i = 0; i < items.length; i++) {
- searchResults.add(items[i]);
- }
- }
-
- resultsReceivedCountdown.countDown();
- }
-
- public void setPercentComplete(String searchComponent, int percentComplete) {
- // Not used at the moment
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7b104eab59..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/travelcatalog/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common" />
- <import.java package="com.tuscanyscatours.currencyconverter" />
- <export.java package="com.tuscanyscatours.travelcatalog" />
- <export.java package="com.tuscanyscatours.travelcatalog.impl" />
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/build.xml deleted file mode 100644 index 6e48af3cf8..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-trip" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- </path>
- <path id="test-path" refid="compile-path"/>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/pom.xml deleted file mode 100644 index 91e6dd8856..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/pom.xml +++ /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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-trip</artifactId>
- <name>Apache Tuscany SCA Tours Prepackaged Trip Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-policy-logging</artifactId>
- <version>${tuscany.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/java/com/tuscanyscatours/trip/impl/TripImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/java/com/tuscanyscatours/trip/impl/TripImpl.java deleted file mode 100644 index a0aec4b777..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/java/com/tuscanyscatours/trip/impl/TripImpl.java +++ /dev/null @@ -1,94 +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.trip.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.Book;
-import com.tuscanyscatours.common.Search;
-import com.tuscanyscatours.common.SearchCallback;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.common.TripLeg;
-
-/**
- * An implementation of the Trip service
- */
-@Scope("STATELESS")
-@Service({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) {
- System.out.println("Starting trip search");
-
- try {
- Thread.sleep(2000);
- } catch (Exception ex) {
- // do nothing
- }
-
- // return available hotels
- searchCallback.searchResults(searchSynch(tripLeg));
- }
-
- public int getPercentComplete() {
- return 100;
- }
-
- public String book(TripItem tripItem) {
- return "trip1";
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/java/com/tuscanyscatours/trip/impl/TripInfo.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/java/com/tuscanyscatours/trip/impl/TripInfo.java deleted file mode 100644 index d8809e1325..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/java/com/tuscanyscatours/trip/impl/TripInfo.java +++ /dev/null @@ -1,140 +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.trip.impl;
-
-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;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 278d66acd1..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common"/>
- <export.java package="com.tuscanyscatours.trip.impl"/>
-</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/java/scatours/trip/TripTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/java/scatours/trip/TripTestCase.java deleted file mode 100644 index 29e2058023..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/java/scatours/trip/TripTestCase.java +++ /dev/null @@ -1,68 +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 org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.tuscanyscatours.common.Book; -import com.tuscanyscatours.common.TripItem; - -/** - * - */ -public class TripTestCase { - private static Node tripNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - try { - tripNode = - NodeFactory.getInstance().createNode("trip.composite", - new Contribution("trip", "./target/classes"), - new Contribution("trip-test", "./target/test-classes")); - - tripNode.start(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @Test - public void testPayment() { - Node client = (Node)tripNode; - Book booking = client.getService(Book.class, "Trip/Book"); - TripItem tripItem = - new TripItem("1234", "5678", TripItem.TRIP, "FS1DEC06", "Florence and Siena pre-packaged tour", "FLR", - "06/12/09", "13/12/09", 450, "EUR", "http://localhost:8085/tbd"); - System.out.println("Result = " + booking.book(tripItem) + "\n"); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - tripNode.stop(); - } - -} diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/resources/definitions.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/resources/definitions.xml deleted file mode 100644 index 1d5579495c..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/resources/definitions.xml +++ /dev/null @@ -1,32 +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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <!-- PolicySets --> - <policySet name="JDKLoggingPolicy" provides="tuscany:logging" appliesTo="sca:implementation.java" - xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"> - <tuscany:jdkLogger name="myLogger"> - <logLevel>FINER</logLevel> - </tuscany:jdkLogger> - </policySet> -</definitions> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/resources/trip.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/resources/trip.composite deleted file mode 100644 index a0dd505036..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/trip/src/test/resources/trip.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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://scatours" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - name="packagedtrip"> - - <component name="Trip"> - <implementation.java class="com.tuscanyscatours.trip.impl.TripImpl" requires="tuscany:logging"/> - <service name="Search"/> - <service name="Book"/> - </component> - -</composite> diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/build.xml deleted file mode 100644 index e8e7eb7f10..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/build.xml +++ /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.
--->
-
-<project name="scatours-contribution-tripbooking" default="compile">
- <import file="../../antdefs.xml"/>
- <path id="compile-path">
- <pathelement path="../common/target/scatours-contribution-common.jar"/>
- <pathelement path="../shoppingcart/target/scatours-contribution-shoppingcart.jar"/>
- </path>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/pom.xml deleted file mode 100644 index f45f92c464..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/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>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-contribution-tripbooking</artifactId>
- <name>Apache Tuscany SCA Tours Trip Booking Contribution</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>${tuscany.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-currency</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours-contribution-shoppingcart</artifactId>
- <version>${pom.version}</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-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/java/com/tuscanyscatours/tripbooking/TripBooking.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/java/com/tuscanyscatours/tripbooking/TripBooking.java deleted file mode 100644 index c5eaa95f19..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/java/com/tuscanyscatours/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 com.tuscanyscatours.tripbooking;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-import com.tuscanyscatours.common.TripItem;
-
-/**
- * The TripBooking service interface
- */
-@Remotable
-public interface TripBooking {
-
- TripItem bookTrip(String cartId, TripItem trip);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/java/com/tuscanyscatours/tripbooking/impl/TripBookingImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/java/com/tuscanyscatours/tripbooking/impl/TripBookingImpl.java deleted file mode 100644 index e5846bae5d..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/java/com/tuscanyscatours/tripbooking/impl/TripBookingImpl.java +++ /dev/null @@ -1,91 +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.tripbooking.impl;
-
-import org.oasisopen.sca.ComponentContext;
-import org.oasisopen.sca.ServiceReference;
-import org.oasisopen.sca.annotation.Context;
-import org.oasisopen.sca.annotation.Reference;
-import org.oasisopen.sca.annotation.Service;
-
-import com.tuscanyscatours.common.Book;
-import com.tuscanyscatours.common.TripItem;
-import com.tuscanyscatours.shoppingcart.CartUpdates;
-import com.tuscanyscatours.tripbooking.TripBooking;
-
-/**
- * An implementation of the TripBooking service
- */
-@Service({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 CartUpdates cartUpdates;
-
- @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<CartUpdates> cart = componentContext.getServiceReference(CartUpdates.class, "cartUpdates");
- // cart.setConversationID(cartId);
- cart.getService().addTrip(cartId, trip);
-
- return trip;
- }
-
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f2f5877e12..0000000000 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/tripbooking/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://docs.oasis-open.org/ns/opencsa/sca/200912">
- <import.java package="com.tuscanyscatours.common" />
- <import.java package="com.tuscanyscatours.currencyconverter" />
- <import.java package="com.tuscanyscatours.shoppingcart" />
- <export.java package="com.tuscanyscatours.tripbooking" />
- <export.java package="com.tuscanyscatours.tripbooking.impl" />
-</contribution>
|