diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-16 08:11:34 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-16 08:11:34 +0000 |
commit | 9423c25923e23388b4841ed3f93949747c61bcc4 (patch) | |
tree | f0e5fc910a53caf7a04dd34a6e652c7577124a53 | |
parent | 82211fed7854e79a523d7abdb4fa9187b6bb7a23 (diff) |
TUSCANY-3729: Delete unreleased modules/tools/samples from the 1.6.1 branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1023208 13f79535-47bb-0310-9956-ffa450edef68
282 files changed, 7 insertions, 21624 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/distribution/src/main/assembly/bin.xml b/sca-java-1.x/branches/sca-java-1.6.1/distribution/src/main/assembly/bin.xml index a81eb26131..3043ca7e90 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/distribution/src/main/assembly/bin.xml +++ b/sca-java-1.x/branches/sca-java-1.6.1/distribution/src/main/assembly/bin.xml @@ -102,92 +102,30 @@ <exclude>*/target/wsdl2java-source/**/*</exclude> <exclude>*/**/*.svg</exclude> <!-- Sample specific work file/folders to exclude --> - <exclude>pom.xml</exclude> - <exclude>pom-distribution.xml</exclude> <exclude>calculator-webapp/target/sample-calculator-webapp</exclude> <exclude>calculator-webapp/target/sample-calculator-webapp/**/*</exclude> <exclude>calculator-ws-webapp/target/sample-calculator-ws-webapp</exclude> <exclude>calculator-ws-webapp/target/sample-calculator-ws-webapp/**/*</exclude> - <exclude>calculator-ws-secure-webapp/target/sample-calculator-ws-secure-webapp</exclude> - <exclude>calculator-ws-secure-webapp/target/sample-calculator-ws-secure-webapp/**/*</exclude> <exclude>chat-webapp/target/sample-chat-webapp</exclude> <exclude>chat-webapp/target/sample-chat-webapp/**/*</exclude> - <exclude>domain-webapp/target/sample-domain-webapp</exclude> - <exclude>domain-webapp/target/sample-domain-webapp/**/*</exclude> <exclude>feed-aggregator-webapp/target/sample-feed-aggregator-webapp</exclude> <exclude>feed-aggregator-webapp/target/sample-feed-aggregator-webapp/**/*</exclude> <exclude>helloworld-dojo-webapp/target/sample-helloworld-dojo-webapp</exclude> <exclude>helloworld-dojo-webapp/target/sample-helloworld-dojo-webapp/**/*</exclude> - <exclude>helloworld-jms-webapp/target/sample-helloworld-jms-webapp</exclude> - <exclude>helloworld-jms-webapp/target/sample-helloworld-jms-webapp/**/*</exclude> <exclude>helloworld-jsonrpc-webapp/target/sample-helloworld-jsonrpc-webapp</exclude> <exclude>helloworld-jsonrpc-webapp/target/sample-helloworld-jsonrpc-webapp/**/*</exclude> - <exclude>helloworld-ws-deep-webapp/target/sample-helloworld-ws-deep-webapp</exclude> - <exclude>helloworld-ws-deep-webapp/target/sample-helloworld-ws-deep-webapp/**/*</exclude> - <exclude>helloworld-ws-service-webapp/target/sample-helloworld-ws-service-webapp</exclude> - <exclude>helloworld-ws-service-webapp/target/sample-helloworld-ws-service-webapp/**/*</exclude> <exclude>helloworld-ws-sdo-webapp/target/sample-helloworld-ws-sdo-webapp</exclude> <exclude>helloworld-ws-sdo-webapp/target/sample-helloworld-ws-sdo-webapp/**/*</exclude> <exclude>store-webapp/target/sample-store-webapp</exclude> <exclude>store-webapp/target/sample-store-webapp/**/*</exclude> - <exclude>zipcode-jaxws/target/endorsed</exclude> - <exclude>zipcode-jaxws/target/endorsed/**/*</exclude> <!-- Sample war files to exclude --> - <exclude>calculator-ws-secure-webapp/target/sample-calculator-ws-secure-webapp.war</exclude> <exclude>calculator-ws-webapp/target/sample-calculator-ws-webapp.war</exclude> <exclude>chat-webapp/target/sample-chat-webapp.war</exclude> - <exclude>domain-webapp/target/sample-domain-webapp.war</exclude> <exclude>feed-aggregator-webapp/target/sample-feed-aggregator-webapp.war</exclude> <exclude>helloworld-dojo-webapp/target/sample-helloworld-dojo-webapp.war</exclude> - <exclude>helloworld-jms-webapp/target/sample-helloworld-jms-webapp.war</exclude> <exclude>helloworld-jsonrpc-webapp/target/sample-helloworld-jsonrpc-webapp.war</exclude> - <exclude>helloworld-ws-deep-webapp/target/sample-helloworld-ws-deep-webapp.war</exclude> <exclude>helloworld-ws-sdo-webapp/target/sample-helloworld-ws-sdo-webapp.war</exclude> - <exclude>helloworld-ws-service-webapp/target/sample-helloworld-ws-service-webapp.war</exclude> <exclude>store-webapp/target/sample-helloworld-store-webapp.war</exclude> - <!-- Modules excluded from distribution as work is in progress... --> - <exclude>calculator2</exclude> - <exclude>calculator2/**/*</exclude> - <exclude>calculator-lean</exclude> - <exclude>calculator-lean/**/*</exclude> - <exclude>calculator-osgi</exclude> - <exclude>calculator-osgi/**/*</exclude> - <exclude>calculator-rcp</exclude> - <exclude>calculator-rcp/**/*</exclude> - <exclude>chat2-webapp</exclude> - <exclude>chat2-webapp/**/*</exclude> - <exclude>customer-dojo</exclude> - <exclude>customer-dojo/**/*</exclude> - <exclude>customer-dojo-webapp</exclude> - <exclude>customer-dojo-webapp/**/*</exclude> - <exclude>helloworld-distributed</exclude> - <exclude>helloworld-distributed/**/*</exclude> - <exclude>helloworld-jsp</exclude> - <exclude>helloworld-jsp/**/*</exclude> - <exclude>helloworld-servlet</exclude> - <exclude>helloworld-servlet/**/*</exclude> - <exclude>helloworld-web</exclude> - <exclude>helloworld-web/**/*</exclude> - <exclude>helloworld-web-callback</exclude> - <exclude>helloworld-web-callback/**/*</exclude> - <exclude>loanapplication</exclude> - <exclude>loanapplication/**/*</exclude> - <exclude>helloworld-ws-reference-lean</exclude> - <exclude>helloworld-ws-reference-lean/**/*</exclude> - <exclude>spi-implementation-pojo</exclude> - <exclude>spi-implementation-pojo/**/*</exclude> - <exclude>helloworld-jms-webapp</exclude> - <exclude>helloworld-jms-webapp/**/*</exclude> - <exclude>domain-webapp</exclude> - <exclude>domain-webapp/**/*</exclude> - <exclude>calculator-ws-secure-webapp</exclude> - <exclude>calculator-ws-secure-webapp/**/*</exclude> - <exclude>helloworld-ws-deep-webapp</exclude> - <exclude>helloworld-ws-deep-webapp/**/*</exclude> - <exclude>helloworld-ws-service-webapp</exclude> - <exclude>helloworld-ws-service-webapp/**/*</exclude> - <exclude>zipcode-jaxws/</exclude> - <exclude>zipcode-jaxws/**/*</exclude> </excludes> </fileSet> <!-- Add all the demos to the demos directory --> @@ -274,14 +212,6 @@ <include>tuscany-sca-manifest.jar</include> </includes> </fileSet> - <!-- Add the node launcher webapp to the modules directory --> - <fileSet> - <directory>../modules/node2-launcher-webapp/target</directory> - <outputDirectory>tuscany-sca-${tuscany.version}/modules</outputDirectory> - <includes> - <include>*.war</include> - </includes> - </fileSet> <!-- temporary fix since maven dependencies of rampart seems to refere to SNAPSHOT versions of the parent pom --> <!--fileSet> @@ -293,15 +223,6 @@ </fileSet--> </fileSets> - <files> - <!-- Add the subsetted distribution pom.xml to the samples directory --> - <file> - <source>../samples/pom-distribution.xml</source> - <outputDirectory>tuscany-sca-${tuscany.version}/samples</outputDirectory> - <destName>pom.xml</destName> - </file> - </files> - <dependencySets> <!-- Add all the Tuscany modules to the modules directory --> <dependencySet> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/LICENSE deleted file mode 100644 index e98e07d698..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/LICENSE +++ /dev/null @@ -1,253 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-===============================================================================
-HessianServiceListenerServlet.java
-
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Caucho Technology (http://www.caucho.com/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- * endorse or promote products derived from this software without prior
- * written permission. For written permission, please contact
- * info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- * nor may "Resin" appear in their names without prior written
- * permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/NOTICE deleted file mode 100644 index 82e4513d39..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/NOTICE +++ /dev/null @@ -1,8 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -This product includes software developed by the - Caucho Technology (http://www.caucho.com/).
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/pom.xml deleted file mode 100644 index 1181709f06..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing pehessianssions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tuscany-binding-hessian</artifactId>
- <name>Apache Tuscany SCA Hessian Binding Extension</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- <version>3.1.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-http</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-Version>${tuscany.version}</Bundle-Version>
- <Bundle-SymbolicName>org.apache.tuscany.sca.binding.hessian</Bundle-SymbolicName>
- <Bundle-Description>${pom.name}</Bundle-Description>
- <Export-Package>org.apache.tuscany.sca.binding.hessian*</Export-Package>
- <DynamicImport-Package>*</DynamicImport-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBinding.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBinding.java deleted file mode 100644 index 7f90d78424..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBinding.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 org.apache.tuscany.sca.binding.hessian.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.Binding;
-
-public class HessianBinding implements Binding {
-
- // properties required to implement the Tuscany
- // binding extension SPI
- private String uri = null;
- private String name = null;
- private boolean unresolved = false;
- private List<Object> extensions = new ArrayList<Object>();
-
- public HessianBinding() {
- super();
- }
-
- /**
- * Returns the binding URI.
- *
- * @return the binding URI
- */
- public String getURI() {
- return this.uri;
- }
-
- /**
- * Sets the binding URI.
- *
- * @param uri the binding URI
- */
- public void setURI(String uri) {
- this.uri = uri;
- }
-
- /**
- * Returns the binding name.
- *
- * @return the binding name
- */
- public String getName() {
- return this.name;
- }
-
- /**
- * Sets the binding name.
- *
- * @param name the binding name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- public boolean isUnresolved() {
- return this.unresolved;
- }
-
- public void setUnresolved(boolean unresolved) {
- this.unresolved = unresolved;
- }
-
- public List<Object> getExtensions() {
- return extensions;
- }
-
- /**
- * Clone the binding
- */
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBindingException.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBindingException.java deleted file mode 100644 index 456f0d11ba..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBindingException.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 org.apache.tuscany.sca.binding.hessian.impl;
-
-public class HessianBindingException extends RuntimeException {
- private static final long serialVersionUID = 1L;
-
- public HessianBindingException() {
- super();
- }
-
- public HessianBindingException(String arg0, Throwable arg1) {
- super(arg0, arg1);
- }
-
- public HessianBindingException(String arg0) {
- super(arg0);
- }
-
- public HessianBindingException(Throwable arg0) {
- super(arg0);
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBindingProcessor.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBindingProcessor.java deleted file mode 100644 index f5564b926b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/impl/HessianBindingProcessor.java +++ /dev/null @@ -1,135 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.hessian.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
-import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.Problem.Severity;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-
-public class HessianBindingProcessor implements StAXArtifactProcessor<HessianBinding> {
-
- private QName BINDING_HESSIAN = new QName("http://hessian", "binding.hessian");
-
- private PolicyFactory policyFactory;
- private PolicyAttachPointProcessor policyProcessor;
- private Monitor monitor;
-
- public HessianBindingProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
- this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
- this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
- this.monitor = monitor;
- }
-
- /**
- * Report a error.
- *
- * @param problems
- * @param message
- * @param model
- */
- private void warning(String message, Object model, Object... messageParameters) {
- if (monitor != null) {
- Problem problem =
- new ProblemImpl(this.getClass().getName(), "binding-hessian-validation-messages", Severity.WARNING,
- model, message, (Object[])messageParameters);
- monitor.problem(problem);
- }
- }
-
- /**
- * Report a error.
- *
- * @param problems
- * @param message
- * @param model
- */
- private void error(String message, Object model, Object... messageParameters) {
- if (monitor != null) {
- Problem problem =
- new ProblemImpl(this.getClass().getName(), "binding-hessian-validation-messages", Severity.ERROR,
- model, message, (Object[])messageParameters);
- monitor.problem(problem);
- }
- }
-
- public QName getArtifactType() {
- return BINDING_HESSIAN;
- }
-
- public Class<HessianBinding> getModelType() {
- return HessianBinding.class;
- }
-
- public HessianBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- HessianBinding hessianBinding = new HessianBinding();
-
- // Read policies
- policyProcessor.readPolicies(hessianBinding, reader);
-
- // Read binding name
- String name = reader.getAttributeValue(null, "name");
- if (name != null) {
- hessianBinding.setName(name);
- }
-
- // Read binding URI
- String uri = reader.getAttributeValue(null, "uri");
- if (uri != null) {
- hessianBinding.setURI(uri);
- }
-
- return hessianBinding;
- }
-
- public void resolve(HessianBinding model, ModelResolver resolver) throws ContributionResolveException {
- }
-
- public void write(HessianBinding hessianBinding, XMLStreamWriter writer) throws ContributionWriteException,
- XMLStreamException {
- policyProcessor.writePolicyPrefixes(hessianBinding, writer);
- writer.writeStartElement(BINDING_HESSIAN.getNamespaceURI(), BINDING_HESSIAN.getLocalPart());
- policyProcessor.writePolicyAttributes(hessianBinding, writer);
-
- if (hessianBinding.getName() != null) {
- writer.writeAttribute("name", hessianBinding.getName());
- }
-
- if (hessianBinding.getURI() != null) {
- writer.writeAttribute("uri", hessianBinding.getURI());
- }
-
- writer.writeEndElement();
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianBindingInvoker.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianBindingInvoker.java deleted file mode 100644 index 9d6ede2dbc..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianBindingInvoker.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 org.apache.tuscany.sca.binding.hessian.provider;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.apache.tuscany.sca.binding.hessian.impl.HessianBinding;
-import org.apache.tuscany.sca.interfacedef.Interface;
-import org.apache.tuscany.sca.interfacedef.java.JavaOperation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-
-import com.caucho.hessian.client.HessianProxyFactory;
-
-public class HessianBindingInvoker implements Invoker {
-
- private String serviceURL;
- private Interface homeImpl;
-
- HessianBindingInvoker(Interface homeImpl, HessianBinding binding) {
- this.serviceURL = binding.getURI();
- this.homeImpl = homeImpl;
- }
-
- public Message invoke(Message msg) {
- try {
- Method method = ((JavaOperation)msg.getOperation()).getJavaMethod();
- Object[] args = msg.getBody();
-
- HessianProxyFactory proxyFactory = new HessianProxyFactory();
- Object service = proxyFactory.create(loadClass(homeImpl.toString()), serviceURL);
- Object result = null;
- result = method.invoke(service, args);
- msg.setBody(result);
- } catch (Throwable e) {
- e.printStackTrace();
- if (e instanceof InvocationTargetException)
- e = ((InvocationTargetException)e).getTargetException();
- msg.setFaultBody(e);
- }
- return msg;
- }
-
- private Class loadClass(String className) {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- try {
- if (loader != null)
- return Class.forName(className, false, loader);
- else
- return Class.forName(className);
- } catch (Exception e) {
-
- }
- return null;
- }
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianBindingProviderFactory.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianBindingProviderFactory.java deleted file mode 100644 index 77a5f6f675..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianBindingProviderFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.binding.hessian.provider;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.binding.hessian.impl.HessianBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.host.http.ServletHost;
-import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.provider.BindingProviderFactory;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
-import org.apache.tuscany.sca.provider.ServiceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-public class HessianBindingProviderFactory implements BindingProviderFactory<HessianBinding> {
-
- private MessageFactory messageFactory;
- private ServletHost servletHost;
-
- public HessianBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
- ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
- List<ServletHost> hosts = servletHosts.getServletHosts();
- if (!hosts.isEmpty()) {
- this.servletHost = hosts.get(0);
- }
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
- messageFactory = modelFactories.getFactory(MessageFactory.class);
- }
-
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- HessianBinding binding) {
- return new HessianReferenceBindingProvider(component, reference, binding);
- }
-
- public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service,
- HessianBinding binding) {
- return new HessianServiceBindingProvider(component, service, binding, messageFactory, servletHost);
- }
-
- public Class<HessianBinding> getModelType() {
- return HessianBinding.class;
- }
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianReferenceBindingProvider.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianReferenceBindingProvider.java deleted file mode 100644 index 27711932d7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianReferenceBindingProvider.java +++ /dev/null @@ -1,62 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.binding.hessian.provider;
-
-import org.apache.tuscany.sca.binding.hessian.impl.HessianBinding;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-
-public class HessianReferenceBindingProvider implements ReferenceBindingProvider {
-
- private RuntimeComponentReference reference;
- private HessianBinding hessianBinding;
-
- public HessianReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- HessianBinding binding) {
- this.reference = reference;
- this.hessianBinding = binding;
- }
-
- public Invoker createInvoker(Operation operation) {
- return new HessianBindingInvoker(getBindingInterfaceContract().getInterface(), hessianBinding);
- }
-
- public boolean supportsOneWayInvocation() {
- return true;
- }
-
- public InterfaceContract getBindingInterfaceContract() {
- return reference.getInterfaceContract();
- }
-
- public void start() {
-
- }
-
- public void stop() {
-
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianServiceBindingProvider.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianServiceBindingProvider.java deleted file mode 100644 index 3e4922dc13..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianServiceBindingProvider.java +++ /dev/null @@ -1,87 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.binding.hessian.provider;
-
-import java.util.logging.Logger;
-
-import javax.servlet.Servlet;
-
-import org.apache.tuscany.sca.binding.hessian.impl.HessianBinding;
-import org.apache.tuscany.sca.host.http.ServletHost;
-import org.apache.tuscany.sca.interfacedef.Interface;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.provider.ServiceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.runtime.RuntimeWire;
-
-public class HessianServiceBindingProvider implements ServiceBindingProvider {
- private static final Logger logger = Logger.getLogger(HessianServiceBindingProvider.class.getName());
-
- private RuntimeComponent component;
- private RuntimeComponentService service;
- private HessianBinding hessianBinding;
- private MessageFactory messageFactory;
- private ServletHost servletHost;
- private String servletMapping;
-
- public HessianServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service,
- HessianBinding binding,
- MessageFactory messageFactory,
- ServletHost servletHost) {
- this.component = component;
- this.service = service;
- this.hessianBinding = binding;
- this.messageFactory = messageFactory;
- this.servletHost = servletHost;
- }
-
- public InterfaceContract getBindingInterfaceContract() {
- return service.getInterfaceContract();
- }
-
- public boolean supportsOneWayInvocation() {
- return true;
- }
-
- public void start() {
- Servlet servlet = null;
- Interface homeImpl = service.getInterfaceContract().getInterface();
- RuntimeWire wire = service.getRuntimeWire(hessianBinding);
- servlet = new HessianServiceListenerServlet(homeImpl, wire, messageFactory);
-
- if (servlet == null) {
- throw new IllegalStateException("No get or service method found on the service");
- }
-
- servletMapping = hessianBinding.getURI();
- servletHost.addServletMapping(servletMapping, servlet);
-
- // Save the actual binding URI in the binding
- hessianBinding.setURI(servletHost.getURLMapping(hessianBinding.getURI()).toString());
- }
-
- public void stop() {
- servletHost.removeServletMapping(servletMapping);
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianServiceListenerServlet.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianServiceListenerServlet.java deleted file mode 100644 index de9b4927c6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/java/org/apache/tuscany/sca/binding/hessian/provider/HessianServiceListenerServlet.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. - * - * The Apache Software License, Version 1.1 - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Caucho Technology (http://www.caucho.com/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "Hessian", "Resin", and "Caucho" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * info@caucho.com. - * - * 5. Products derived from this software may not be called "Resin" - * nor may "Resin" appear in their names without prior written - * permission of Caucho Technology. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @author Scott Ferguson - */ - -package org.apache.tuscany.sca.binding.hessian.provider; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.logging.Logger; - -import javax.servlet.GenericServlet; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.java.JavaOperation; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.runtime.RuntimeWire; - -import com.caucho.hessian.io.AbstractHessianInput; -import com.caucho.hessian.io.AbstractHessianOutput; -import com.caucho.hessian.io.Hessian2Input; -import com.caucho.hessian.io.Hessian2Output; -import com.caucho.hessian.io.HessianOutput; -import com.caucho.hessian.io.SerializerFactory; -import com.caucho.services.server.ServiceContext; - -/** - * Servlet for serving Hessian services. - */ -public class HessianServiceListenerServlet extends GenericServlet { - - private static final Logger logger = Logger.getLogger(HessianServiceListenerServlet.class.getName()); - - private Interface homeImpl; - private RuntimeWire wire; - private MessageFactory messageFactory; - - private SerializerFactory _serializerFactory; - - private Map<String, JavaOperation> _operationMap = new Hashtable<String, JavaOperation>(); - - public HessianServiceListenerServlet(Interface homeImpl, RuntimeWire wire, MessageFactory messageFactory) { - this.homeImpl = homeImpl; - this.wire = wire; - this.messageFactory = messageFactory; - - List<Operation> operations = homeImpl.getOperations(); - for (int i = 0; i < operations.size(); i++) { - JavaOperation op = (JavaOperation)operations.get(i); - Method method = op.getJavaMethod(); - if (_operationMap.get(method.getName()) == null) - _operationMap.put(method.getName(), op); - - Class[] param = method.getParameterTypes(); - String mangledName = method.getName() + "__" + param.length; - _operationMap.put(mangledName, op); - _operationMap.put(mangleName(method, false), op); - } - } - - public String getServletInfo() { - return "Tuscany Binding Hessian Servlet"; - } - - /** - * Sets the serializer factory. - */ - public void setSerializerFactory(SerializerFactory factory) { - _serializerFactory = factory; - } - - /** - * Gets the serializer factory. - */ - public SerializerFactory getSerializerFactory() { - if (_serializerFactory == null) - _serializerFactory = new SerializerFactory(); - - return _serializerFactory; - } - - /** - * Sets the serializer send collection java type. - */ - public void setSendCollectionType(boolean sendType) { - getSerializerFactory().setSendCollectionType(sendType); - } - - /** - * Execute a request. The path-info of the request selects the bean. Once - * the bean's selected, it will be applied. - */ - public void service(ServletRequest request, ServletResponse response) throws IOException, ServletException { - HttpServletRequest req = (HttpServletRequest)request; - HttpServletResponse res = (HttpServletResponse)response; - - if (!req.getMethod().equals("POST")) { - res.setStatus(500, "Hessian Requires POST"); - PrintWriter out = res.getWriter(); - res.setContentType("text/html"); - out.println("<h1>Hessian Requires POST</h1>"); - return; - } - - String serviceId = req.getPathInfo(); - String objectId = req.getParameter("id"); - if (objectId == null) - objectId = req.getParameter("ejbid"); - - ServiceContext.begin(req, serviceId, objectId); - - try { - InputStream is = request.getInputStream(); - OutputStream os = response.getOutputStream(); - - Hessian2Input in = new Hessian2Input(is); - AbstractHessianOutput out; - - SerializerFactory serializerFactory = getSerializerFactory(); - - in.setSerializerFactory(serializerFactory); - - int code = in.read(); - - if (code != 'c') { - // XXX: deflate - throw new IOException("expected 'c' in hessian input at " + code); - } - - int major = in.read(); - int minor = in.read(); - - if (major >= 2) - out = new Hessian2Output(os); - else - out = new HessianOutput(os); - - out.setSerializerFactory(serializerFactory); - - invoke(in, out); - - out.close(); - } catch (RuntimeException e) { - throw e; - } catch (ServletException e) { - throw e; - } catch (Throwable e) { - throw new ServletException(e); - } finally { - ServiceContext.end(); - } - } - - private String mangleName(Method method, boolean isFull) { - StringBuffer sb = new StringBuffer(); - sb.append(method.getName()); - Class[] params = method.getParameterTypes(); - for (int i = 0; i < params.length; i++) { - sb.append('_'); - sb.append(mangleClass(params[i], isFull)); - } - return sb.toString(); - } - - private String mangleClass(Class cl, boolean isFull) { - String name = cl.getName(); - if (name.equals("boolean") || name.equals("java.lang.Boolean")) - return "boolean"; - else if (name.equals("int") || name.equals("java.lang.Integer") - || name.equals("short") - || name.equals("java.lang.Short") - || name.equals("byte") - || name.equals("java.lang.Byte")) - return "int"; - else if (name.equals("long") || name.equals("java.lang.Long")) - return "long"; - else if (name.equals("float") || name.equals("java.lang.Float") - || name.equals("double") - || name.equals("java.lang.Double")) - return "double"; - else if (name.equals("java.lang.String") || name.equals("com.caucho.util.CharBuffer") - || name.equals("char") - || name.equals("java.lang.Character") - || name.equals("java.io.Reader")) - return "string"; - else if (name.equals("java.util.Date") || name.equals("com.caucho.util.QDate")) - return "date"; - else if (InputStream.class.isAssignableFrom(cl) || name.equals("[B")) - return "binary"; - else if (cl.isArray()) { - return "[" + mangleClass(cl.getComponentType(), isFull); - } else if (name.equals("org.w3c.dom.Node") || name.equals("org.w3c.dom.Element") - || name.equals("org.w3c.dom.Document")) - return "xml"; - else if (isFull) - return name; - else { - int p = name.lastIndexOf('.'); - if (p > 0) - return name.substring(p + 1); - else - return name; - } - } - - public void invoke(AbstractHessianInput in, AbstractHessianOutput out) throws Exception { - ServiceContext context = ServiceContext.getContext(); - - // backward compatibility for some frameworks that don't read - // the call type first - in.skipOptionalCall(); - - String header; - while ((header = in.readHeader()) != null) { - Object value = in.readObject(); - context.addHeader(header, value); - } - - String methodName = in.readMethod(); - Method method = null; - JavaOperation operation = _operationMap.get(methodName); - if (operation != null) - method = operation.getJavaMethod(); - - if (method != null) { - } else if ("_hessian_getAttribute".equals(methodName)) { - String attrName = in.readString(); - in.completeCall(); - String value = null; - if ("java.api.class".equals(attrName)) - value = homeImpl.toString(); - else if ("java.home.class".equals(attrName)) - value = homeImpl.toString(); - else if ("java.object.class".equals(attrName)) - value = homeImpl.toString(); - out.startReply(); - out.writeObject(value); - out.completeReply(); - return; - } else if (method == null) { - out.startReply(); - out.writeFault("NoSuchMethodException", "The service has no method named: " + in.getMethod(), null); - out.completeReply(); - return; - } - - Class[] args = method.getParameterTypes(); - Object[] values = new Object[args.length]; - - for (int i = 0; i < args.length; i++) { - values[i] = in.readObject(args[i]); - } - - Object result = null; - try { - Message msg = messageFactory.createMessage(); - msg.setOperation(operation); - msg.setBody(values); - result = wire.invoke(operation, msg); - } catch (Throwable e) { - while (e instanceof InvocationTargetException) - e = ((InvocationTargetException)e).getTargetException(); - out.startReply(); - out.writeFault("ServiceException", e.getMessage(), e); - out.completeReply(); - return; - } - - // The complete call needs to be after the invoke to handle a - // trailing InputStream - in.completeCall(); - out.startReply(); - out.writeObject(result); - out.completeReply(); - out.close(); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 1bbe97e514..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -org.apache.tuscany.sca.binding.hessian.impl.HessianBindingProcessor;qname=http://hessian#binding.hessian,model=org.apache.tuscany.sca.binding.hessian.impl.HessianBinding diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema deleted file mode 100644 index dfd4823a13..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# URI of the XML schema to be used for validation -binding-hessian.xsd diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory deleted file mode 100644 index 244449ddf0..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Implementation class for the binding extension
-org.apache.tuscany.sca.binding.hessian.provider.HessianBindingProviderFactory;model=org.apache.tuscany.sca.binding.hessian.impl.HessianBinding
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/binding-hessian.xsd b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/binding-hessian.xsd deleted file mode 100644 index 01d7437878..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/main/resources/binding-hessian.xsd +++ /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.
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://hessian"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:e="http://hessian"
- elementFormDefault="qualified">
-
- <import namespace="http://www.osoa.org/xmlns/sca/1.0"/>
-
- <element name="binding.hessian" type="e:HessianBinding"/>
-
- <complexType name="HessianBinding">
- <complexContent>
- <extension base="sca:Binding">
- </extension>
- </complexContent>
- </complexType>
-</schema>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/FirstImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/FirstImpl.java deleted file mode 100644 index 03ae16792a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/FirstImpl.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 org.zhulei.test.hessian.first;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FirstImpl implements IFirst {
-
- public String getString(String str) {
- return str + "_first";
- }
-
- public List<String> getData(String str1, String str2) {
- List<String> list = new ArrayList<String>();
- list.add(str1 + "_first");
- list.add(str2 + "_first");
- return list;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/FirstTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/FirstTestCase.java deleted file mode 100644 index 919cbe90ff..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/FirstTestCase.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 org.zhulei.test.hessian.first;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.caucho.hessian.client.HessianProxyFactory;
-
-/**
- *
- */
-public class FirstTestCase {
- private static SCANode node;
-
- /**
- * @throws java.lang.Exception
- */
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("first_hessian.composite", null);
- node.start();
- }
-
- @Test
- public void testServer() throws IOException {
- try {
- HessianProxyFactory proxyFactory = new HessianProxyFactory();
- IFirst service = (IFirst)proxyFactory.create(IFirst.class, "http://localhost:8085/hessian1");
- List<String> datas = service.getData("123", "ABC");
- for (int i = 0; i < datas.size(); i++) {
- System.out.println(datas.get(i));
- }
- } catch (Exception e) {
- System.out.println(e.getMessage());
- }
- }
-
- /**
- * @throws java.lang.Exception
- */
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- node.stop();
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/IFirst.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/IFirst.java deleted file mode 100644 index 03ec25721f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/first/IFirst.java +++ /dev/null @@ -1,29 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.zhulei.test.hessian.first;
-
-import java.util.List;
-
-public interface IFirst {
-
- public String getString(String str);
-
- public List<String> getData(String str1, String str2);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/ISecond.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/ISecond.java deleted file mode 100644 index 5ab32673cd..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/ISecond.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 org.zhulei.test.hessian.second;
-
-public interface ISecond {
-
- public String getString(String str);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/SecondImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/SecondImpl.java deleted file mode 100644 index 3fe66f6cbb..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/SecondImpl.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 org.zhulei.test.hessian.second;
-
-import org.osoa.sca.annotations.Reference;
-import org.zhulei.test.hessian.first.IFirst;
-
-public class SecondImpl implements ISecond {
-
- private IFirst first;
-
- public String getString(String str) {
- return first.getString(str) + "_second";
- }
-
- @Reference
- public void setFirst(IFirst first) {
- this.first = first;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/SecondTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/SecondTestCase.java deleted file mode 100644 index f390d5b104..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/java/org/zhulei/test/hessian/second/SecondTestCase.java +++ /dev/null @@ -1,72 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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 org.zhulei.test.hessian.second;
-
-import java.io.IOException;
-
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.caucho.hessian.client.HessianProxyFactory;
-
-/**
- *
- */
-public class SecondTestCase {
- private static SCANode node1;
- private static SCANode node2;
-
- /**
- * @throws java.lang.Exception
- */
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- node1 = SCANodeFactory.newInstance().createSCANodeFromClassLoader("second_hessian.composite", null);
- node1.start();
-
- node2 = SCANodeFactory.newInstance().createSCANodeFromClassLoader("first_hessian.composite", null);
- node2.start();
- }
-
- @Test
- public void testServer() throws IOException {
- try {
- HessianProxyFactory proxyFactory = new HessianProxyFactory();
- ISecond service = (ISecond)proxyFactory.create(ISecond.class, "http://localhost:8085/hessian2");
- String str = service.getString("XYZ");
- System.out.println(str);
- } catch (Exception e) {
- System.out.println(e.getMessage());
- }
- }
-
- /**
- * @throws java.lang.Exception
- */
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- node1.stop();
- node2.stop();
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/resources/first_hessian.composite b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/resources/first_hessian.composite deleted file mode 100644 index 3b14069063..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/resources/first_hessian.composite +++ /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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
- xmlns:e="http://hessian"
- targetNamespace="http://FirstHessianSCA"
- name="FirstHessianSCA">
-
- <component name="FirstHessianComponent">
- <implementation.java
- class="org.zhulei.test.hessian.first.FirstImpl" />
- </component>
-
- <service name="Hessian"
- promote="FirstHessianComponent">
- <interface.java
- interface="org.zhulei.test.hessian.first.IFirst" />
- <e:binding.hessian uri="/hessian1" />
- </service>
-
-</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/resources/second_hessian.composite b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/resources/second_hessian.composite deleted file mode 100644 index 76ddd89341..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-hessian/src/test/resources/second_hessian.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://www.osoa.org/xmlns/sca/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
- xmlns:e="http://hessian"
- targetNamespace="http://FirstHessianSCA"
- name="FirstHessianSCA">
-
- <component name="SecondHessianComponent">
- <implementation.java
- class="org.zhulei.test.hessian.second.SecondImpl" />
- <reference name="first">
- <interface.java
- interface="org.zhulei.test.hessian.first.IFirst" />
- <e:binding.hessian
- uri="http://localhost:8085/hessian1" />
- </reference>
- </component>
-
- <service name="Hessian"
- promote="SecondHessianComponent">
- <interface.java
- interface="org.zhulei.test.hessian.second.ISecond" />
- <e:binding.hessian uri="/hessian2" />
- </service>
-
-</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/pom.xml deleted file mode 100644 index 6d40629880..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tuscany-binding-sca-jms</artifactId>
- <name>Apache Tuscany SCA JMS-based Default Binding Extension</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-sca</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.1.0</version>
- </dependency>
-
- <dependency>
- <groupId>backport-util-concurrent</groupId>
- <artifactId>backport-util-concurrent</artifactId>
- <version>3.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>2.2</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-endpoint</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-Version>${tuscany.version}</Bundle-Version>
- <Bundle-SymbolicName>org.apache.tuscany.sca.binding.sca.jms</Bundle-SymbolicName>
- <Bundle-Description>${pom.name}</Bundle-Description>
- <Export-Package>org.apache.tuscany.sca.binding.sca.jms*</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/AMQJMSResourceFactory.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/AMQJMSResourceFactory.java deleted file mode 100644 index a484ca5813..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/AMQJMSResourceFactory.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 org.apache.tuscany.sca.binding.sca.jms;
-
-import javax.jms.JMSException;
-import javax.naming.NamingException;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryImpl;
-
-public class AMQJMSResourceFactory extends JMSResourceFactoryImpl {
-
- public AMQJMSResourceFactory(String connectionFactoryName, String responseConnectionFactoryName, String initialContextFactoryName, String jndiURL) {
- super(connectionFactoryName, responseConnectionFactoryName, initialContextFactoryName, jndiURL);
- }
-
- @Override
- protected void createConnection() throws NamingException, JMSException {
- super.createConnection();
- ((ActiveMQConnection)connection).setWatchTopicAdvisories(false);
- }
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/AMQResourceFactoryExtensionPoint.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/AMQResourceFactoryExtensionPoint.java deleted file mode 100644 index 6aab7e53f5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/AMQResourceFactoryExtensionPoint.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 org.apache.tuscany.sca.binding.sca.jms;
-
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
-import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryExtensionPoint;
-
-public class AMQResourceFactoryExtensionPoint implements JMSResourceFactoryExtensionPoint{
-
- public JMSResourceFactory createJMSResourceFactory(JMSBinding binding) {
- return new AMQJMSResourceFactory(binding.getConnectionFactoryName(), binding.getResponseConnectionFactoryName(), binding.getInitialContextFactoryName(), binding.getJndiURL());
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSBroker.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSBroker.java deleted file mode 100644 index 28e7ff9797..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSBroker.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 org.apache.tuscany.sca.binding.sca.jms;
-
-import java.net.URI;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.ModuleActivator;
-
-/**
- * The JMS broker for the JMS based SCA binding TODO: configure from a binding.jms in definitions.xml
- */
-public class JMSBroker implements ModuleActivator {
-
- // this is static so that there is only one broker per JVM
- // if that wasn't the case then to use the vm: transport each broker
- // would need a unique name and clients would need to know the name
- private static BrokerService broker;
-
- public void start(ExtensionPointRegistry arg0) {
- if (broker == null) {
- broker = new BrokerService();
- broker.setPersistent(false);
- broker.setUseJmx(false);
- try {
-
- TransportConnector tc = broker.addConnector("tcp://localhost:0");
- tc.setDiscoveryUri(URI.create("multicast://default"));
-
- broker.addNetworkConnector("multicast://default");
-
- broker.start();
-
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- }
- }
-
- public void stop(ExtensionPointRegistry arg0) {
- if (broker != null) {
- try {
- broker.stop();
- broker = null;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- public static BrokerService getBroker() {
- return broker;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java deleted file mode 100644 index 44ab8f3fbf..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/java/org/apache/tuscany/sca/binding/sca/jms/JMSSCABindingProviderFactory.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.sca.jms; - -import org.apache.tuscany.sca.binding.jms.impl.JMSBinding; -import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants; -import org.apache.tuscany.sca.binding.jms.provider.JMSBindingReferenceBindingProvider; -import org.apache.tuscany.sca.binding.jms.provider.JMSBindingServiceBindingProvider; -import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory; -import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryExtensionPoint; -import org.apache.tuscany.sca.binding.sca.DistributedSCABinding; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.host.jms.JMSHostExtensionPoint; -import org.apache.tuscany.sca.host.jms.JMSServiceListenerFactory; -import org.apache.tuscany.sca.provider.BindingProviderFactory; -import org.apache.tuscany.sca.provider.ReferenceBindingProvider; -import org.apache.tuscany.sca.provider.ServiceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; -import org.apache.tuscany.sca.work.WorkScheduler; - -/** - * The factory for the JMS based implementation of the distributed sca binding - */ -public class JMSSCABindingProviderFactory implements BindingProviderFactory<DistributedSCABinding> { - - private WorkScheduler workScheduler; - private ExtensionPointRegistry extensionPoints; - private JMSResourceFactoryExtensionPoint jmsRFEP; - private JMSServiceListenerFactory serviceListenerFactory; - - public JMSSCABindingProviderFactory(ExtensionPointRegistry extensionPoints) { - this.extensionPoints = extensionPoints; - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - workScheduler = utilities.getUtility(WorkScheduler.class); - assert workScheduler != null; - jmsRFEP = (JMSResourceFactoryExtensionPoint)extensionPoints.getExtensionPoint(JMSResourceFactoryExtensionPoint.class); - if (jmsRFEP == null) { - jmsRFEP = new AMQResourceFactoryExtensionPoint(); - } - JMSHostExtensionPoint jmsHostExtensionPoint = (JMSHostExtensionPoint)extensionPoints.getExtensionPoint(JMSHostExtensionPoint.class); - serviceListenerFactory = jmsHostExtensionPoint.getJMSServiceListenerFactory(); - } - - public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, - RuntimeComponentReference reference, - DistributedSCABinding binding) { - JMSBinding jmsBinding = createBinding(binding); - - // FIXME: CREATE_NEVER doesn't work as the dynamically created JNDI destinations - // aren't replicated around the broker cluster. Maybe it needs an AMQ specific - // impl of the Tuscany JMSResourceFactory which uses use physical destinations - // instead of JNDI - // jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_NEVER); - - JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory(jmsBinding); - return new JMSBindingReferenceBindingProvider(component, reference, jmsBinding, extensionPoints, jmsRF); - } - - public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, - RuntimeComponentService service, - DistributedSCABinding binding) { - JMSBinding jmsBinding = createBinding(binding); - jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_ALWAYS); - JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory(jmsBinding); - return new JMSBindingServiceBindingProvider(component, service, binding.getSCABinding(), jmsBinding, serviceListenerFactory, extensionPoints, jmsRF); - } - - private JMSBinding createBinding(DistributedSCABinding binding) { - JMSBinding b = new JMSBinding(); - b.setInitialContextFactoryName("org.apache.activemq.jndi.ActiveMQInitialContextFactory"); - b.setJndiURL("vm://localhost"); // TODO: plug in jndi url from definitions.xml - - b.setJMSTimeToLive(9); - - b.setRequestMessageProcessorName(JMSBindingConstants.OBJECT_MP_CLASSNAME); - b.setResponseMessageProcessorName(JMSBindingConstants.OBJECT_MP_CLASSNAME); - if (binding.getSCABinding().getURI().startsWith("/")) { - b.setDestinationName(binding.getSCABinding().getURI().substring(1)); - } else { - b.setDestinationName(binding.getSCABinding().getURI()); - } - return b; - } - - public Class<DistributedSCABinding> getModelType() { - return DistributedSCABinding.class; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator deleted file mode 100644 index f1b9825130..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.apache.tuscany.sca.binding.sca.jms.JMSBroker
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory deleted file mode 100644 index 8e53649af1..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-sca-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Implementation class for the binding extension
-org.apache.tuscany.sca.binding.sca.jms.JMSSCABindingProviderFactory;model=org.apache.tuscany.sca.binding.sca.DistributedSCABinding
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/pom.xml deleted file mode 100644 index e90d886a0d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-contribution-jee-impl</artifactId> - <name>Apache Tuscany SCA Java EE Impl</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-impl</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution-jee</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core-spi</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-interface-java</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-interface-java-xml</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <!-- TUSCANY-3165 Waiting for 3.0.2 to be released so - reverting to 3.0.1 for now. JEE itest will no work on - windows due to this - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>openejb-core</artifactId> - <version>3.0.2-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>openejb-jee</artifactId> - <version>3.0.2-SNAPSHOT</version> - </dependency> - --> - - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>openejb-core</artifactId> - <version>3.0.1</version> - </dependency> - - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>openejb-jee</artifactId> - <version>3.0.1</version> - </dependency> - - <dependency> - <groupId>org.codehaus.woodstox</groupId> - <artifactId>wstx-asl</artifactId> - <version>3.2.4</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <configuration> - <instructions> - <Bundle-Version>${tuscany.version}</Bundle-Version> - <Bundle-SymbolicName>org.apache.tuscany.sca.contribution.jee</Bundle-SymbolicName> - <Bundle-Description>${pom.name}</Bundle-Description> - <Export-Package>org.apache.tuscany.sca.contribution.jee*</Export-Package> - <DynamicImport-Package>org.apache.tuscany.sca.contribution.osgi.impl</DynamicImport-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/JEEDefinitionsProvider.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/JEEDefinitionsProvider.java deleted file mode 100644 index 262875c49a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/JEEDefinitionsProvider.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 org.apache.tuscany.sca.contribution.jee; - -import java.net.URI; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; - -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; - -/** - * Provider for Policy Intents and PolicySet definitions related to security - * - * @version $Rev$ $Date$ - */ -public class JEEDefinitionsProvider implements SCADefinitionsProvider { - private static final String definitionsFile = "org/apache/tuscany/sca/contribution/jee/definitions.xml"; - - URLArtifactProcessor urlArtifactProcessor = null; - - public JEEDefinitionsProvider(ExtensionPointRegistry registry) { - URLArtifactProcessorExtensionPoint documentProcessors = - registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); - } - - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { - SCADefinitions scaDefns = null; - try { - // Allow privileged access to load resource. Requires - // RuntimePermssion in security policy. - URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() { - public URL run() { - return getClass().getClassLoader().getResource(definitionsFile); - } - }); - - URI uri = new URI(definitionsFile); - - scaDefns = (SCADefinitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); - - return scaDefns; - - } catch (Exception e) { - throw new SCADefinitionsProviderException(e); - } - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEModuleHelper.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEModuleHelper.java deleted file mode 100644 index a903f6dbc0..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/JavaEEModuleHelper.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.contribution.jee; - -import java.io.File; - -import org.apache.openejb.OpenEJBException; -import org.apache.openejb.config.AnnotationDeployer; -import org.apache.openejb.config.AppModule; -import org.apache.openejb.config.DeploymentLoader; -import org.apache.openejb.config.EjbModule; -import org.apache.openejb.config.ReadDescriptors; -import org.apache.openejb.config.WebModule; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; - -/** - * @version $Rev$ $Date$ - */ -public class JavaEEModuleHelper { - - public AppModule getMetadataCompleteModules(String jarFilePath) throws ContributionReadException { - DeploymentLoader loader = new DeploymentLoader(); - AppModule appModule = null; - try { - appModule = loader.load(new File(jarFilePath)); - } catch (OpenEJBException e) { - throw new ContributionReadException(e); - } - - // Set the Thread context class loader as the module's class loader and all the Web and EJB modules - // inside. Otherwise, SCA annotations could not be processed - // TODO: Eliminate the use of reflection for setting the class loader - java.lang.reflect.Field field = null; - try { - field = appModule.getClass().getDeclaredField("classLoader"); - } catch (SecurityException e) { - throw new ContributionReadException(e); - } catch (NoSuchFieldException e) { - throw new ContributionReadException(e); - } - field.setAccessible(true); - try{ - field.set(appModule, Thread.currentThread().getContextClassLoader()); - } catch (IllegalArgumentException e) { - throw new ContributionReadException(e); - } catch (IllegalAccessException e) { - throw new ContributionReadException(e); - } - - for(EjbModule ejbModule:appModule.getEjbModules()) { - java.lang.reflect.Field field1 = null; - try { - field1 = ejbModule.getClass().getDeclaredField("classLoader"); - } catch (SecurityException e) { - throw new ContributionReadException(e); - } catch (NoSuchFieldException e) { - throw new ContributionReadException(e); - } - field1.setAccessible(true); - try { - field1.set(ejbModule, Thread.currentThread().getContextClassLoader()); - } catch (IllegalArgumentException e) { - throw new ContributionReadException(e); - } catch (IllegalAccessException e) { - throw new ContributionReadException(e); - } - } - - for(WebModule webModule:appModule.getWebModules()) { - java.lang.reflect.Field field1 = null; - try { - field1 = webModule.getClass().getDeclaredField("classLoader"); - } catch (SecurityException e) { - throw new ContributionReadException(e); - } catch (NoSuchFieldException e) { - throw new ContributionReadException(e); - } - field1.setAccessible(true); - try { - field1.set(webModule, Thread.currentThread().getContextClassLoader()); - } catch (IllegalArgumentException e) { - throw new ContributionReadException(e); - } catch (IllegalAccessException e) { - throw new ContributionReadException(e); - } - } - - // Process deployment descriptor files - ReadDescriptors readDescriptors = new ReadDescriptors(); - try { - readDescriptors.deploy(appModule); - } catch (OpenEJBException e) { - throw new ContributionReadException(e); - } - - // Process annotations - AnnotationDeployer annDeployer = new AnnotationDeployer(); - try { - annDeployer.deploy(appModule); - } catch (OpenEJBException e) { - throw new ContributionReadException(e); - } - - return appModule; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EARContributionClassLoader.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EARContributionClassLoader.java deleted file mode 100644 index 87cdaa2cf3..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EARContributionClassLoader.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.contribution.jee.impl; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.List; - -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.Export; -import org.apache.tuscany.sca.contribution.Import; -import org.apache.tuscany.sca.contribution.java.JavaImport; -import org.apache.tuscany.sca.contribution.jee.EjbModuleInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.WebModuleInfo; - - -public class EARContributionClassLoader extends URLClassLoader { - - private Contribution contribution; - private List<EjbModuleInfo> ejbModules = new ArrayList<EjbModuleInfo>(); - - /** - * Constructor for contribution ClassLoader - * - * @param contribution - * @param parent - * @throws MalformedURLException - */ - public EARContributionClassLoader(Contribution contribution, final ClassLoader parent) { - super(new URL[0], parent); - - this.contribution = contribution; - - // get the classloaders for any EAR archive that is a contribution - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof JavaEEApplicationInfo){ - JavaEEApplicationInfo jeeAppInfo = (JavaEEApplicationInfo)artifact.getModel(); - // TODO - won't these all have the same classloader? - ejbModules.addAll(jeeAppInfo.getEjbModuleInfos().values()); - } - } - - } - - /* (non-Javadoc) - * @see java.net.URLClassLoader#findClass(java.lang.String) - * - * Search path for class: - * This contribution - * Imported contributions - */ - @Override - protected Class<?> findClass(String className) throws ClassNotFoundException { - - Class<?> clazz = null; - ClassNotFoundException cne = null; - - // TODO - Won't these classloaders all be the same? - for (EjbModuleInfo ejbModuleInfo : ejbModules){ - try { - clazz = ejbModuleInfo.getModuleClassloader().loadClass(className); - } catch (ClassNotFoundException e) { - cne = e; - } - - if (clazz != null){ - break; - } - } - - if (clazz == null){ - throw cne; - } - - return clazz; - } - - - /* (non-Javadoc) - * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) - * - * Search path for class: - * Parent ClassLoader - * This contribution - * Imported contributions - * - */ - @Override - protected synchronized Class<?> loadClass(String className, boolean resolveClass) - throws ClassNotFoundException { - - Class<?> clazz = null; - try { - - if (this.getParent() != null) - clazz = this.getParent().loadClass(className); - - } catch (ClassNotFoundException e) { - } - - if (clazz == null) - clazz = findClass(className); - - - if (resolveClass) - this.resolveClass(clazz); - return clazz; - - } - - - - /* (non-Javadoc) - * @see java.lang.ClassLoader#getResource(java.lang.String) - * - * Find a resource. - * Search path for resource: - * Parent ClassLoader - * This contribution - */ - @Override - public URL getResource(String resName) { - - URL resource = null; - - if (this.getParent() != null) { - resource = this.getParent().getResource(resName); - } - if (resource == null) { -// TODO Which classloader? -// resource = webModuleInfo.getModuleClassloader().getResource(resName); - } - - return resource; - } - - - /* (non-Javadoc) - * @see java.lang.ClassLoader#getResources(java.lang.String) - * - * Return list of resources from this contribution, resources - * imported through imported contributions and resources from parent - * ClassLoader. - */ - @Override - public Enumeration<URL> getResources(String resName) throws IOException { - - HashSet<URL> resourceSet = new HashSet<URL>(); - -// TODO - which classloader -// addEnumerationToCollection(resourceSet, webModuleInfo.getModuleClassloader().getResources(resName)); - addEnumerationToCollection(resourceSet, super.getResources(resName)); - - return Collections.enumeration(resourceSet); - } - - /* - * Add an enumeration to a Collection - */ - private <T extends Object> void addEnumerationToCollection(Collection<T> collection, Enumeration<T> enumeration) { - - while (enumeration.hasMoreElements()) - collection.add(enumeration.nextElement()); - } - - - @Override - public String toString() { - return "SCA JEE ClassLoader, parent ClassLoader: " + getParent(); - } - - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EARContributionClassLoaderProvider.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EARContributionClassLoaderProvider.java deleted file mode 100644 index 5ea7dc55f7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/EARContributionClassLoaderProvider.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 org.apache.tuscany.sca.contribution.jee.impl; - -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.PackageType; -import org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider; -import org.apache.tuscany.sca.contribution.java.impl.ContributionClassLoader; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; - -/** - * The default implementation of the ContributionClassLoaderProvider - */ -public class EARContributionClassLoaderProvider implements ContributionClassLoaderProvider { - - public EARContributionClassLoaderProvider() { - super(); - } - - public String getContributionType() { - return PackageType.EAR; - } - - public ClassLoader getClassLoader(Contribution contribution, ClassLoader parent) { - // TODO - This is not quite right at the CCL will load up the nested jars - // also. However we do need to pick up the import processing so - // need a bit of a refactor - ContributionClassLoader ccl = new ContributionClassLoader(contribution, parent); - return new EARContributionClassLoader(contribution, ccl); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java deleted file mode 100644 index c0830cbb2c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.contribution.jee.impl; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.Map; - -import org.apache.openejb.config.AppModule; -import org.apache.openejb.config.EjbModule; -import org.apache.openejb.config.UnknownModuleTypeException; -import org.apache.openejb.config.UnsupportedModuleTypeException; -import org.apache.openejb.config.WebModule; -import org.apache.openejb.jee.EjbJar; -import org.apache.openejb.jee.EjbRef; -import org.apache.openejb.jee.EjbRefType; -import org.apache.openejb.jee.EjbReference; -import org.apache.openejb.jee.EnterpriseBean; -import org.apache.openejb.jee.EnvEntry; -import org.apache.openejb.jee.Filter; -import org.apache.openejb.jee.InjectionTarget; -import org.apache.openejb.jee.Listener; -import org.apache.openejb.jee.MessageDrivenBean; -import org.apache.openejb.jee.Servlet; -import org.apache.openejb.jee.SessionBean; -import org.apache.openejb.jee.SessionType; -import org.apache.openejb.jee.WebApp; -import org.apache.tuscany.sca.contribution.jee.EjbInfo; -import org.apache.tuscany.sca.contribution.jee.EjbModuleInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; -import org.apache.tuscany.sca.contribution.jee.JavaEEModuleHelper; -import org.apache.tuscany.sca.contribution.jee.WebModuleInfo; -import org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo.EjbType; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; -import org.apache.tuscany.sca.contribution.service.util.IOHelper; - -/** - * @version $Rev$ $Date$ - */ -public class JavaEEIntrospectorImpl implements JavaEEIntrospector { - - public WebModuleInfo introspectWebArchive(URL artifactURL) throws ContributionReadException { - // Create a temporary file since openejb extracts the archive to process - InputStream inp = null; - File tempFile = null; - try { - URLConnection connection = artifactURL.openConnection(); - connection.setUseCaches(false); - inp = connection.getInputStream(); - tempFile = File.createTempFile("temp", ".war"); - FileOutputStream fout = new FileOutputStream(tempFile); - IOHelper.copy(inp, fout); - fout.close(); - inp.close(); - } catch (IOException e) { - throw new ContributionReadException(e); - } - - JavaEEModuleHelper jmh = new JavaEEModuleHelper(); - WebModule wm = jmh.getMetadataCompleteModules(tempFile.getAbsolutePath()).getWebModules().get(0); - if(!tempFile.delete()) { - tempFile.deleteOnExit(); - } - return createWebModuleInfo(wm); - } - - private WebModuleInfo createWebModuleInfo(WebModule webModule) { - WebModuleInfo wmInfo = new WebModuleInfoImpl(); - - WebApp webApp = webModule.getWebApp(); - ClassLoader classLoader = webModule.getClassLoader(); - wmInfo.setmoduleClassloader(classLoader); - - // Process Remote EJB References - for (Map.Entry<String, EjbRef> entry : webApp.getEjbRefMap().entrySet()) { - EjbRef ejbRef = entry.getValue(); - if(ejbRef.getHome() != null) { - // References to only EJB3 beans need to be considered. - // Skip the current on as it is not a reference to an EJB3 bean. - continue; - } - if (ejbRef.getRefType().compareTo(EjbReference.Type.REMOTE) != 0) { - // Only Remote EJB references need to be considered. - // Skip the current one as it is not a remote reference. - continue; - } - //FIXME: ejbRef.getEjbRefType() is null sometimes. Need a different way to figure the type. - if(ejbRef.getEjbRefType() != null && ejbRef.getEjbRefType().compareTo(EjbRefType.SESSION) != 0) { - // Only references to Session beans need to be considered. - // Skip the current one as it is not a Session bean. - continue; - } - - try { - wmInfo.getEjbReferences().put(ejbRef.getEjbRefName(), createEjbReferenceInfo(ejbRef, classLoader)); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // Process env-entries to compute properties - for (Map.Entry<String, EnvEntry> entry : webApp.getEnvEntryMap().entrySet()) { - EnvEntry envEntry = entry.getValue(); - wmInfo.getEnvEntries().put(envEntry.getEnvEntryName(), createEnvEntryInfo(envEntry)); - } - - // Process Servlets - for(Servlet servlet: webApp.getServlet()) { - try { - wmInfo.getServletClasses().add(classLoader.loadClass(servlet.getServletClass())); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // Process Filters - for(Filter filter: webApp.getFilter()) { - try { - wmInfo.getFilterClasses().add(classLoader.loadClass(filter.getFilterClass())); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // Process Listeners - for(Listener listener: webApp.getListener()) { - try { - wmInfo.getListenerClasses().add(classLoader.loadClass(listener.getListenerClass())); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // TODO: Process JSF Managed beans - - // TODO: Process JSP pages - - return wmInfo; - } - - private org.apache.tuscany.sca.contribution.jee.EnvEntryInfo createEnvEntryInfo(EnvEntry envEntry) { - org.apache.tuscany.sca.contribution.jee.EnvEntryInfo envEntryInfo = new org.apache.tuscany.sca.contribution.jee.EnvEntryInfo(); - envEntryInfo.name = envEntry.getEnvEntryName(); - envEntryInfo.type = envEntry.getEnvEntryType(); - envEntryInfo.value = envEntry.getEnvEntryValue(); - - return envEntryInfo; - } - - private org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo createEjbReferenceInfo(EjbRef ejbRef, ClassLoader classLoader) throws ClassNotFoundException { - org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo ejbReferenceInfo = new org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo(); - - ejbReferenceInfo.referenceName = ejbRef.getEjbRefName(); - ejbReferenceInfo.referenceType = ejbRef.getRefType().compareTo(EjbReference.Type.REMOTE) == 0 ? org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo.RefType.REMOTE : ejbRef.getRefType().compareTo(EjbReference.Type.LOCAL) == 0 ? org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo.RefType.LOCAL : org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo.RefType.UNKNOWN; - ejbReferenceInfo.businessInterface = classLoader.loadClass(ejbRef.getInterface()); - - ejbReferenceInfo.ejbType = EjbType.UNKNOWN; - if(ejbRef.getEjbRefType() != null) { - if(ejbRef.getEjbRefType().compareTo(EjbRefType.SESSION) == 0) { - ejbReferenceInfo.ejbType = EjbType.SESSION_UNKNOWN; - } - } - - ejbReferenceInfo.ejbLink = ejbRef.getEjbLink(); - ejbReferenceInfo.mappedName = ejbRef.getMappedName(); - if(ejbRef.getInjectionTarget().size() > 0) { - InjectionTarget it = ejbRef.getInjectionTarget().iterator().next(); - ejbReferenceInfo.injectionTarget.targetClass = it.getInjectionTargetClass(); - ejbReferenceInfo.injectionTarget.targetName = it.getInjectionTargetName(); - } - - return ejbReferenceInfo; - } - - public EjbModuleInfo introspectEjbArchive(URL artifactURL) throws ContributionReadException { - // Create a temporary file since openejb extracts the archive to process - InputStream inp = null; - File tempFile = null; - try { - URLConnection connection = artifactURL.openConnection(); - connection.setUseCaches(false); - inp = connection.getInputStream(); - tempFile = File.createTempFile("temp", ".jar"); - FileOutputStream fout = new FileOutputStream(tempFile); - IOHelper.copy(inp, fout); - fout.close(); - inp.close(); - } catch (IOException e) { - throw new ContributionReadException(e); - } - - JavaEEModuleHelper jmh = new JavaEEModuleHelper(); - EjbModule em; - try { - em = jmh.getMetadataCompleteModules(tempFile.getAbsolutePath()).getEjbModules().get(0); - } catch(ContributionReadException e) { - if((e.getCause() instanceof UnknownModuleTypeException) || - (e.getCause() instanceof UnsupportedModuleTypeException)) { - // Not an EJB jar - return null; - } else { - throw e; - } - } finally { - if(!tempFile.delete()) { - tempFile.deleteOnExit(); - } - } - return createEjbModuleInfo(em); - } - - private EjbModuleInfo createEjbModuleInfo(EjbModule ejbModule) { - EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl(); - - EjbJar ejbJar = ejbModule.getEjbJar(); - if (!ejbJar.getVersion().startsWith("3")) { - // Not an EJB3 module - // TODO: should throw an exception - return null; - } - - ClassLoader classLoader = ejbModule.getClassLoader(); - ejbModuleInfo.setmoduleClassloader(classLoader); - Map<String, EnterpriseBean> beansMap = ejbJar.getEnterpriseBeansByEjbName(); - for (Map.Entry<String, EnterpriseBean> entry : beansMap.entrySet()) { - EnterpriseBean bean = entry.getValue(); - EjbInfo ejbInfo = null; - if (bean instanceof SessionBean) { - SessionBean sbean = (SessionBean)bean; - ejbInfo = createEjbInfo(sbean, classLoader); - } else if (bean instanceof MessageDrivenBean) { - MessageDrivenBean mdbean = (MessageDrivenBean)bean; - ejbInfo = createEjbInfo(mdbean, classLoader); - } else { - continue; - } - if (ejbInfo != null) { - // Bean is an EJB3 bean - ejbModuleInfo.getEjbInfos().put(bean.getEjbName(), ejbInfo); - } - } - - return ejbModuleInfo; - } - - private EjbInfo createEjbInfo(MessageDrivenBean bean, ClassLoader classLoader) { - try { - if(javax.ejb.MessageDrivenBean.class.isAssignableFrom(classLoader.loadClass(bean.getEjbClass()))) { - // Not an EJB3 bean - return null; - } - } catch (ClassNotFoundException ignored) { - // Should not happen - } - EjbInfo ejbInfo = new EjbInfo(); - - ejbInfo.beanName = bean.getEjbName(); - - try { - ejbInfo.beanClass = classLoader.loadClass(bean.getEjbClass()); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - ejbInfo.ejbType = org.apache.tuscany.sca.contribution.jee.EjbInfo.EjbType.MESSAGE_DRIVEN; - - ejbInfo.mappedName = bean.getMappedName(); - - processReferencesEnvEntries(bean, classLoader, ejbInfo); - - return ejbInfo; - } - - private EjbInfo createEjbInfo(SessionBean bean, ClassLoader classLoader) { - if(bean.getBusinessRemote().size() == 0 && bean.getBusinessLocal().size() == 0) { - // Not an EJB3 Session bean - return null; - } - EjbInfo ejbInfo = new EjbInfo(); - - ejbInfo.beanName = bean.getEjbName(); - - try { - ejbInfo.beanClass = classLoader.loadClass(bean.getEjbClass()); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - ejbInfo.ejbType = bean.getSessionType().equals(SessionType.STATEFUL) ? org.apache.tuscany.sca.contribution.jee.EjbInfo.EjbType.SESSION_STATEFUL : bean.getSessionType().equals(SessionType.STATELESS) ? org.apache.tuscany.sca.contribution.jee.EjbInfo.EjbType.SESSION_STATELESS : org.apache.tuscany.sca.contribution.jee.EjbInfo.EjbType.SESSION_UNKNOWN; - - ejbInfo.mappedName = bean.getMappedName(); - //FIXME: Is it ok to use beanName when mapped name is null? - if(ejbInfo.mappedName == null) { - ejbInfo.mappedName = ejbInfo.beanName; - } - - // Process Remote Business interfaces of the SessionBean - for (String intfName : bean.getBusinessRemote()) { - try { - ejbInfo.businessRemote.add(classLoader.loadClass(intfName)); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // Process Local Business interfaces of the SessionBean - for (String intfName : bean.getBusinessLocal()) { - try { - ejbInfo.businessLocal.add(classLoader.loadClass(intfName)); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - processReferencesEnvEntries(bean, classLoader, ejbInfo); - - return ejbInfo; - } - - private void processReferencesEnvEntries(EnterpriseBean bean, ClassLoader classLoader, EjbInfo ejbInfo) { - // Process Remote EJB References - for (Map.Entry<String, EjbRef> entry : bean.getEjbRefMap().entrySet()) { - EjbRef ejbRef = entry.getValue(); - if(ejbRef.getHome() != null) { - // References to only EJB3 beans need to be considered. - // Skip the current on as it is not a reference to an EJB3 bean. - continue; - } - if (ejbRef.getRefType().compareTo(EjbReference.Type.REMOTE) != 0) { - // Only Remote EJB references need to be considered. - // Skip the current one as it is not a remote reference. - continue; - } - //FIXME: ejbRef.getEjbRefType() is null sometimes. Need a different way to figure the type. - if(ejbRef.getEjbRefType() != null && ejbRef.getEjbRefType().compareTo(EjbRefType.SESSION) != 0) { - // Only references to Session beans need to be considered. - // Skip the current one as it is not a Session bean. - continue; - } - - try { - ejbInfo.ejbReferences.put(ejbRef.getEjbRefName(), createEjbReferenceInfo(ejbRef, classLoader)); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // Process env-entries - for (Map.Entry<String, EnvEntry> entry : bean.getEnvEntryMap().entrySet()) { - EnvEntry envEntry = entry.getValue(); - - ejbInfo.envEntries.put(envEntry.getEnvEntryName(), createEnvEntryInfo(envEntry)); - } - } - - public JavaEEApplicationInfo introspectJeeArchive(URL artifactURL) throws ContributionReadException { - // Create a temporary file since openejb extracts the archive to process - InputStream inp = null; - File tempFile = null; - try { - URLConnection connection = artifactURL.openConnection(); - connection.setUseCaches(false); - inp = connection.getInputStream(); - tempFile = File.createTempFile("temp", ".ear"); - FileOutputStream fout = new FileOutputStream(tempFile); - IOHelper.copy(inp, fout); - fout.close(); - inp.close(); - } catch (IOException e) { - throw new ContributionReadException(e); - } - - JavaEEModuleHelper jmh = new JavaEEModuleHelper(); - AppModule appModule = jmh.getMetadataCompleteModules(tempFile.getAbsolutePath()); - if(!tempFile.delete()) { - tempFile.deleteOnExit(); - } - return createJavaEEApplicationInfo(appModule); - } - - private org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo createJavaEEApplicationInfo(AppModule appModule) { - JavaEEApplicationInfo appInfo = new JavaEEApplicationInfoImpl(); - for(EjbModule em : appModule.getEjbModules()){ - EjbModuleInfo ejbModuleInfo = createEjbModuleInfo(em); - ejbModuleInfo.setModuleName(em.getModuleId()); - appInfo.getEjbModuleInfos().put(em.getModuleId(), ejbModuleInfo); - } - - for(WebModule wm : appModule.getWebModules()) { - WebModuleInfo webModuleInfo = createWebModuleInfo(wm); - webModuleInfo.setModuleName(wm.getModuleId()); - appInfo.getWebModuleInfos().put(wm.getModuleId(), webModuleInfo); - } - - return appInfo; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WARContributionClassLoader.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WARContributionClassLoader.java deleted file mode 100644 index 4047371583..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WARContributionClassLoader.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.contribution.jee.impl; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.List; - -import org.apache.tuscany.sca.contribution.Artifact; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.Export; -import org.apache.tuscany.sca.contribution.Import; -import org.apache.tuscany.sca.contribution.java.JavaImport; -import org.apache.tuscany.sca.contribution.jee.EjbModuleInfo; -import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; -import org.apache.tuscany.sca.contribution.jee.WebModuleInfo; - - -public class WARContributionClassLoader extends URLClassLoader { - - private Contribution contribution; - private WebModuleInfo webModuleInfo = null; - - /** - * Constructor for contribution ClassLoader - * - * @param contribution - * @param parent - * @throws MalformedURLException - */ - public WARContributionClassLoader(Contribution contribution, final ClassLoader parent) { - super(new URL[0], parent); - - this.contribution = contribution; - - // get the classloaders for any WAR archive that is a contribution - // TODO extend to case where JEE archive is outside the contribution - for (Artifact artifact : contribution.getArtifacts()){ - if (artifact.getModel() instanceof WebModuleInfo){ - webModuleInfo = (WebModuleInfo)artifact.getModel(); - break; - } - } - - } - - /* (non-Javadoc) - * @see java.net.URLClassLoader#findClass(java.lang.String) - * - * Search path for class: - * This contribution - * Imported contributions - */ - @Override - protected Class<?> findClass(String className) throws ClassNotFoundException { - - Class<?> clazz = null; - ClassNotFoundException cne = null; - - try { - clazz = webModuleInfo.getModuleClassloader().loadClass(className); - } catch (ClassNotFoundException e) { - cne = e; - } - - if (clazz == null){ - throw cne; - } - - return clazz; - } - - - /* (non-Javadoc) - * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) - * - * Search path for class: - * Parent ClassLoader - * This contribution - * Imported contributions - * - */ - @Override - protected synchronized Class<?> loadClass(String className, boolean resolveClass) - throws ClassNotFoundException { - - Class<?> clazz = null; - try { - - if (this.getParent() != null) - clazz = this.getParent().loadClass(className); - - } catch (ClassNotFoundException e) { - } - - if (clazz == null) - clazz = findClass(className); - - - if (resolveClass) - this.resolveClass(clazz); - return clazz; - - } - - - /* (non-Javadoc) - * @see java.lang.ClassLoader#getResource(java.lang.String) - * - * Find a resource. - * Search path for resource: - * Parent ClassLoader - * This contribution - */ - @Override - public URL getResource(String resName) { - - URL resource = null; - - if (this.getParent() != null) { - resource = this.getParent().getResource(resName); - } - if (resource == null) - resource = webModuleInfo.getModuleClassloader().getResource(resName); - - return resource; - } - - - /* (non-Javadoc) - * @see java.lang.ClassLoader#getResources(java.lang.String) - * - * Return list of resources from this contribution, resources - * imported through imported contributions and resources from parent - * ClassLoader. - */ - @Override - public Enumeration<URL> getResources(String resName) throws IOException { - - HashSet<URL> resourceSet = new HashSet<URL>(); - - addEnumerationToCollection(resourceSet, webModuleInfo.getModuleClassloader().getResources(resName)); - addEnumerationToCollection(resourceSet, super.getResources(resName)); - - return Collections.enumeration(resourceSet); - } - - - /* - * Add an enumeration to a Collection - */ - private <T extends Object> void addEnumerationToCollection(Collection<T> collection, Enumeration<T> enumeration) { - - while (enumeration.hasMoreElements()) - collection.add(enumeration.nextElement()); - } - - - @Override - public String toString() { - return "SCA WAR ClassLoader, parent ClassLoader: " + getParent(); - } - - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WARContributionClassLoaderProvider.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WARContributionClassLoaderProvider.java deleted file mode 100644 index d2af85a7d5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WARContributionClassLoaderProvider.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 org.apache.tuscany.sca.contribution.jee.impl; - -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.PackageType; -import org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider; -import org.apache.tuscany.sca.contribution.java.impl.ContributionClassLoader; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; - -/** - * The default implementation of the ContributionClassLoaderProvider - */ -public class WARContributionClassLoaderProvider implements ContributionClassLoaderProvider { - - public WARContributionClassLoaderProvider() { - super(); - } - - public String getContributionType() { - return PackageType.WAR; - } - - public ClassLoader getClassLoader(Contribution contribution, ClassLoader parent) { - // TODO - This is not quite right at the CCL will load up the nested jars - // also. However we do need to pick up the import processing so - // need a bit of a refactor - ContributionClassLoader ccl = new ContributionClassLoader(contribution, parent); - return new WARContributionClassLoader(contribution, ccl); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider deleted file mode 100644 index 460bf3206c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-org.apache.tuscany.sca.contribution.jee.impl.EARContributionClassLoaderProvider;type=application/ear
-org.apache.tuscany.sca.contribution.jee.impl.WARContributionClassLoaderProvider;type=application/war
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector deleted file mode 100644 index 35c1b709a5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.apache.tuscany.sca.contribution.jee.impl.JavaEEIntrospectorImpl
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider deleted file mode 100644 index cd81aab7a0..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for SCA Definitions Providers -org.apache.tuscany.sca.contribution.jee.JEEDefinitionsProvider
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/org/apache/tuscany/sca/contribution/jee/definitions.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/org/apache/tuscany/sca/contribution/jee/definitions.xml deleted file mode 100644 index bfc7f9097c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/contribution-jee-impl/src/main/resources/org/apache/tuscany/sca/contribution/jee/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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://www.osoa.org/xmlns/sca/1.0" - xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"> - - - <!-- JEE Intents Defined by the SCA Runtime --> - <intent name="ejb" - constrains="sca:service sca:reference"> - <description> - This intent is used to indicate that a message passing - through a service or reference observers the same rules - as if it had been received/sent by a vanilla Java EE EJB. - </description> - </intent> - -</definitions>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/NOTICE deleted file mode 100644 index d83ebbe236..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/NOTICE +++ /dev/null @@ -1,14 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2006 The Apache Software Foundation - -Apache Tuscany is an effort undergoing incubation at The Apache Software -Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is -required of all newly accepted projects until a further review indicates that -the infrastructure, communications, and decision making process have stabilized -in a manner consistent with other successful ASF projects. While incubation -status is not necessarily a reflection of the completeness or stability of the -code, it does indicate that the project has yet to be fully endorsed by the ASF. - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/pom.xml deleted file mode 100644 index 4a92847892..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-databinding-fastinfoset</artifactId> - <name>Apache Tuscany SCA Data Binding for FastInfoset</name> - <description>Tuscany FastInfoset Data Binding</description> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core-spi</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>com.sun.xml.fastinfoset</groupId> - <artifactId>FastInfoset</artifactId> - <version>1.2.2</version> - <scope>compile</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.1</version> - </dependency> - </dependencies> - <repositories> - <repository> - <snapshots> - <enabled>true</enabled> - </snapshots> - <id>java.net</id> - <name>java.net Maven 1.x Repository</name> - <url>http://download.java.net/maven/1</url> - <layout>legacy</layout> - </repository> - </repositories> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <configuration> - <instructions> - <Bundle-Version>${tuscany.version}</Bundle-Version> - <Bundle-SymbolicName>org.apache.tuscany.sca.databinding.fastinfoset</Bundle-SymbolicName> - <Bundle-Description>${pom.name}</Bundle-Description> - <Export-Package>org.apache.tuscany.sca.databinding.fastinfoset*</Export-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2Node.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2Node.java deleted file mode 100644 index 2e0aa629f3..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2Node.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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.InputStream; - -import org.apache.tuscany.sca.databinding.PullTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.apache.tuscany.sca.databinding.impl.DOMHelper; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import com.sun.xml.fastinfoset.dom.DOMDocumentParser; - -/** - * @version $Rev$ $Date$ - */ -public class FastInfoset2Node extends BaseTransformer<InputStream, Node> implements - PullTransformer<InputStream, Node> { - - @Override - protected Class<InputStream> getSourceType() { - return InputStream.class; - } - - @Override - protected Class<Node> getTargetType() { - return Node.class; - } - - public Node transform(InputStream source, TransformationContext context) { - try { - DOMDocumentParser parser = new DOMDocumentParser(); - Document doc = DOMHelper.newDocument(); - parser.parse(doc, source); - return doc.getDocumentElement(); - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public int getWeight() { - return 20; - } - - @Override - public String getSourceDataBinding() { - return "xml:fastinfoset:java.io.InputStream"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2SAX.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2SAX.java deleted file mode 100644 index 77f6b77636..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2SAX.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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.InputStream; - -import org.apache.tuscany.sca.databinding.PushTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.xml.sax.ContentHandler; - -import com.sun.xml.fastinfoset.sax.SAXDocumentParser; - -/** - * @version $Rev$ $Date$ - */ -public class FastInfoset2SAX extends BaseTransformer<InputStream, ContentHandler> implements - PushTransformer<InputStream, ContentHandler> { - - @Override - protected Class<InputStream> getSourceType() { - return InputStream.class; - } - - @Override - protected Class<ContentHandler> getTargetType() { - return ContentHandler.class; - } - - - /** - * @see org.apache.tuscany.sca.databinding.PushTransformer#transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext) - */ - public void transform(InputStream source, ContentHandler target, TransformationContext context) { - try { - SAXDocumentParser parser = new SAXDocumentParser(); - parser.setContentHandler(target); - parser.parse(source); - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public int getWeight() { - return 20; - } - - @Override - public String getSourceDataBinding() { - return "xml:fastinfoset:java.io.InputStream"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2XMLStreamReader.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2XMLStreamReader.java deleted file mode 100644 index 73d549f4f8..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfoset2XMLStreamReader.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.InputStream; - -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sca.databinding.PullTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; - -import com.sun.xml.fastinfoset.stax.StAXDocumentParser; - -/** - * @version $Rev$ $Date$ - */ -public class FastInfoset2XMLStreamReader extends BaseTransformer<InputStream, XMLStreamReader> implements - PullTransformer<InputStream, XMLStreamReader> { - - @Override - protected Class<InputStream> getSourceType() { - return InputStream.class; - } - - @Override - protected Class<XMLStreamReader> getTargetType() { - return XMLStreamReader.class; - } - - public XMLStreamReader transform(InputStream source, TransformationContext context) { - try { - StAXDocumentParser parser = new StAXDocumentParser(source); - return parser; - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public int getWeight() { - return 20; - } - - @Override - public String getSourceDataBinding() { - return "xml:fastinfoset:java.io.InputStream"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/Node2FastInfoset.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/Node2FastInfoset.java deleted file mode 100644 index 1c12a5dcad..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/Node2FastInfoset.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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.OutputStream; - -import org.apache.tuscany.sca.databinding.PushTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.w3c.dom.Node; - -import com.sun.xml.fastinfoset.dom.DOMDocumentSerializer; - -/** - * @version $Rev$ $Date$ - */ -public class Node2FastInfoset extends BaseTransformer<Node, OutputStream> implements - PushTransformer<Node, OutputStream> { - - @Override - protected Class<Node> getSourceType() { - return Node.class; - } - - @Override - protected Class<OutputStream> getTargetType() { - return OutputStream.class; - } - - - /** - * @see org.apache.tuscany.sca.databinding.PushTransformer#transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext) - */ - public void transform(Node source, OutputStream target, TransformationContext context) { - try { - DOMDocumentSerializer serializer = new DOMDocumentSerializer(); - serializer.setOutputStream(target); - serializer.serialize(source); - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public int getWeight() { - return 20; - } - - @Override - public String getTargetDataBinding() { - return "xml:fastinfoset:java.io.OutputStream"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/XMLInputStream2FastInfoset.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/XMLInputStream2FastInfoset.java deleted file mode 100644 index b0d56b3bb6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/XMLInputStream2FastInfoset.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.InputStream; -import java.io.OutputStream; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.apache.tuscany.sca.databinding.PushTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; - -import com.sun.xml.fastinfoset.sax.SAXDocumentSerializer; - -/** - * @version $Rev$ $Date$ - */ -public class XMLInputStream2FastInfoset extends BaseTransformer<InputStream, OutputStream> implements - PushTransformer<InputStream, OutputStream> { - - @Override - protected Class<InputStream> getSourceType() { - return InputStream.class; - } - - @Override - protected Class<OutputStream> getTargetType() { - return OutputStream.class; - } - - /** - * @see org.apache.tuscany.sca.databinding.PushTransformer#transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext) - */ - public void transform(InputStream source, OutputStream target, TransformationContext context) { - try { - - // Create Fast Infoset SAX serializer - SAXDocumentSerializer saxDocumentSerializer = new SAXDocumentSerializer(); - // Set the output stream - saxDocumentSerializer.setOutputStream(target); - - // Instantiate JAXP SAX parser factory - SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); - /* Set parser to be namespace aware - * Very important to do otherwise invalid FI documents will be - * created by the SAXDocumentSerializer - */ - saxParserFactory.setNamespaceAware(true); - // Instantiate the JAXP SAX parser - SAXParser saxParser = saxParserFactory.newSAXParser(); - // Set the lexical handler - saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", saxDocumentSerializer); - // Parse the XML document and convert to a fast infoset document - saxParser.parse(source, saxDocumentSerializer); - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public int getWeight() { - return 20; - } - - @Override - public String getTargetDataBinding() { - return "xml:fastinfoset:java.io.OutputStream"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/XMLStreamReader2FastInfoset.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/XMLStreamReader2FastInfoset.java deleted file mode 100644 index d18206600c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/java/org/apache/tuscany/sca/databinding/fastinfoset/XMLStreamReader2FastInfoset.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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.OutputStream; - -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sca.databinding.PushTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer; - -import com.sun.xml.fastinfoset.stax.StAXDocumentSerializer; - -/** - * @version $Rev$ $Date$ - */ -public class XMLStreamReader2FastInfoset extends BaseTransformer<XMLStreamReader, OutputStream> implements - PushTransformer<XMLStreamReader, OutputStream> { - - @Override - protected Class<XMLStreamReader> getSourceType() { - return XMLStreamReader.class; - } - - @Override - protected Class<OutputStream> getTargetType() { - return OutputStream.class; - } - - - /** - * @see org.apache.tuscany.sca.databinding.PushTransformer#transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext) - */ - public void transform(XMLStreamReader source, OutputStream target, TransformationContext context) { - try { - StAXDocumentSerializer serializer = new StAXDocumentSerializer(target); - XMLStreamSerializer streamSerializer = new XMLStreamSerializer(); - streamSerializer.serialize(source, serializer); - serializer.flush(); - source.close(); - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public int getWeight() { - return 20; - } - - @Override - public String getTargetDataBinding() { - return "xml:fastinfoset:java.io.OutputStream"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer deleted file mode 100644 index ea47ee7191..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer +++ /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. - -# Implementation classes for the transformers -org.apache.tuscany.sca.databinding.fastinfoset.FastInfoset2Node;source=xml:fastinfoset:java.io.InputStream,target=org.w3c.dom.Node,weight=100 -org.apache.tuscany.sca.databinding.fastinfoset.FastInfoset2XMLStreamReader;source=xml:fastinfoset:java.io.InputStream,target=javax.xml.stream.XMLStreamReader,weight=80 - - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PushTransformer b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PushTransformer deleted file mode 100644 index 1610b4f54d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PushTransformer +++ /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. - -# Implementation classes for the transformers -org.apache.tuscany.sca.databinding.fastinfoset.FastInfoset2SAX;source=xml:fastinfoset:java.io.InputStream,target=org.xml.sax.ContentHandler ,weight=80 -org.apache.tuscany.sca.databinding.fastinfoset.Node2FastInfoset;source=org.w3c.dom.Node,target=xml:fastinfoset:java.io.OutputStream,weight=100 -org.apache.tuscany.sca.databinding.fastinfoset.XMLInputStream2FastInfoset;source=java.io.InputStream,target=xml:fastinfoset:java.io.OutputStream,weight=120 -org.apache.tuscany.sca.databinding.fastinfoset.XMLStreamReader2FastInfoset;source=javax.xml.stream.XMLStreamReader,target=xml:fastinfoset:java.io.OutputStream,weight=70 diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/test/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfosetTransformerTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/test/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfosetTransformerTestCase.java deleted file mode 100644 index bb8adf39be..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/test/java/org/apache/tuscany/sca/databinding/fastinfoset/FastInfosetTransformerTestCase.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 org.apache.tuscany.sca.databinding.fastinfoset; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.io.StringReader; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.databinding.xml.InputStream2Node; -import org.apache.tuscany.sca.databinding.xml.Node2OutputStream; -import org.apache.tuscany.sca.databinding.xml.Node2String; -import org.w3c.dom.Node; - -/** - * - * @version $Rev$ $Date$ - */ -public class FastInfosetTransformerTestCase extends TestCase { - private static final String IPO_XML = - "<?xml version=\"1.0\"?>" + "<ipo:purchaseOrder" - + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" - + " xmlns:ipo=\"http://www.example.com/IPO\"" - + " xsi:schemaLocation=\"http://www.example.com/IPO ipo.xsd\"" - + " orderDate=\"1999-12-01\">" - + " <shipTo exportCode=\"1\" xsi:type=\"ipo:UKAddress\">" - + " <name>Helen Zoe</name>" - + " <street>47 Eden Street</street>" - + " <city>Cambridge</city>" - + " <postcode>CB1 1JR</postcode>" - + " </shipTo>" - + " <billTo xsi:type=\"ipo:USAddress\">" - + " <name>Robert Smith</name>" - + " <street>8 Oak Avenue</street>" - + " <city>Old Town</city>" - + " <state>PA</state>" - + " <zip>95819</zip>" - + " </billTo>" - + " <items>" - + " <item partNum=\"833-AA\">" - + " <productName>Lapis necklace</productName>" - + " <quantity>1</quantity>" - + " <USPrice>99.95</USPrice>" - + " <ipo:comment>Want this for the holidays</ipo:comment>" - + " <shipDate>1999-12-05</shipDate>" - + " </item>" - + " </items>" - + "</ipo:purchaseOrder>"; - - public void testXML2FastInfoset() throws Exception { - XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(IPO_XML)); - XMLStreamReader2FastInfoset t1 = new XMLStreamReader2FastInfoset(); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - - t1.transform(reader, bos, null); - // System.out.println(bos.toString()); - - ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); - FastInfoset2Node t2 = new FastInfoset2Node(); - Node node = t2.transform(bis, null); - String xml = new Node2String().transform(node, null); - - // System.out.println(xml); - - } - - public void testPerf() throws Exception { - byte[] str = IPO_XML.getBytes(); - ByteArrayInputStream bis = new ByteArrayInputStream(str); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - XMLInputStream2FastInfoset t = new XMLInputStream2FastInfoset(); - t.transform(bis, bos, null); - byte[] fast = bos.toByteArray(); - System.out.println(str.length + ".vs." + fast.length); - - long d1 = 0L; - long d2 = 0L; - for (int i = 0; i < 100; i++) { - InputStream2Node t1 = new InputStream2Node(); - FastInfoset2Node t2 = new FastInfoset2Node(); - InputStream is1 = new ByteArrayInputStream(str); - InputStream is2 = new ByteArrayInputStream(fast); - long s1 = System.currentTimeMillis(); - Node n1 = t1.transform(is1, null); - long s2 = System.currentTimeMillis(); - Node n2 = t2.transform(is2, null); - long s3 = System.currentTimeMillis(); - d1 += s2 - s1; // from plain xml - d2 += s3 - s2; // from fastinfoset - Node2OutputStream t3 = new Node2OutputStream(); - Node2FastInfoset t4 = new Node2FastInfoset(); - ByteArrayOutputStream os1 = new ByteArrayOutputStream(); - ByteArrayOutputStream os2 = new ByteArrayOutputStream(); - long s4 = System.currentTimeMillis(); - t3.transform(n1, os1, null); - long s5 = System.currentTimeMillis(); - t4.transform(n2, os2, null); - long s6 = System.currentTimeMillis(); - d1 += s5 - s4; // to plain xml - d2 += s6 - s5; // to fastinfoset - } - System.out.println("POX " + d1 + ".vs. FIS " + d2); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/test/resources/ipo.xsd b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/test/resources/ipo.xsd deleted file mode 100644 index 5a493e1746..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-fastinfoset/src/test/resources/ipo.xsd +++ /dev/null @@ -1,136 +0,0 @@ -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<schema targetNamespace="http://www.example.com/IPO" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ipo="http://www.example.com/IPO"> - - <annotation> - <documentation xml:lang="en"> - International Purchase order schema for Example.com - Copyright 2000 Example.com. All rights reserved. - </documentation> - </annotation> - - - <element name="purchaseOrder" type="ipo:PurchaseOrderType" /> - - <element name="comment" type="string" /> - - <complexType name="PurchaseOrderType"> - <sequence> - <element name="shipTo" type="ipo:Address" /> - <element name="billTo" type="ipo:Address" /> - <element ref="ipo:comment" minOccurs="0" /> - <element name="items" type="ipo:Items" /> - </sequence> - <attribute name="orderDate" type="date" /> - </complexType> - - <complexType name="Items"> - <sequence> - <element name="item" minOccurs="0" maxOccurs="unbounded"> - <complexType> - <sequence> - <element name="productName" type="string" /> - <element name="quantity"> - <simpleType> - <restriction base="positiveInteger"> - <maxExclusive value="100" /> - </restriction> - </simpleType> - </element> - <element name="USPrice" type="decimal" /> - <element ref="ipo:comment" minOccurs="0" /> - <element name="shipDate" type="date" - minOccurs="0" /> - </sequence> - <attribute name="partNum" type="ipo:SKU" - use="required" /> - </complexType> - </element> - </sequence> - </complexType> - - <simpleType name="SKU"> - <restriction base="string"> - <pattern value="\d{3}-[A-Z]{2}" /> - </restriction> - </simpleType> - - <complexType name="Address"> - <sequence> - <element name="name" type="string" /> - <element name="street" type="string" /> - <element name="city" type="string" /> - </sequence> - </complexType> - - <complexType name="USAddress"> - <complexContent> - <extension base="ipo:Address"> - <sequence> - <element name="state" type="ipo:USState" /> - <element name="zip" type="positiveInteger" /> - </sequence> - </extension> - </complexContent> - </complexType> - - <complexType name="UKAddress"> - <complexContent> - <extension base="ipo:Address"> - <sequence> - <element name="postcode" type="ipo:UKPostcode" /> - </sequence> - <attribute name="exportCode" type="positiveInteger" - fixed="1" /> - </extension> - </complexContent> - </complexType> - - <!-- other Address derivations for more countries --> - - <simpleType name="USState"> - <restriction base="string"> - <enumeration value="AK" /> - <enumeration value="AL" /> - <enumeration value="AR" /> - <enumeration value="CA" /> - <enumeration value="PA" /> - <!-- and so on ... --> - </restriction> - </simpleType> - - <simpleType name="Postcode"> - <restriction base="string"> - <length value="7" fixed="true" /> - </restriction> - </simpleType> - - - <simpleType name="UKPostcode"> - <restriction base="ipo:Postcode"> - <pattern value="[A-Z]{2}\d\s\d[A-Z]{2}" /> - </restriction> - </simpleType> - - - -</schema> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/pom.xml deleted file mode 100644 index 7a45d9a6ca..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-databinding-xstream</artifactId> - <name>Apache Tuscany SCA Data Binding for XStream</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core-spi</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>javax.xml.stream</groupId> - <artifactId>stax-api</artifactId> - <version>1.0-2</version> - </dependency> - - <dependency> - <groupId>com.thoughtworks.xstream</groupId> - <artifactId>xstream</artifactId> - <version>1.3</version> - </dependency> - - <dependency> - <groupId>org.apache.ws.commons.axiom</groupId> - <artifactId>axiom-api</artifactId> - <exclusions> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - </exclusion> - </exclusions> - <version>1.2.7</version> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.ws.commons.axiom</groupId> - <artifactId>axiom-impl</artifactId> - <version>1.2.7</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.1.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.codehaus.woodstox</groupId> - <artifactId>wstx-asl</artifactId> - <version>3.2.4</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - </dependencies> - - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <configuration> - <instructions> - <Bundle-Version>${tuscany.version}</Bundle-Version> - <Bundle-SymbolicName>org.apache.tuscany.sca.databinding.xstream</Bundle-SymbolicName> - <Bundle-Description>${pom.name}</Bundle-Description> - <Export-Package>org.apache.tuscany.sca.databinding.xstream*</Export-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/MetaObject.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/MetaObject.java deleted file mode 100644 index 4c57cfe06b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/MetaObject.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 org.apache.tuscany.sca.databinding.xstream; - -/** - * Wrapper for XObject - * @version $Rev$ $Date$ - */ -public interface MetaObject { - void setName(String name); - - String getName(); - - Class<?> getType(); - - String getID(); - - XObject getInstance(); - //byte[] getByteCode(); -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/MetaObjectImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/MetaObjectImpl.java deleted file mode 100644 index d223a4db23..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/MetaObjectImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.databinding.xstream; - -import java.io.FileNotFoundException; -import java.io.IOException; - -/** - * Implementation of a wrapper for XObject. - * - * @version $Rev$ $Date$ - */ -public class MetaObjectImpl implements MetaObject { - private String obID; - private String name; - private XObject obInstance; - - //private byte[] bytecode = null; - - public MetaObjectImpl() { - this.obID = Utils.uniqueID(); - } - - public MetaObjectImpl(XObject x) { - //this.name = path; - this.obID = Utils.uniqueID(); - this.obInstance = x; - - try { - initMetaOb(this.obInstance.getClass()); - - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - private void initMetaOb(Class<?> class1) throws FileNotFoundException, IOException { - /* - File file = new File(cname); - DataInputStream cstream = new DataInputStream(new FileInputStream(file)); - bytecode = new byte[(int)file.length()]; - cstream.readFully(bytecode); - */ - name = class1.getName(); - - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public String getID() { - return obID; - } - - public Class<?> getType() { - - return this.obInstance.getClass(); - } - - public XObject getInstance() { - return this.obInstance; - } - /* - * TODO Add bytecode with Serialization - public byte[] getByteCode() { - return bytecode; - } - */ - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/Node2XObject.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/Node2XObject.java deleted file mode 100644 index 2b7fa9d506..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/Node2XObject.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 org.apache.tuscany.sca.databinding.xstream; - -import org.apache.tuscany.sca.databinding.PullTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.xml.DomReader; - -/** - * DOM Node --> XStream transformer - * - * @version $Rev$ $Date$ - */ -public class Node2XObject extends BaseTransformer<Node, XObject> implements PullTransformer<Node, XObject> { - - public XObject transform(Node source, TransformationContext context) { - try { - DomReader in = null; - if (source instanceof Document) { - in = new DomReader((Document)source); - } else if (source instanceof Element) { - in = new DomReader((Element)source); - } - XStream xs = new XStream(); - return (XObject)xs.unmarshal(in); - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public Class<Node> getSourceType() { - return Node.class; - } - - @Override - public Class<XObject> getTargetType() { - return XObject.class; - } - - @Override - public int getWeight() { - return 10; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/OMElement2XObject.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/OMElement2XObject.java deleted file mode 100644 index a465e92e65..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/OMElement2XObject.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 org.apache.tuscany.sca.databinding.xstream; - -import java.io.StringWriter; - -import javax.xml.stream.XMLStreamException; - -import org.apache.axiom.om.OMElement; -import org.apache.tuscany.sca.databinding.PullTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; - -import com.thoughtworks.xstream.XStream; - -/** - * Job DataObject --> AXIOM OMElement transformer - * - * @version $Rev$ $Date$ - */ -public class OMElement2XObject extends BaseTransformer<OMElement, XObject> implements - PullTransformer<OMElement, XObject> { - - public XObject transform(OMElement source, TransformationContext context) { - - XStream xs = new XStream(); - xs.alias("xobject", MetaObjectImpl.class); - MetaObjectImpl mo; - try { - java.io.StringWriter writer = new StringWriter(); - source.serialize(writer); - String w = writer.toString(); - // FIXME: a better way to get eliminate param0 - w = w.replaceAll("param0", "xobject"); - w = w.replaceAll("xmlns=\"\"", ""); - mo = (MetaObjectImpl)xs.fromXML(w.trim()); - return mo.getInstance(); - } catch (XMLStreamException e) { - - e.printStackTrace(); - } - return null; - } - - @Override - public Class<OMElement> getSourceType() { - return OMElement.class; - } - - @Override - public Class<XObject> getTargetType() { - return XObject.class; - } - - @Override - public int getWeight() { - return 10; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/Utils.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/Utils.java deleted file mode 100644 index d819975910..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/Utils.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.databinding.xstream; - -import java.io.IOException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; - -/** - * Utility methods. - * - * @version $Rev$ $Date$ - */ -public class Utils { - public static String toBase64(byte[] array) { - String code = null; - code = new sun.misc.BASE64Encoder().encode(array); - return code; - } - - public static byte[] fromBase64(String bytecode) { - byte[] dec = null; - try { - dec = new sun.misc.BASE64Decoder().decodeBuffer(bytecode); - } catch (IOException e) { - e.printStackTrace(); - } - return dec; - } - - public static String uniqueID() { - try { - //Initialize SecureRandom - //This is a lengthy operation, to be done only upon - //initialization of the application - SecureRandom prng = SecureRandom.getInstance("SHA1PRNG"); - - //generate a random number - String randomNum = Integer.toString(prng.nextInt()); - - //get its digest - MessageDigest sha = MessageDigest.getInstance("SHA-1"); - byte[] result = sha.digest(randomNum.getBytes()); - return hexEncode(result); - } catch (NoSuchAlgorithmException ex) { - ex.printStackTrace(); - } - return null; - } - - private static String hexEncode(byte[] aInput) { - StringBuffer result = new StringBuffer(); - char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; - for (int idx = 0; idx < aInput.length; ++idx) { - byte b = aInput[idx]; - result.append(digits[(b & 0xf0) >> 4]); - result.append(digits[b & 0x0f]); - } - return result.toString(); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject.java deleted file mode 100644 index 21112efcf5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject.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 org.apache.tuscany.sca.databinding.xstream; - -/** - * Marker interface for XStream Serializable objects - * - * @version $Rev$ $Date$ - */ -// FIXME: Why do we require a marker interface? -public interface XObject { -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject2Node.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject2Node.java deleted file mode 100644 index 98e0e69f9b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject2Node.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 org.apache.tuscany.sca.databinding.xstream; - -import org.apache.tuscany.sca.databinding.PullTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.apache.tuscany.sca.databinding.impl.DOMHelper; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.xml.DomWriter; - -/** - * XObject --> DOM Node transformer - * - * @version $Rev$ $Date$ - */ -public class XObject2Node extends BaseTransformer<XObject, Node> implements PullTransformer<XObject, Node> { - - public Node transform(XObject source, TransformationContext context) { - try { - MetaObject mj = new MetaObjectImpl(source); - Document root = DOMHelper.newDocument(); - DomWriter out = new DomWriter(DOMHelper.newDocument()); - XStream xs = new XStream(); - xs.alias("xobject", mj.getClass()); - xs.marshal(source, out); - DOMHelper.adjustElementName(context, root.getDocumentElement()); - return root; - } catch (Exception e) { - throw new TransformationException(e); - } - } - - @Override - public Class<XObject> getSourceType() { - return XObject.class; - } - - @Override - public Class<Node> getTargetType() { - return Node.class; - } - - @Override - public int getWeight() { - return 10; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject2OMElement.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject2OMElement.java deleted file mode 100644 index ff4305491a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObject2OMElement.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.databinding.xstream; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; - -import javax.xml.namespace.QName; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; -import org.apache.tuscany.sca.databinding.PullTransformer; -import org.apache.tuscany.sca.databinding.TransformationContext; -import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.impl.BaseTransformer; -import org.apache.tuscany.sca.interfacedef.DataType; -import org.apache.tuscany.sca.interfacedef.util.XMLType; - -import com.thoughtworks.xstream.XStream; - -/** - * XObject --> AXIOM OMElement transformer - * - * @version $Rev$ $Date$ - */ -public class XObject2OMElement extends BaseTransformer<XObject, OMElement> implements - PullTransformer<XObject, OMElement> { - - public OMElement transform(XObject source, TransformationContext context) { - MetaObject mj = new MetaObjectImpl(source); - OMElement element = null; - ByteArrayOutputStream out = new ByteArrayOutputStream(); - XStream xs = new XStream(); - xs.alias("xobject", mj.getClass()); - xs.toXML(mj, out); - /* TODO: Maybe a base64 conversion...? or not? - * ie. new ByteArrayInputStream(Utils.toBase64(out.toByteArray()).getBytes()) - */ - try { - // what's better this one: - StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(out.toByteArray())); - // or this one: - // StaAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(Utils.toBase64(out.toByteArray()).getBytes())) - element = builder.getDocumentElement(); - adjustElementName(context, element); - } catch (Exception e) { - throw new TransformationException(e); - } - return element; - - } - - private static void adjustElementName(TransformationContext context, OMElement element) { - if (context != null) { - DataType dataType = context.getTargetDataType(); - Object logical = dataType == null ? null : dataType.getLogical(); - if (!(logical instanceof XMLType)) { - return; - } - XMLType xmlType = (XMLType)logical; - if (xmlType.isElement() && !xmlType.getElementName().equals(element.getQName())) { - // FIXME:: Throw exception or switch to the new Element? - OMFactory factory = OMAbstractFactory.getOMFactory(); - QName name = xmlType.getElementName(); - OMNamespace namespace = factory.createOMNamespace(name.getNamespaceURI(), name.getPrefix()); - element.setNamespace(namespace); - element.setLocalName(name.getLocalPart()); - } - } - } - - @Override - public Class<XObject> getSourceType() { - return XObject.class; - } - - @Override - public Class<OMElement> getTargetType() { - return OMElement.class; - } - - @Override - public int getWeight() { - return 10; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObjectDataBinding.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObjectDataBinding.java deleted file mode 100644 index b319c7d557..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/java/org/apache/tuscany/sca/databinding/xstream/XObjectDataBinding.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 org.apache.tuscany.sca.databinding.xstream; - -import org.apache.tuscany.sca.databinding.impl.BaseDataBinding; - -/** - * DataBinding for Jobs - * - * @version $Rev$ $Date$ - */ -public class XObjectDataBinding extends BaseDataBinding { - - public static final String NAME = XObject.class.getName(); - - public XObjectDataBinding() { - super(NAME, XObject.class); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.DataBinding b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.DataBinding deleted file mode 100644 index e2f467b8dd..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.DataBinding +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# implementation classes for the databindings
-org.apache.tuscany.sca.databinding.xstream.XObjectDataBinding;name=org.apache.tuscany.sca.databinding.xstream.XObject
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer deleted file mode 100644 index a733ad7b7d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-org.apache.tuscany.sca.databinding.xstream.XObject2OMElement;source=org.apache.tuscany.sca.databinding.xstream.XObject,target=org.apache.axiom.om.OMElement,weight=10
-org.apache.tuscany.sca.databinding.xstream.OMElement2XObject;source=org.apache.axiom.om.OMElement,target=org.apache.tuscany.sca.databinding.xstream.XObject,weight=10
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/ipo.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/ipo.xml deleted file mode 100644 index 1699538d62..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/ipo.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<ipo:purchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipo="http://www.example.com/IPO" - xsi:schemaLocation="http://www.example.com/IPO ipo.xsd" orderDate="1999-12-01"> - - <shipTo exportCode="1" xsi:type="ipo:UKAddress"> - <name>Helen Zoe</name> - <street>47 Eden Street</street> - <city>Cambridge</city> - <postcode>CB1 1JR</postcode> - </shipTo> - - <billTo xsi:type="ipo:USAddress"> - <name>Robert Smith</name> - <street>8 Oak Avenue</street> - <city>Old Town</city> - <state>PA</state> - <zip>95819</zip> - </billTo> - - <items> - <item partNum="833-AA"> - <productName>Lapis necklace</productName> - <quantity>1</quantity> - <USPrice>99.95</USPrice> - <ipo:comment>Want this for the holidays</ipo:comment> - <shipDate>1999-12-05</shipDate> - </item> - </items> -</ipo:purchaseOrder> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/ipo.xsd b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/ipo.xsd deleted file mode 100644 index aac7ded180..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/ipo.xsd +++ /dev/null @@ -1,132 +0,0 @@ -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> - -<schema targetNamespace="http://www.example.com/IPO" xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ipo="http://www.example.com/IPO"> - - <annotation> - <documentation xml:lang="en"> - International Purchase order schema for Example.com Copyright 2000 Example.com. All rights reserved. - </documentation> - </annotation> - - - <element name="purchaseOrder" type="ipo:PurchaseOrderType" /> - - <element name="comment" type="string" /> - - <complexType name="PurchaseOrderType"> - <sequence> - <element name="shipTo" type="ipo:Address" /> - <element name="billTo" type="ipo:Address" /> - <element ref="ipo:comment" minOccurs="0" /> - <element name="items" type="ipo:Items" /> - </sequence> - <attribute name="orderDate" type="date" /> - </complexType> - - <complexType name="Items"> - <sequence> - <element name="item" minOccurs="0" maxOccurs="unbounded"> - <complexType> - <sequence> - <element name="productName" type="string" /> - <element name="quantity"> - <simpleType> - <restriction base="positiveInteger"> - <maxExclusive value="100" /> - </restriction> - </simpleType> - </element> - <element name="USPrice" type="decimal" /> - <element ref="ipo:comment" minOccurs="0" /> - <element name="shipDate" type="date" minOccurs="0" /> - </sequence> - <attribute name="partNum" type="ipo:SKU" use="required" /> - </complexType> - </element> - </sequence> - </complexType> - - <simpleType name="SKU"> - <restriction base="string"> - <pattern value="\d{3}-[A-Z]{2}" /> - </restriction> - </simpleType> - - <complexType name="Address"> - <sequence> - <element name="name" type="string" /> - <element name="street" type="string" /> - <element name="city" type="string" /> - </sequence> - </complexType> - - <complexType name="USAddress"> - <complexContent> - <extension base="ipo:Address"> - <sequence> - <element name="state" type="ipo:USState" /> - <element name="zip" type="positiveInteger" /> - </sequence> - </extension> - </complexContent> - </complexType> - - <complexType name="UKAddress"> - <complexContent> - <extension base="ipo:Address"> - <sequence> - <element name="postcode" type="ipo:UKPostcode" /> - </sequence> - <attribute name="exportCode" type="positiveInteger" fixed="1" /> - </extension> - </complexContent> - </complexType> - - <!-- other Address derivations for more countries --> - - <simpleType name="USState"> - <restriction base="string"> - <enumeration value="AK" /> - <enumeration value="AL" /> - <enumeration value="AR" /> - <enumeration value="CA" /> - <enumeration value="PA" /> - <!-- and so on ... --> - </restriction> - </simpleType> - - <simpleType name="Postcode"> - <restriction base="string"> - <length value="7" fixed="true" /> - </restriction> - </simpleType> - - - <simpleType name="UKPostcode"> - <restriction base="ipo:Postcode"> - <pattern value="[A-Z]{2}\d\s\d[A-Z]{2}" /> - </restriction> - </simpleType> - - - -</schema> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/order.wsdl b/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/order.wsdl deleted file mode 100644 index 65da5b602a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/databinding-xstream/src/test/resources/order.wsdl +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<definitions name="StockQuote" targetNamespace="http://example.com/order.wsdl" xmlns:tns="http://example.com/order.wsdl"
- xmlns:xsd1="http://example.com/order.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <schema targetNamespace="http://example.com/order.xsd" xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ipo="http://www.example.com/IPO">
- <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd" />
- <element name="checkOrderStatus">
- <complexType>
- <sequence>
- <element name="customerId" type="string" />
- <element name="order" type="ipo:PurchaseOrderType" />
- <element name="flag" type="int" />
- </sequence>
- </complexType>
- </element>
- <element name="checkOrderStatusResponse">
- <complexType>
- <sequence>
- <element name="status" type="string" />
- </sequence>
- </complexType>
- </element>
- <element name="note" type="string" />
- </schema>
- </types>
-
- <message name="CheckOrderStatusInput1">
- <part name="body" element="xsd1:checkOrderStatus" />
- </message>
-
- <message name="CheckOrderStatusOutput1">
- <part name="body" element="xsd1:checkOrderStatusResponse" />
- </message>
-
- <message name="CheckOrderStatusInput2">
- <part name="p1" element="xsd1:checkOrderStatus" />
- <part name="p2" element="xsd1:note" />
- </message>
-
- <message name="CheckOrderStatusOutput2">
- <part name="p1" element="xsd1:checkOrderStatusResponse" />
- </message>
-
- <portType name="OrderPortType">
- <operation name="checkOrderStatus">
- <input message="tns:CheckOrderStatusInput1" />
- <output message="tns:CheckOrderStatusOutput1" />
- </operation>
- <operation name="checkOrderStatus2">
- <input message="tns:CheckOrderStatusInput2" />
- <output message="tns:CheckOrderStatusOutput2" />
- </operation>
- </portType>
-
-</definitions>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/NOTICE deleted file mode 100644 index 6d6a276d96..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/pom.xml deleted file mode 100644 index 8745b2a90e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-extensibility-equinox</artifactId> - <name>Apache Tuscany SCA Extensibility for Eclipse Equinox</name> - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-extensibility</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.eclipse</groupId> - <artifactId>osgi</artifactId> - <version>3.3.0-v20070530</version> - <scope>compile</scope> - </dependency> - - <!-- - Exclude org.eclipse.equinox:app to avoid maven bug/bad equinox version scheme. i.e.: - - Couldn't find a version in [1.0.0-v20070606] to match range [1.0.0,2.0.0) - org.eclipse.equinox:app:jar:null - --> - <dependency> - <groupId>org.eclipse.core</groupId> - <artifactId>runtime</artifactId> - <version>3.3.100-v20070530</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.eclipse.equinox</groupId> - <artifactId>app</artifactId> - </exclusion> - </exclusions> - </dependency> - - <!-- - Now include org.eclipse.equinox:app explicitly - --> - <dependency> - <groupId>org.eclipse.equinox</groupId> - <artifactId>app</artifactId> - <version>1.0.0-v20070606</version> - <scope>test</scope> - </dependency> - - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.0</version> - <executions> - <execution> - <id>copy-dependencies</id> - <phase>process-test-resources</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/bundles</outputDirectory> - <excludeArtifactIds>osgi,junit,easymock,tuscany-extensibility</excludeArtifactIds> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-Version>${tuscany.version}</Bundle-Version> - <Bundle-SymbolicName>org.apache.tuscany.sca.extensibility.equinox</Bundle-SymbolicName> - <Bundle-Description>${pom.name}</Bundle-Description> - <Bundle-Activator>org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoveryActivator</Bundle-Activator> - <Export-Package>org.apache.tuscany.sca.extensibility.equinox*</Export-Package> - <Eclipse-LazyStart>true</Eclipse-LazyStart> - <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy> - <DynamicImport-Package>*</DynamicImport-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java deleted file mode 100644 index 5ab5a66077..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.extensibility.equinox; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.Arrays; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.StringTokenizer; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.apache.tuscany.sca.extensibility.ServiceDeclaration; -import org.apache.tuscany.sca.extensibility.ServiceDiscoverer; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * A ServiceDiscoverer that find META-INF/services/... in installed bundles - * - * @version $Rev$ $Date$ - */ -public class EquinoxServiceDiscoverer implements ServiceDiscoverer { - private static final Logger logger = Logger.getLogger(EquinoxServiceDiscoverer.class.getName()); - - private BundleContext context; - - public EquinoxServiceDiscoverer(BundleContext context) { - this.context = context; - } - - public static class ServiceDeclarationImpl implements ServiceDeclaration { - private Bundle bundle; - private URL url; - private String className; - private Class<?> javaClass; - private Map<String, String> attributes; - - public ServiceDeclarationImpl(Bundle bundle, URL url, String className, Map<String, String> attributes) { - super(); - this.bundle = bundle; - this.url = url; - this.className = className; - this.attributes = attributes; - } - - public Map<String, String> getAttributes() { - return attributes; - } - - public String getClassName() { - return className; - } - - public Class<?> loadClass() throws ClassNotFoundException { - if (className == null) { - return null; - } - if (javaClass == null) { - javaClass = loadClass(className); - } - return javaClass; - } - - public Class<?> loadClass(String className) throws ClassNotFoundException { - return bundle.loadClass(className); - } - - public URL getLocation() { - return url; - } - - public URL getResource(final String name) { - return AccessController.doPrivileged(new PrivilegedAction<URL>() { - public URL run() { - return bundle.getResource(name); - } - }); - } - - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append("Bundle: ").append(EquinoxServiceDiscoverer.toString(bundle)); - sb.append(" Resource: ").append(url); - sb.append(" Attributes: ").append(attributes); - return sb.toString(); - } - - } - - public static void init() { - // Empty static method to trigger the activation of this bundle - } - - private static String toString(Bundle b) { - StringBuffer sb = new StringBuffer(); - sb.append(b.getBundleId()).append(" ").append(b.getSymbolicName()); - int s = b.getState(); - if ((s & Bundle.UNINSTALLED) != 0) { - sb.append(" UNINSTALLED"); - } - if ((s & Bundle.INSTALLED) != 0) { - sb.append(" INSTALLED"); - } - if ((s & Bundle.RESOLVED) != 0) { - sb.append(" RESOLVED"); - } - if ((s & Bundle.STARTING) != 0) { - sb.append(" STARTING"); - } - if ((s & Bundle.STOPPING) != 0) { - sb.append(" STOPPING"); - } - if ((s & Bundle.ACTIVE) != 0) { - sb.append(" ACTIVE"); - } - return sb.toString(); - - } - - /** - * Parse a service declaration in the form class;attr=value,attr=value and - * return a map of attributes - * - * @param declaration - * @return a map of attributes - */ - private static Map<String, String> parseServiceDeclaration(String declaration) { - Map<String, String> attributes = new HashMap<String, String>(); - int index = declaration.indexOf(';'); - if (index != -1) { - attributes.put("class", declaration.substring(0, index).trim()); - declaration = declaration.substring(index); - } else { - int j = declaration.indexOf('='); - if (j == -1) { - attributes.put("class", declaration.trim()); - return attributes; - } else { - declaration = ";" + declaration; - } - } - StringTokenizer tokens = new StringTokenizer(declaration); - for (; tokens.hasMoreTokens();) { - String key = tokens.nextToken("=").substring(1).trim(); - if (key == null) - break; - String value = tokens.nextToken(",").substring(1).trim(); - if (value == null) - break; - attributes.put(key, value); - } - return attributes; - } - - public Set<ServiceDeclaration> discover(String serviceName, boolean firstOnly) { - boolean debug = logger.isLoggable(Level.FINE); - Set<ServiceDeclaration> descriptors = new HashSet<ServiceDeclaration>(); - - serviceName = "META-INF/services/" + serviceName; - - for (Bundle bundle : context.getBundles()) { - if (bundle.getBundleId() == 0) { - // Skip system bundle as it has access to the application classloader - continue; - } - Enumeration<URL> urls = null; - try { - // Use getResources to find resources on the classpath of the bundle - // Please note if there is an DynamicImport-Package=*, and another bundle - // exports the resource package, there is a possiblity that it doesn't - // find the containing entry - urls = bundle.getResources(serviceName); - if (urls == null) { - URL entry = bundle.getEntry(serviceName); - if (entry != null) { - urls = Collections.enumeration(Arrays.asList(entry)); - } - } - } catch (IOException e) { - logger.log(Level.SEVERE, e.getMessage(), e); - } - if (urls == null) { - continue; - } - while (urls.hasMoreElements()) { - final URL url = urls.nextElement(); - - if (debug) { - logger.fine("Reading service provider file: " + url.toExternalForm()); - } - try { - // Allow privileged access to open URL stream. Add FilePermission to added to security - // policy file. - InputStream is; - try { - is = AccessController.doPrivileged(new PrivilegedExceptionAction<InputStream>() { - public InputStream run() throws IOException { - return url.openStream(); - } - }); - } catch (PrivilegedActionException e) { - throw (IOException)e.getException(); - } - BufferedReader reader = null; - try { - reader = new BufferedReader(new InputStreamReader(is)); - int count = 0; - while (true) { - String line = reader.readLine(); - if (line == null) - break; - line = line.trim(); - if (!line.startsWith("#") && !"".equals(line)) { - String reg = line.trim(); - if (debug) { - logger.fine("Registering service provider: " + reg); - } - - Map<String, String> attributes = parseServiceDeclaration(reg); - String className = attributes.get("class"); - if (className == null) { - // Add a unique class name to prevent equals() from returning true - className = "_class_" + count; - count++; - } - ServiceDeclarationImpl descriptor = - new ServiceDeclarationImpl(bundle, url, className, attributes); - descriptors.add(descriptor); - if (firstOnly) { - return descriptors; - } - } - } - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) { - // Ignore - } - } - } - } catch (IOException e) { - logger.log(Level.SEVERE, e.getMessage(), e); - } - } - } - return descriptors; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java deleted file mode 100644 index fa137daa16..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.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 org.apache.tuscany.sca.extensibility.equinox; - -import java.util.logging.Logger; - -import org.apache.tuscany.sca.extensibility.ServiceDiscovery; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -/** - * The Bundle Activator that creates the Equinox-based service discoverer - * - * @version $Rev$ $Date$ - */ -public class EquinoxServiceDiscoveryActivator implements BundleActivator { - private static Logger logger = Logger.getLogger(EquinoxServiceDiscoveryActivator.class.getName()); - - public void start(BundleContext context) throws Exception { - logger.info("Installing service discovery"); - EquinoxServiceDiscoverer discoverer = new EquinoxServiceDiscoverer(context); - ServiceDiscovery.getInstance().setServiceDiscoverer(discoverer); - logger.info("Installed service discovery"); - } - - public void stop(BundleContext context) throws Exception { - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxHostTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxHostTestCase.java deleted file mode 100644 index 7602b02488..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxHostTestCase.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.extensibility.equinox; - -import java.util.Dictionary; -import java.util.Enumeration; - -import junit.framework.Assert; - -import org.junit.Test; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * Test start/stop the Equinox runtime. - * - * @version $Rev: $ $Date: $ - */ -public class EquinoxHostTestCase { - @Test - public void testStartThenStop() { - TestEquinoxHost host = new TestEquinoxHost(); - BundleContext context = host.start(); - Assert.assertNotNull(context); - for (Bundle b : context.getBundles()) { - System.out.println(toString(b, false)); - } - host.stop(); - } - - @Test - public void testStartTwice() { - TestEquinoxHost host = new TestEquinoxHost(); - host.start(); - try { - host.start(); - Assert.fail(); - } catch (IllegalStateException e) { - Assert.assertTrue(IllegalStateException.class.isInstance(e.getCause())); - } finally { - host.stop(); - } - } - - public static String toString(Bundle b, boolean verbose) { - StringBuffer sb = new StringBuffer(); - sb.append(b.getBundleId()).append(" ").append(b.getSymbolicName()); - int s = b.getState(); - if ((s & Bundle.UNINSTALLED) != 0) { - sb.append(" UNINSTALLED"); - } - if ((s & Bundle.INSTALLED) != 0) { - sb.append(" INSTALLED"); - } - if ((s & Bundle.RESOLVED) != 0) { - sb.append(" RESOLVED"); - } - if ((s & Bundle.STARTING) != 0) { - sb.append(" STARTING"); - } - if ((s & Bundle.STOPPING) != 0) { - sb.append(" STOPPING"); - } - if ((s & Bundle.ACTIVE) != 0) { - sb.append(" ACTIVE"); - } - - sb.append(" ").append(b.getLocation()); - if (verbose) { - Dictionary<Object, Object> dict = b.getHeaders(); - Enumeration<Object> keys = dict.keys(); - while (keys.hasMoreElements()) { - Object key = keys.nextElement(); - sb.append(" ").append(key).append("=").append(dict.get(key)); - } - } - return sb.toString(); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java deleted file mode 100644 index 3126365748..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.extensibility.equinox; - -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.jar.JarInputStream; -import java.util.jar.Manifest; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.extensibility.ServiceDeclaration; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * Test the Equinox service discoverer. - * - * @version $Rev$ $Date$ - */ -public class EquinoxServiceDiscovererTestCase { - private static EquinoxServiceDiscoverer discoverer; - private static Bundle testBundle; - private static TestEquinoxHost host; - - private static String getState(Bundle b) { - StringBuffer sb = new StringBuffer(); - int s = b.getState(); - if ((s & Bundle.UNINSTALLED) != 0) { - sb.append("UNINSTALLED "); - } - if ((s & Bundle.INSTALLED) != 0) { - sb.append("INSTALLED "); - } - if ((s & Bundle.RESOLVED) != 0) { - sb.append("RESOLVED "); - } - if ((s & Bundle.STARTING) != 0) { - sb.append("STARTING "); - } - if ((s & Bundle.STOPPING) != 0) { - sb.append("STOPPING "); - } - if ((s & Bundle.ACTIVE) != 0) { - sb.append("ACTIVE "); - } - return sb.toString(); - - } - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - host = new TestEquinoxHost(); - BundleContext context = host.start(); - - InputStream is = EquinoxServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle.jar"); - testBundle = context.installBundle("test-bundle", is); - is.close(); - discoverer = new EquinoxServiceDiscoverer(context); - File dep = new File("target/bundles"); - List<Bundle> bundles = new ArrayList<Bundle>(); - for (File f : dep.listFiles()) { - BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f)); - JarInputStream jis = new JarInputStream(bis); - Manifest manifest = jis.getManifest(); - if (manifest == null || manifest.getMainAttributes().getValue("Bundle-Name") == null) { - bis.close(); - continue; - } - bis.close(); - bis = new BufferedInputStream(new FileInputStream(f)); - Bundle b = context.installBundle(f.getName(), bis); - System.out.println("Installed "+b.getSymbolicName() + " [" + getState(b) + "]"); - bundles.add(b); - bis.close(); - } - for (Bundle b : bundles) { - b.start(); - System.out.println("Started "+b.getSymbolicName() + " [" + getState(b) + "]"); - // Get the Platform.getExtensionRegistry() - if ("org.eclipse.core.runtime".equals(b.getSymbolicName())) { - // The Platform class loaded by the bundle is different that the one - // on the classpath - Class<?> cls = b.loadClass("org.eclipse.core.runtime.Platform"); - Method m = cls.getMethod("getExtensionRegistry"); - Object reg = m.invoke(cls); - System.out.println(reg); - } - } - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (testBundle != null) { - // Uninstall the bundle to clean up the cache - testBundle.uninstall(); - } - host.stop(); - } - - @Test - public void testDiscovery() { - Set<ServiceDeclaration> descriptors = - discoverer.discover("test.TestService", false); - Assert.assertEquals(1, descriptors.size()); - descriptors = discoverer.discover("notthere", false); - Assert.assertEquals(0, descriptors.size()); - } - - @Test - public void testDiscoveryFirst() { - Set<ServiceDeclaration> descriptors = - discoverer.discover("test.TestService", true); - Assert.assertEquals(1, descriptors.size()); - descriptors = discoverer.discover("notthere", true); - Assert.assertEquals(0, descriptors.size()); - } - - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java deleted file mode 100644 index e000faa447..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.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 org.apache.tuscany.sca.extensibility.equinox; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.runtime.adaptor.EclipseStarter; -import org.eclipse.core.runtime.adaptor.LocationManager; -import org.osgi.framework.BundleContext; - -/** - * A test host that starts/stops Equinox. - * - * @version $Rev: $ $Date: $ - */ -public class TestEquinoxHost { - - private final static String systemPackages = - "org.osgi.framework; version=1.3.0," + "org.osgi.service.packageadmin; version=1.2.0, " - + "org.osgi.service.startlevel; version=1.0.0, " - + "org.osgi.service.url; version=1.0.0, " - + "org.osgi.util.tracker; version=1.3.2, " - + "javax.xml, " - + "javax.xml.datatype, " - + "javax.xml.namespace, " - + "javax.xml.parsers, " - + "javax.xml.transform, " - + "javax.xml.transform.dom, " - + "javax.xml.transform.sax, " - + "javax.xml.transform.stream, " - + "javax.xml.validation, " - + "javax.xml.xpath, " - // Force the classes to be imported from the system bundle - + "javax.xml.stream, " - + "javax.xml.stream.util, " - + "javax.sql," - + "org.w3c.dom, " - + "org.xml.sax, " - + "org.xml.sax.ext, " - + "org.xml.sax.helpers, " - + "javax.security.auth, " - + "javax.security.cert, " - + "javax.security.auth.login, " - + "javax.security.auth.callback, " - + "javax.naming, " - + "javax.naming.spi, " - + "javax.naming.directory, " - + "javax.management, " - + "javax.imageio, " - + "sun.misc, " - + "javax.net, " - + "javax.net.ssl, " - + "javax.crypto, " - + "javax.rmi, " - + "javax.transaction, " - + "javax.transaction.xa"; - - public BundleContext start() { - try { - Map<Object, Object> props = new HashMap<Object, Object>(); - props.put("org.osgi.framework.system.packages", systemPackages); - props.put(EclipseStarter.PROP_CLEAN, "true"); - props.put(LocationManager.PROP_INSTANCE_AREA, new File("target/workspace").toURI().toString()); - props.put(LocationManager.PROP_INSTALL_AREA, new File("target/eclipse").toURI().toString()); - EclipseStarter.setInitialProperties(props); - BundleContext context = EclipseStarter.startup(new String[]{}, null); - return context; - } catch (Exception e) { - throw new IllegalStateException(e); - } - } - - public void stop() { - try { - EclipseStarter.shutdown(); - } catch (Exception e) { - throw new IllegalStateException(e); - } - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/resources/test-bundle.jar b/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/resources/test-bundle.jar Binary files differdeleted file mode 100644 index afee051f61..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/extensibility-equinox/src/test/resources/test-bundle.jar +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/pom.xml deleted file mode 100644 index 3521689681..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tuscany-host-ejb</artifactId>
- <name>Apache Tuscany SCA EJB Host Extension Point</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-Version>${tuscany.version}</Bundle-Version>
- <Bundle-SymbolicName>org.apache.tuscany.sca.host.ejb</Bundle-SymbolicName>
- <Bundle-Description>${pom.name}</Bundle-Description>
- <Export-Package>org.apache.tuscany.sca.host.ejb*</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java deleted file mode 100644 index c0107cb316..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.host.ejb; - -import java.util.ArrayList; -import java.util.List; - -/** - * Default implementation of an EJB host extension point. - * - * @version $Rev$ $Date$ - */ -public class DefaultEJBHostExtensionPoint implements EJBHostExtensionPoint { - - private List<EJBHost> ejbHosts = new ArrayList<EJBHost>(); - - public void addEJBHost(EJBHost ejbHost) { - ejbHosts.add(ejbHost); - } - - public void removeEJBHost(EJBHost ejbHost) { - ejbHosts.remove(ejbHost); - } - - public List<EJBHost> getEJBHosts() { - return ejbHosts; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java deleted file mode 100644 index 842dd7a4f5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.host.ejb; - - - -/** - * Interface implemented by host environments that allow EJBs - * to be registered. - * <p/> - * This interface allows a system service to register an EJB session - * bean to handle inbound requests. - * - * @version $Rev$ $Date$ - */ -public interface EJBHost { - - /** - * Add an EJB session bean. - * - * @param ejbName the EJB name - * @param sessionBean the EJB session bean descriptor - * @throws EJBRegistrationException - */ - void addSessionBean(String ejbName, EJBSessionBean sessionBean) throws EJBRegistrationException; - - /** - * Remove an EJB session bean. - * - * @param ejbName the EJB name - * @return the EJB session bean descriptor that was registered under that name - * @throws EJBRegistrationException - */ - EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException; - - /** - * Returns the EJB session bean descriptor registered under - * the given EJB name. - * - * @param ejbName the EJB name - * @return the EJB session bean descriptor - * @throws EJBRegistrationException - */ - EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException; - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java deleted file mode 100644 index 75912dcc45..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.host.ejb; - -import java.util.List; - -/** - * An extension point for EJB hosts. - * - * @version $Rev$ $Date$ - */ -public interface EJBHostExtensionPoint { - - /** - * Adds an EJB host extension. - * - * @param ejbHost - */ - void addEJBHost(EJBHost ejbHost); - - /** - * Removes an EJB host extension. - * - * @param ejbHost - */ - void removeEJBHost(EJBHost ejbHost); - - /** - * Returns a list of EJB host extensions. - * - * @return - */ - List<EJBHost> getEJBHosts(); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java deleted file mode 100644 index a50e701766..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.host.ejb; - -/** - * Indicates an exception while registering an EJB. - * - * @version $Rev$ $Date$ - */ -public class EJBRegistrationException extends RuntimeException { - private static final long serialVersionUID = 1L; - - public EJBRegistrationException() { - super(); - } - - public EJBRegistrationException(String message) { - super(message); - } - - public EJBRegistrationException(String message, Throwable cause) { - super(message, cause); - } - - public EJBRegistrationException(Throwable cause) { - super(cause); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java deleted file mode 100644 index f9967bdd8a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.host.ejb; - -/** - * Represents an EJB session bean. - * - * @version $Rev: $ $Date: $ - */ -public class EJBSessionBean { - - private Class<?> implementationClass; - private Class<?> remoteInterface; - - public EJBSessionBean(Class<?> implementationClass, Class<?> remoteInterface) { - this.implementationClass = implementationClass; - this.remoteInterface = remoteInterface; - } - - public Class<?> getImplementationClass() { - return implementationClass; - } - - public Class<?> getRemoteInterface() { - return remoteInterface; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.java deleted file mode 100644 index fab408c7c0..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.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 org.apache.tuscany.sca.host.ejb; - - -/** - * Default implementation of an extensible EJB host. - * - * @version $Rev$ $Date$ - */ -public class ExtensibleEJBHost implements EJBHost { - - private EJBHostExtensionPoint ejbHosts; - - public ExtensibleEJBHost(EJBHostExtensionPoint ejbHosts) { - this.ejbHosts = ejbHosts; - } - - public void addSessionBean(String ejbName, EJBSessionBean ejbClass) throws EJBRegistrationException { - if (ejbHosts.getEJBHosts().isEmpty()) { - throw new EJBRegistrationException("No EJB host available"); - } - - // TODO implement selection of the correct EJB host based on the mapping - // For now just select the first one - getDefaultEJBHost().addSessionBean(ejbName, ejbClass); - } - - public EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException { - if (ejbHosts.getEJBHosts().isEmpty()) { - throw new EJBRegistrationException("No EJB host available"); - } - - // TODO implement selection of the correct EJB host based on the mapping - // For now just select the first one - return getDefaultEJBHost().removeSessionBean(ejbName); - } - - public EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException { - if (ejbHosts.getEJBHosts().isEmpty()) { - throw new EJBRegistrationException("No EJB host available"); - } - - // TODO implement selection of the correct EJB host based on the mapping - // For now just select the first one - return getDefaultEJBHost().getSessionBean(ejbName); - } - - private EJBHost getDefaultEJBHost() { - return ejbHosts.getEJBHosts().get(0); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.ejb.EJBHostExtensionPoint b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.ejb.EJBHostExtensionPoint deleted file mode 100644 index c42791f598..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.ejb.EJBHostExtensionPoint +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.apache.tuscany.sca.host.ejb.DefaultEJBHostExtensionPoint
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/pom.xml deleted file mode 100644 index ceeee505e6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tuscany-host-openejb</artifactId>
- <name>Apache Tuscany SCA OpenEJB Host Extension</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-ejb</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.modules</groupId>
- <artifactId>geronimo-openejb</artifactId>
- <version>2.1.4</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.modules</groupId>
- <artifactId>geronimo-connector</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.geronimo.modules</groupId>
- <artifactId>geronimo-persistence-jpa10</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.openejb</groupId>
- <artifactId>openejb-javaagent</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>asm</groupId>
- <artifactId>asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>asm</groupId>
- <artifactId>asm-commons</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>backport-util-concurrent</groupId>
- <artifactId>backport-util-concurrent</artifactId>
- <version>3.1</version>
- </dependency>
-
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm-all</artifactId>
- <version>3.1</version>
- <scope>runtime</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-Version>${tuscany.version}</Bundle-Version>
- <Bundle-SymbolicName>org.apache.tuscany.sca.host.openejb</Bundle-SymbolicName>
- <Bundle-Description>${pom.name}</Bundle-Description>
- <Export-Package>org.apache.tuscany.sca.host.openejb*</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBRuntimeModuleActivator.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBRuntimeModuleActivator.java deleted file mode 100644 index 70bba08789..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBRuntimeModuleActivator.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 org.apache.tuscany.sca.host.openejb; - -import java.util.logging.Logger; - -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.ModuleActivator; -import org.apache.tuscany.sca.host.ejb.EJBHostExtensionPoint; - -/** - * @version $Rev$ $Date$ - */ -public class OpenEJBRuntimeModuleActivator implements ModuleActivator { - private static final Logger logger = Logger.getLogger(OpenEJBRuntimeModuleActivator.class.getName()); - - private OpenEJBServer server; - - public void start(ExtensionPointRegistry extensionPointRegistry) { - - // Register our EJB host - EJBHostExtensionPoint ejbHosts = - extensionPointRegistry.getExtensionPoint(EJBHostExtensionPoint.class); - - server = new OpenEJBServer(); - ejbHosts.addEJBHost(server); - } - - public void stop(ExtensionPointRegistry registry) { - if (server != null) { - server.stop(); - } - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java deleted file mode 100644 index 82e619ddbe..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java +++ /dev/null @@ -1,145 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.sca.host.openejb;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.apache.openejb.OpenEJB;
-import org.apache.openejb.OpenEJBException;
-import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
-import org.apache.openejb.config.ConfigurationFactory;
-import org.apache.openejb.core.ServerFederation;
-import org.apache.openejb.jee.EjbJar;
-import org.apache.openejb.jee.StatelessBean;
-import org.apache.openejb.loader.SystemInstance;
-import org.apache.openejb.server.ServiceDaemon;
-import org.apache.openejb.server.ServiceException;
-import org.apache.openejb.server.ejbd.EjbServer;
-import org.apache.tuscany.sca.host.ejb.EJBHost;
-import org.apache.tuscany.sca.host.ejb.EJBRegistrationException;
-import org.apache.tuscany.sca.host.ejb.EJBSessionBean;
-
-/**
- * OpenEJB-based EJB host implementation.
- *
- * @version $Rev: $ $Date: $
- */
-public class OpenEJBServer implements EJBHost {
-
- private boolean started;
- private EjbServer ejbServer;
- private ServiceDaemon serviceDaemon;
- private ConfigurationFactory config;
- private Assembler assembler;
-
- public void addSessionBean(String ejbName, EJBSessionBean sessionBean) throws EJBRegistrationException {
- if (!started) {
- start();
- }
-
- try {
- StatelessBean bean = new StatelessBean(ejbName, sessionBean.getImplementationClass());
- bean.addBusinessRemote(sessionBean.getRemoteInterface().getName());
- bean.addPostConstruct("init");
- bean.addPreDestroy("destroy");
-
- EjbJar ejbJar = new EjbJar();
- ejbJar.addEnterpriseBean(bean);
-
- assembler.createApplication(config.configureApplication(ejbJar));
-
- } catch (NamingException e) {
- throw new EJBRegistrationException(e);
- } catch (IOException e) {
- throw new EJBRegistrationException(e);
- } catch (OpenEJBException e) {
- throw new EJBRegistrationException(e);
- }
- }
-
- public EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * Start the OpenEJB server.
- *
- * @throws EJBRegistrationException
- */
- private void start() throws EJBRegistrationException {
- try {
- Properties properties = new Properties();
- properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
- properties.put(Context.PROVIDER_URL, "ejbd://localhost:2888");
- SystemInstance.init(properties);
-
- ejbServer = new EjbServer();
- SystemInstance.get().setComponent(EjbServer.class, ejbServer);
- OpenEJB.init(properties, new ServerFederation());
- ejbServer.init(properties);
-
- serviceDaemon = new ServiceDaemon(ejbServer, 2888, "localhost");
- serviceDaemon.start();
-
- config = new ConfigurationFactory();
- assembler = (Assembler)SystemInstance.get().getComponent(org.apache.openejb.spi.Assembler.class);
-
- // containers
- StatelessSessionContainerInfo statelessContainerInfo = config.configureService(StatelessSessionContainerInfo.class);
- statelessContainerInfo.properties.setProperty("TimeOut", "10");
- statelessContainerInfo.properties.setProperty("PoolSize", "0");
- statelessContainerInfo.properties.setProperty("StrictPooling", "false");
- assembler.createContainer(statelessContainerInfo);
-
- } catch (OpenEJBException e) {
- throw new EJBRegistrationException(e);
- } catch (Exception e) {
- throw new EJBRegistrationException(e);
- }
-
- started = true;
- }
-
- /**
- * Stop the OpenEJB server.
- */
- void stop() {
- if (started) {
- try {
- serviceDaemon.stop();
- } catch (ServiceException e) {
- throw new EJBRegistrationException(e);
- }
- }
- SystemInstance.get().removeComponent(EjbServer.class);
- OpenEJB.destroy();
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator deleted file mode 100644 index 9247f40913..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Implementation class for the ModuleActivator
-org.apache.tuscany.sca.host.openejb.OpenEJBRuntimeModuleActivator
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/test/java/org/apache/tuscany/sca/host/openejb/OpenEJBServerTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/test/java/org/apache/tuscany/sca/host/openejb/OpenEJBServerTestCase.java deleted file mode 100644 index 7d2301a770..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/host-openejb/src/test/java/org/apache/tuscany/sca/host/openejb/OpenEJBServerTestCase.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.host.openejb; - -import java.util.Properties; - -import javax.naming.Context; -import javax.naming.InitialContext; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.ejb.EJBSessionBean; - -/** - * @version $Rev$ $Date$ - */ -public class OpenEJBServerTestCase extends TestCase { - - public interface TestRemote { - String test(String s); - } - - public static class TestImpl implements TestRemote { - - public TestImpl() { - } - - public String test(String s) { - return s.toUpperCase(); - } - - public void init() { - } - - public void destroy() { - } - } - - private OpenEJBServer server; - - @Override - protected void setUp() throws Exception { - server = new OpenEJBServer(); - } - - @Override - protected void tearDown() throws Exception { - server.stop(); - } - - /** - * Verifies registration and invocation of a session bean - */ - public void testStatelessSessionBean() throws Exception { - server.addSessionBean("TestBean", new EJBSessionBean(TestImpl.class, TestRemote.class)); - - Properties properties = new Properties(System.getProperties()); - //properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, InitContextFactory.class.getName()); - properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory"); - properties.put(Context.PROVIDER_URL, "ejbd://localhost:2888"); - InitialContext ctx = new InitialContext(properties); - Object object = ctx.lookup("TestBeanRemote"); - assertTrue(object instanceof TestRemote); - - TestRemote testRemote = (TestRemote)object; - String s = testRemote.test("test"); - assertEquals("TEST", s); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-jee/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-jee/pom.xml index 87a6be3a45..ba75f3ff97 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-jee/pom.xml +++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-jee/pom.xml @@ -51,14 +51,14 @@ <artifactId>tuscany-contribution-jee</artifactId> <version>1.6.1-SNAPSHOT</version> </dependency> - +<!-- <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-contribution-jee-impl</artifactId> <version>1.6.1-SNAPSHOT</version> <scope>test</scope> </dependency> - +--> <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-host-embedded</artifactId> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/modules/pom.xml index 23c5c938c8..f8e4fb94a0 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/pom.xml +++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/pom.xml @@ -50,7 +50,6 @@ <module>binding-ejb-runtime</module> <module>binding-erlang</module> <module>binding-erlang-runtime</module> - <!-- new bindings --> <module>binding-atom</module> <module>binding-atom-js</module> <module>binding-atom-js-dojo</module> @@ -76,7 +75,6 @@ <module>binding-sca</module> <module>binding-sca-axis2</module> <module>binding-sca-corba</module> - <module>binding-sca-jms</module> <module>binding-sca-xml</module> <module>binding-ws</module> <module>binding-ws-axis2</module> @@ -92,7 +90,6 @@ <module>contribution-resource</module> <module>contribution-xml</module> <module>contribution-jee</module> - <module>contribution-jee-impl</module> <module>core</module> <module>core-databinding</module> <module>core-spi</module> @@ -106,8 +103,6 @@ <module>databinding-json</module> <module>databinding-saxon</module> <module>databinding-xmlbeans</module> - <module>databinding-fastinfoset</module> - <module>databinding-xstream</module> <module>definitions</module> <module>definitions-xml</module> <module>domain-manager</module> @@ -115,19 +110,16 @@ <module>endpoint</module> <module>extensibility</module> <module>extensibility-osgi</module> - <module>extensibility-equinox</module> <module>extension-helper</module> <module>host-corba</module> <module>host-corba-jee</module> <module>host-corba-jse</module> <module>host-corba-jse-tns</module> - <module>host-ejb</module> <module>host-embedded</module> <module>host-http</module> <module>host-jetty</module> <module>host-jms</module> <module>host-jms-asf</module> - <module>host-openejb</module> <module>host-rmi</module> <module>host-tomcat</module> <module>host-webapp</module> @@ -152,7 +144,7 @@ <module>implementation-resource-runtime</module> <module>implementation-script</module> <module>implementation-spring</module> - <module>implementation-spring-runtime</module> + <module>implementation-spring-runtime</module> <module>implementation-web</module> <module>implementation-web-runtime</module> <module>implementation-widget</module> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/pom.xml index 5031de5ad6..4e0bec7b42 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/pom.xml +++ b/sca-java-1.x/branches/sca-java-1.6.1/pom.xml @@ -301,7 +301,7 @@ </plugins> </build> </profile> - +<!-- <profile> <id>osgi</id> <activation> @@ -332,7 +332,7 @@ </plugins> </build> </profile> - +--> <profile> <id>dependencies</id> <modules> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/README deleted file mode 100644 index a8aff232c6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/README +++ /dev/null @@ -1,87 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -java -jar <tuscany-install>/modules/tuscany-node-launcher.jar Calculator.composite target/sample-calculator-lean.jar - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - a client component that calls the - Calculator services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/calculator.png b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/calculator.png Binary files differdeleted file mode 100644 index 995a57b1fd..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/calculator.png +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/calculator.svg b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/calculator.svg deleted file mode 100644 index 0615925c50..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1052.3622" - height="744.09448" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.44" - sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator" - sodipodi:docname="calculator.svg" - version="1.0" - inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator\calculator.png" - inkscape:export-xdpi="52.84" - inkscape:export-ydpi="52.84"> - <defs - id="defs4" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - gridtolerance="10000" - guidetolerance="10" - objecttolerance="10" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="1.4" - inkscape:cx="471.80491" - inkscape:cy="378.84265" - inkscape:document-units="px" - inkscape:current-layer="layer1" - inkscape:window-width="1054" - inkscape:window-height="721" - inkscape:window-x="59" - inkscape:window-y="79" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <g - id="g2997" - transform="matrix(1,0,0,1.144214,0,-27.53557)"> - <rect - rx="15.307091" - ry="12.692303" - y="192.00233" - x="258.31146" - height="299.99988" - width="495.71429" - id="rect2067" - style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.86971939;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - <flowRoot - id="flowRoot2954" - xml:space="preserve"><flowRegion - id="flowRegion2956"><rect - y="212.66591" - x="281.42856" - height="61.42857" - width="170" - id="rect2958" /></flowRegion><flowPara - id="flowPara2960">Calculator</flowPara></flowRoot> </g> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.9999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2988" - width="115.66247" - height="191.57716" - x="339.91632" - y="262.1673" - rx="6.9961648" - ry="15.892869" /> - <flowRoot - xml:space="preserve" - id="flowRoot2966" - transform="translate(79.61125,62.65764)"><flowRegion - id="flowRegion2968"><rect - id="rect2970" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara2972">Calculator</flowPara><flowPara - id="flowPara1895">Service</flowPara><flowPara - id="flowPara1897">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z " - id="path3017" /> - <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 431.01809,321.46204 L 471.00147,321.46204 L 478.27117,334.59402 L 469.78986,346.71586 L 431.01809,346.71586 L 440.10523,334.59402 L 431.01809,321.46204 z " - id="path3019" /> - <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 223.15923,328.61046 L 282.4833,328.61046 L 293.26948,355.48529 L 280.68561,380.29286 L 223.15923,380.29286 L 236.64198,355.48529 L 223.15923,328.61046 z " - id="path1883" /> - <flowRoot - xml:space="preserve" - id="flowRoot1885" - transform="translate(-46.16225,128.7269)" - style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%"><flowRegion - id="flowRegion1887"><rect - id="rect1889" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" /></flowRegion><flowPara - id="flowPara1891">Calculator</flowPara><flowPara - id="flowPara1893">Service</flowPara></flowRoot> <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1899" - width="115.66247" - height="70.148659" - x="594.75488" - y="209.73451" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1901" - transform="translate(334.4498,10.22481)"><flowRegion - id="flowRegion1903"><rect - id="rect1905" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1907">Add</flowPara><flowPara - id="flowPara1909">Service</flowPara><flowPara - id="flowPara1911">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 573.31867,232.29606 L 606.65371,232.29606 L 612.71462,245.42804 L 605.64356,257.54988 L 573.31867,257.54988 L 580.89482,245.42804 L 573.31867,232.29606 z " - id="path1913" /> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1917" - width="115.66247" - height="70.148659" - x="594.06543" - y="292.59158" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1919" - transform="translate(333.7604,93.08188)"><flowRegion - id="flowRegion1921"><rect - id="rect1923" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1925">Subtract</flowPara><flowPara - id="flowPara1927">Service</flowPara><flowPara - id="flowPara1929">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 572.62924,315.15313 L 605.96428,315.15313 L 612.02519,328.28511 L 604.95413,340.40695 L 572.62924,340.40695 L 580.20539,328.28511 L 572.62924,315.15313 z " - id="path1931" /> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1933" - width="115.66247" - height="70.148659" - x="594.77979" - y="371.87729" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1935" - transform="translate(334.4747,172.3676)"><flowRegion - id="flowRegion1937"><rect - id="rect1939" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1941">Multiply</flowPara><flowPara - id="flowPara1943">Service</flowPara><flowPara - id="flowPara1945">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 573.34352,394.43884 L 606.67856,394.43884 L 612.73947,407.57082 L 605.66841,419.69266 L 573.34352,419.69266 L 580.91967,407.57082 L 573.34352,394.43884 z " - id="path1947" /> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1949" - width="115.66247" - height="70.148659" - x="596.20831" - y="452.59158" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1951" - transform="translate(335.9032,253.0819)"><flowRegion - id="flowRegion1953"><rect - id="rect1955" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1957">Divide</flowPara><flowPara - id="flowPara1959">Service</flowPara><flowPara - id="flowPara1961">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 574.77209,475.15313 L 608.10713,475.15313 L 614.16804,488.28511 L 607.09698,500.40695 L 574.77209,500.40695 L 582.34824,488.28511 L 574.77209,475.15313 z " - id="path1963" /> - <flowRoot - xml:space="preserve" - id="flowRoot1965" - transform="translate(161.0221,114.967)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1967"><rect - id="rect1969" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1973">add</flowPara><flowPara - id="flowPara1977">Service</flowPara></flowRoot> <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 430.65917,357.18186 L 470.64255,357.18186 L 477.91225,370.31384 L 469.43094,382.43568 L 430.65917,382.43568 L 439.74631,370.31384 L 430.65917,357.18186 z " - id="path1979" /> - <flowRoot - xml:space="preserve" - id="flowRoot1981" - transform="translate(160.6632,150.6868)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1983"><rect - id="rect1985" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1987">subtract</flowPara><flowPara - id="flowPara1989">Service</flowPara></flowRoot> <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 431.37346,390.75329 L 471.35684,390.75329 L 478.62654,403.88527 L 470.14523,416.00711 L 431.37346,416.00711 L 440.4606,403.88527 L 431.37346,390.75329 z " - id="path1991" /> - <flowRoot - xml:space="preserve" - id="flowRoot1993" - transform="translate(161.3775,184.2583)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1995"><rect - id="rect1997" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1999">multiply</flowPara><flowPara - id="flowPara2001">Service</flowPara></flowRoot> <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 429.94489,422.18186 L 469.92827,422.18186 L 477.19797,435.31384 L 468.71666,447.43568 L 429.94489,447.43568 L 439.03203,435.31384 L 429.94489,422.18186 z " - id="path2003" /> - <flowRoot - xml:space="preserve" - id="flowRoot2005" - transform="translate(159.9489,215.6868)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion2007"><rect - id="rect2009" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara2011">divide</flowPara><flowPara - id="flowPara2013">Service</flowPara></flowRoot> <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 477.85714,335.52305 L 511.42857,335.52305 L 510.71429,245.52305 L 579.28571,245.52305" - id="path2015" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 477.85714,369.80877 L 528.57143,369.80877 L 528.57143,329.80877 L 580,329.80877" - id="path2017" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 478.57143,402.66591 L 528.57143,401.95163 L 528.57143,408.3802 L 580,407.66591" - id="path2019" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 475.71429,435.52305 L 509.28571,435.52305 L 510,486.95163 L 582.14286,486.23734" - id="path2021" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 292.85714,355.52305 L 330,354.80877" - id="path2023" /> - </g> -</svg> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/pom.xml deleted file mode 100644 index 739dba467a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-calculator-lean</artifactId>
- <name>Apache Tuscany SCA Sample Calculator</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/AddService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/AddService.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 calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 2bb8f96dcf..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorService.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 calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 3d861f2018..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/DivideService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/DivideService.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 calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/MultiplyService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/MultiplyService.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 calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/SubtractService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/SubtractService.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 calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/resources/Calculator.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/resources/Calculator.composite deleted file mode 100644 index 913081b9be..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/resources/Calculator.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="Calculator"> - - <component name="CalculatorServiceComponent"> - <implementation.java class="calculator.CalculatorServiceImpl"/> - <reference name="addService" target="AddServiceComponent" /> - <reference name="subtractService" target="SubtractServiceComponent" /> - <reference name="multiplyService" target="MultiplyServiceComponent" /> - <reference name="divideService" target="DivideServiceComponent" /> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - - <component name="CalculatorClient"> - <implementation.java class="calculator.CalculatorClient"/> - <reference name="calculatorService" target="CalculatorServiceComponent" /> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/resources/CalculatorTest.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/resources/CalculatorTest.composite deleted file mode 100644 index 906e2a3918..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/main/resources/CalculatorTest.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="CalculatorTest"> - - <include name="sample:Calculator"/> - - <component name="CalculatorTestCase"> - <implementation.java class="calculator.CalculatorTestCase"/> - <reference name="calculatorService" target="CalculatorServiceComponent" /> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index a007a28f21..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * This shows how to test the Calculator composition. - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorTestCase extends TestCase { - - private static CalculatorService calculatorService; - private SCANode node; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - CalculatorTestCase.calculatorService = calculatorService; - } - - @Override - protected void setUp() throws Exception { - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANodeFromClassLoader("CalculatorTest.composite", getClass().getClassLoader()); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/README deleted file mode 100644 index d0d3307b3a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/README +++ /dev/null @@ -1,116 +0,0 @@ -Calculator Sample Exposing Secure Web Services In A WebApp
-==========================================================
-This sample uses the same code as the calculator sample, it deploys the
-sample wrapped in a web app and exposes the AddService as a web service.
-The autentication intent is applied to communications with the add
-component. The integrity intent is applied to communication with the
-subtract component.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-As this sample provides a web app there is a manual step where the WAR file
-that contains the sample is copied to your web app container. If you just want
-to give this sample a go deploy the WAR file (target/sample-calculator-ws-secure-webapp.war)
-to you web application server.
-
-Once the web app is deployed use your browser to visit the following URL;
-
-http://localhost:8080/sample-calculator-ws-secure-webapp
-
-The sample is configured to use a service on port 8080. If your servlet container
-is using a port other than 8080 then you will need to edit the Calculator.composite
-and change the uri attribute of the <binding.ws> used by the CalculatorServiceComponent
-to use the correct port.
-
-Sample Overview
----------------
-The sample provides a single calculator service with a default SCA (java)
-binding. The CalculatorClient exercises this interface by calling add,
-subtract, multiply and divide operations. This results in messages passing to
-the appropriate components in the composite.
-
-calculator-webapp/
- src/
- main/
- java/
- calculator/
- AddService.java - As calculator sample
- AddServiceImpl.java
- CalculatorClient.java - As calculator sample
- CalculatorService.java - As calculator sample
- CalculatorServiceImpl.java
- DivideService.java - As calculator sample
- DivideServiceImpl.java
- MultiplyService.java - As calculator sample
- MultiplyServiceImpl.java
- SubtractService.java - As calculator sample
- SubtractServiceImpl.java
- resources/
- Calculator.composite - As calculator sample except that the
- connection between the CalculatorService
- and the AddService is web services
- definitions.xml - intent and polci set specification
- security.properties - security configuration for the
- rampart security engine that runs
- inside of Axis
- calculatorKeys.jks - keystore
- webapp
- META-INF/
- sca-contribution.xml - specifies the composite to be deployed
- WEB-INF/
- web.xml - defines the listener that starts up the
- Tuscany SCA runtime and maps service
- calls to the TuscanyServlet
- calc.jsp - the web application that makes use of the
- SCA application
-
- calculator.png - a pictorial representation of the sample .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
- README - this file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built using Ant as
-follows
-
-cd calculator-ws-secure-webapp
-ant package
-
-This should result in a war file (sample-calculator-ws-secure-webapp.war) in the target
-directory. Copy this war file to your web app deployment directory in you
-web app container.
-
-The process for getting the web app running will depend on which web app container
-you are using. For example, if you are using Tomcat then it is simply a matter
-of copying the WAR file to the webapps directory.
-
-Once the web app is deployed use your browser to visit the following URL;
-
-http://localhost:8080/sample-calculator-ws-secure-webapp
-
-The port and hostname will of course vary depending on your local installation.
-
-You should see the following output.
-
-Expression Result
-2 + 3 5.0
-3 - 2 1.0
-3 * 2 6.0
-3 / 2 1.5
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd calculator-ws-secure-webapp
-mvn
-
-Again this should result in a war file (sample-calculator-ws-webapp.war) in the target
-directory. Follow the steps described in the previous section for running the web
-app and for the expected results.
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/calculator-web.png b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/calculator-web.png Binary files differdeleted file mode 100644 index f482b8d1c8..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/calculator-web.png +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/calculator-web.svg b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/calculator-web.svg deleted file mode 100644 index 1b7015b156..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/calculator-web.svg +++ /dev/null @@ -1,455 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1052.3622" - height="744.09448" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.45.1" - sodipodi:docbase="C:\simon\tuscany\java-head\sca\samples\calculator-ws-webapp" - sodipodi:docname="calculator-web.svg" - version="1.0" - inkscape:export-filename="C:\simon\Tuscany\java-head\sca\samples\calculator-ws-webapp\calculator-web.png" - inkscape:export-xdpi="52.84" - inkscape:export-ydpi="52.84" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - <defs - id="defs4"> - <marker - inkscape:stockid="Arrow1Lend" - orient="auto" - refY="0.0" - refX="0.0" - id="Arrow1Lend" - style="overflow:visible;"> - <path - id="path4252" - d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " - style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;" - transform="scale(0.8) rotate(180) translate(12.5,0)" /> - </marker> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - gridtolerance="10000" - guidetolerance="10" - objecttolerance="10" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="1.4" - inkscape:cx="330.5192" - inkscape:cy="378.84265" - inkscape:document-units="px" - inkscape:current-layer="layer1" - inkscape:window-width="1054" - inkscape:window-height="721" - inkscape:window-x="59" - inkscape:window-y="79" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <g - id="g2997" - transform="matrix(1,0,0,1.144214,0,-27.53557)"> - <rect - rx="15.307091" - ry="12.692303" - y="192.00233" - x="258.31146" - height="299.99988" - width="495.71429" - id="rect2067" - style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.86971939;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - <flowRoot - id="flowRoot2954" - xml:space="preserve"><flowRegion - id="flowRegion2956"><rect - y="212.66591" - x="281.42856" - height="61.42857" - width="170" - id="rect2958" /></flowRegion><flowPara - id="flowPara2960">Calculator</flowPara></flowRoot> </g> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.9999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2988" - width="115.66247" - height="191.57716" - x="339.91632" - y="262.1673" - rx="6.9961648" - ry="15.892869" /> - <flowRoot - xml:space="preserve" - id="flowRoot2966" - transform="translate(79.61125,62.65764)"><flowRegion - id="flowRegion2968"><rect - id="rect2970" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara2972">Calculator</flowPara><flowPara - id="flowPara1895">Service</flowPara><flowPara - id="flowPara1897">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z " - id="path3017" /> - <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 431.01809,321.46204 L 471.00147,321.46204 L 478.27117,334.59402 L 469.78986,346.71586 L 431.01809,346.71586 L 440.10523,334.59402 L 431.01809,321.46204 z " - id="path3019" /> - <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 223.15923,328.61046 L 282.4833,328.61046 L 293.26948,355.48529 L 280.68561,380.29286 L 223.15923,380.29286 L 236.64198,355.48529 L 223.15923,328.61046 z " - id="path1883" /> - <flowRoot - xml:space="preserve" - id="flowRoot1885" - transform="translate(-46.16225,128.7269)" - style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%"><flowRegion - id="flowRegion1887"><rect - id="rect1889" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" /></flowRegion><flowPara - id="flowPara1891">Calculator</flowPara><flowPara - id="flowPara1893">Service</flowPara></flowRoot> <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1899" - width="115.66247" - height="70.148659" - x="594.75488" - y="209.73451" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1901" - transform="translate(334.4498,10.22481)"><flowRegion - id="flowRegion1903"><rect - id="rect1905" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1907">Add</flowPara><flowPara - id="flowPara1909">Service</flowPara><flowPara - id="flowPara1911">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 573.31867,232.29606 L 606.65371,232.29606 L 612.71462,245.42804 L 605.64356,257.54988 L 573.31867,257.54988 L 580.89482,245.42804 L 573.31867,232.29606 z " - id="path1913" /> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1917" - width="115.66247" - height="70.148659" - x="594.06543" - y="292.59158" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1919" - transform="translate(333.7604,93.08188)"><flowRegion - id="flowRegion1921"><rect - id="rect1923" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1925">Subtract</flowPara><flowPara - id="flowPara1927">Service</flowPara><flowPara - id="flowPara1929">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 572.62924,315.15313 L 605.96428,315.15313 L 612.02519,328.28511 L 604.95413,340.40695 L 572.62924,340.40695 L 580.20539,328.28511 L 572.62924,315.15313 z " - id="path1931" /> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1933" - width="115.66247" - height="70.148659" - x="594.77979" - y="371.87729" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1935" - transform="translate(334.4747,172.3676)"><flowRegion - id="flowRegion1937"><rect - id="rect1939" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1941">Multiply</flowPara><flowPara - id="flowPara1943">Service</flowPara><flowPara - id="flowPara1945">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 573.34352,394.43884 L 606.67856,394.43884 L 612.73947,407.57082 L 605.66841,419.69266 L 573.34352,419.69266 L 580.91967,407.57082 L 573.34352,394.43884 z " - id="path1947" /> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect1949" - width="115.66247" - height="70.148659" - x="596.20831" - y="452.59158" - rx="6.9961648" - ry="5.8193965" /> - <flowRoot - xml:space="preserve" - id="flowRoot1951" - transform="translate(335.9032,253.0819)"><flowRegion - id="flowRegion1953"><rect - id="rect1955" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara1957">Divide</flowPara><flowPara - id="flowPara1959">Service</flowPara><flowPara - id="flowPara1961">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 574.77209,475.15313 L 608.10713,475.15313 L 614.16804,488.28511 L 607.09698,500.40695 L 574.77209,500.40695 L 582.34824,488.28511 L 574.77209,475.15313 z " - id="path1963" /> - <flowRoot - xml:space="preserve" - id="flowRoot1965" - transform="translate(161.0221,114.967)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1967"><rect - id="rect1969" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1973">add</flowPara><flowPara - id="flowPara1977">Service</flowPara></flowRoot> <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 430.65917,357.18186 L 470.64255,357.18186 L 477.91225,370.31384 L 469.43094,382.43568 L 430.65917,382.43568 L 439.74631,370.31384 L 430.65917,357.18186 z " - id="path1979" /> - <flowRoot - xml:space="preserve" - id="flowRoot1981" - transform="translate(160.6632,150.6868)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1983"><rect - id="rect1985" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1987">subtract</flowPara><flowPara - id="flowPara1989">Service</flowPara></flowRoot> <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 431.37346,390.75329 L 471.35684,390.75329 L 478.62654,403.88527 L 470.14523,416.00711 L 431.37346,416.00711 L 440.4606,403.88527 L 431.37346,390.75329 z " - id="path1991" /> - <flowRoot - xml:space="preserve" - id="flowRoot1993" - transform="translate(161.3775,184.2583)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1995"><rect - id="rect1997" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1999">multiply</flowPara><flowPara - id="flowPara2001">Service</flowPara></flowRoot> <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 429.94489,422.18186 L 469.92827,422.18186 L 477.19797,435.31384 L 468.71666,447.43568 L 429.94489,447.43568 L 439.03203,435.31384 L 429.94489,422.18186 z " - id="path2003" /> - <flowRoot - xml:space="preserve" - id="flowRoot2005" - transform="translate(159.9489,215.6868)" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion2007"><rect - id="rect2009" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara2011">divide</flowPara><flowPara - id="flowPara2013">Service</flowPara></flowRoot> <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:4,1;stroke-dashoffset:0" - d="M 477.85714,335.52305 L 511.42857,335.52305 L 510.71429,245.52305 L 579.28571,245.52305" - id="path2015" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 477.85714,369.80877 L 528.57143,369.80877 L 528.57143,329.80877 L 580,329.80877" - id="path2017" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 478.57143,402.66591 L 528.57143,401.95163 L 528.57143,408.3802 L 580,407.66591" - id="path2019" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 475.71429,435.52305 L 509.28571,435.52305 L 510,486.95163 L 582.14286,486.23734" - id="path2021" /> - <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 292.85714,355.52305 L 330,354.80877" - id="path2023" /> - <path - sodipodi:type="arc" - style="opacity:1;fill:#f19a9a;fill-opacity:1;stroke:#2e2424;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3, 1;stroke-dashoffset:0;stroke-opacity:1" - id="path1950" - sodipodi:cx="179.28572" - sodipodi:cy="352.66592" - sodipodi:rx="32.857143" - sodipodi:ry="35" - d="M 197.59435,323.60313 A 32.857143,35 0 1 1 196.81963,323.06603" - sodipodi:start="5.3034219" - sodipodi:end="11.558474" - sodipodi:open="true" - transform="translate(-11.428568,5.714286)" /> - <flowRoot - xml:space="preserve" - id="flowRoot1952" - transform="translate(-134.69216,137.10973)" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1954"><rect - id="rect1956" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1960">calc.jsp</flowPara></flowRoot> <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 235,356.23734 C 200.71429,356.23734 200.71429,356.23734 200.71429,356.23734" - id="path1972" /> - <rect - style="opacity:0.21666667;fill:#3d2020;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:4, 1;stroke-dashoffset:0;stroke-opacity:1" - id="rect2246" - width="56.428566" - height="317.85715" - x="57.14286" - y="206.95161" - rx="4.7646294" - ry="7.7766709" /> - <flowRoot - xml:space="preserve" - id="flowRoot3221" - transform="translate(-214.7771,5.7407504)" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion3223"><rect - id="rect3225" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara3227">App</flowPara><flowPara - id="flowPara3229">Server</flowPara></flowRoot> <flowRoot - xml:space="preserve" - id="flowRoot3231" - transform="translate(232.36576,64.312179)" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion3233"><rect - id="rect3235" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara3237">SOAP</flowPara></flowRoot> <flowRoot - xml:space="preserve" - id="flowRoot3239" - transform="translate(249.50862,136.45504)" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion3241"><rect - id="rect3243" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara3245">local</flowPara></flowRoot> <flowRoot - xml:space="preserve" - id="flowRoot3247" - transform="translate(247.27783,197.54805)" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion3249"><rect - id="rect3251" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara3253">local</flowPara></flowRoot> <flowRoot - xml:space="preserve" - id="flowRoot3255" - transform="translate(235.13497,276.11948)" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion3257"><rect - id="rect3259" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara3261">local</flowPara></flowRoot> <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" - d="M 113.57143,238.80877 L 575.71429,238.80877" - id="path3263" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 112.85714,359.09448 C 135.71429,359.09448 135.71429,359.09448 135.71429,359.09448" - id="path3265" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" - d="M 478.57143,334.09448 C 499.28571,291.95163 505.71429,287.66591 498.57143,273.3802 C 491.42857,259.09448 477.85714,254.09448 470.71429,253.3802 C 463.57143,252.66591 14.285714,252.66591 14.285714,252.66591 L 13.571429,234.09448 L 57.857143,234.80877" - id="path4244" /> - </g> -</svg> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/pom.xml deleted file mode 100644 index b9a582d889..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-calculator-ws-secure-webapp</artifactId>
- <packaging>war</packaging>
- <name>Apache Tuscany SCA Sample Calculator Web Service enabled for WS Security in a WebApp</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-webapp</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- exclude stax 1.0.1 as we're also pulling in javax\xml\stream\stax-api\1.0-2 -->
- <dependency>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- <version>1.0.1</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- marking dependency as provided to exclude from war file -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.3</version>
- <scope>provided</scope>
- </dependency>
-
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-maven-ant-generator</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index c3c789e745..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.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 calculator;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * The interface for the add service
- */
-@Remotable
-public interface AddService {
-
- double add(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 46ec182124..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.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 calculator;
-
-import org.osoa.sca.annotations.Service;
-
-/**
- * An implementation of the Add service
- */
-@Service(AddService.class)
-public class AddServiceImpl implements AddService {
-
- public double add(double n1, double n2) {
- System.err.println("********* Adding ***** " + n1 + " to " + n2);
- System.err.println("Adding " + n1 + " to " + n2);
- return n1 + n2;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.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 calculator;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- *
- * (not really necessary as this sample runs in a webapp)
- */
-public class CalculatorClient {
- public static void main(String[] args) throws Exception {
-
- SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
- CalculatorService calculatorService =
- scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
-
- // Calculate
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));
-
- scaDomain.close();
-
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.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 calculator;
-
-
-/**
- * The Calculator service interface.
- */
-public interface CalculatorService {
-
- double add(double n1, double n2);
-
- double subtract(double n1, double n2);
-
- double multiply(double n1, double n2);
-
- double divide(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.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 calculator;
-
-import org.osoa.sca.annotations.Reference;
-
-/**
- * An implementation of the Calculator service.
- */
-public class CalculatorServiceImpl implements CalculatorService {
-
- private AddService addService;
- private SubtractService subtractService;
- private MultiplyService multiplyService;
- private DivideService divideService;
-
- @Reference
- public void setAddService(AddService addService) {
- this.addService = addService;
- }
-
- @Reference
- public void setSubtractService(SubtractService subtractService) {
- this.subtractService = subtractService;
- }
-
- @Reference
- public void setDivideService(DivideService divideService) {
- this.divideService = divideService;
- }
-
- @Reference
- public void setMultiplyService(MultiplyService multiplyService) {
- this.multiplyService = multiplyService;
- }
-
- public double add(double n1, double n2) {
- return addService.add(n1, n2);
- }
-
- public double subtract(double n1, double n2) {
- return subtractService.subtract(n1, n2);
- }
-
- public double multiply(double n1, double n2) {
- return multiplyService.multiply(n1, n2);
- }
-
- public double divide(double n1, double n2) {
- return divideService.divide(n1, n2);
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.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 calculator;
-
-/**
- * The interface for the divide service
- */
-public interface DivideService {
-
- double divide(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.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 calculator;
-
-/**
- * An implementation of the Divide service.
- */
-public class DivideServiceImpl implements DivideService {
-
- public double divide(double n1, double n2) {
- return n1 / n2;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.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 calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface MultiplyService {
-
- double multiply(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.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 calculator;
-
-/**
- * An implementation of the Multiply service.
- */
-public class MultiplyServiceImpl implements MultiplyService {
-
- public double multiply(double n1, double n2) {
- return n1 * n2;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index c8653806aa..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.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 calculator;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * The interface for the subtract service
- */
-@Remotable
-public interface SubtractService {
-
- double subtract(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.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 calculator;
-
-/**
- * An implementation of the subtract service.
- */
-public class SubtractServiceImpl implements SubtractService {
-
- public double subtract(double n1, double n2) {
- return n1 - n2;
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java deleted file mode 100644 index 9625c0d692..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.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 calculator.security;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- */
-public class ClientPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Client UserId/Password Handler .... ");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- System.out.println("User Id = " + pwcb.getIdentifer());
- System.out.println("Set Password = " + pwcb.getPassword());
- System.out.println("Usage = " + pwcb.getUsage());
- if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) {
- if ( pwcb.getIdentifer().equals("CalculatorUser")){
- pwcb.setPassword("CalculatorUserPasswd");
- } else {
- throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch");
- }
- } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) {
- if ( pwcb.getIdentifer().equals("CalculatorUser")) {
- pwcb.setPassword("CalculatorUserPasswd");
- } else {
- pwcb.setPassword("CalculatorAdmin");
- }
- }
- }
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java deleted file mode 100644 index 23a62680c5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.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 calculator.security;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- */
-public class ServerPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Server User/Passwd Handler....");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- System.out.println("User Id = " + pwcb.getIdentifer());
- System.out.println("Password = " + pwcb.getPassword());
- System.out.println("Usage = " + pwcb.getUsage());
- if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN ) {
- if ( pwcb.getIdentifer().equals("CalculatorUser") &&
- pwcb.getPassword().equals("CalculatorUserPasswd") ){
- return;
- } else {
- throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch");
- }
- } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) {
- if ( pwcb.getIdentifer().equals("CalculatorUser")) {
- pwcb.setPassword("CalculatorUserPasswd");
- } else {
- pwcb.setPassword("CalculatorAdmin");
- }
- }
- }
- }
-
-}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 4d511f887e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- xmlns:calc="http://calculator"
- name="Calculator">
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" >
- <interface.java interface="calculator.AddService" />
- <binding.ws uri="http://localhost:8080/sample-calculator-ws-secure-webapp/AddServiceComponent"
- requires="authentication" />
- </reference>
- <reference name="subtractService">
- <interface.java interface="calculator.SubtractService" />
- <binding.ws uri="http://localhost:8080/sample-calculator-ws-secure-webapp/SubtractServiceComponent"
- requires="integrity" />
- </reference>
- <reference name="multiplyService" target="MultiplyServiceComponent"></reference>
- <reference name="divideService" target="DivideServiceComponent"></reference>
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- <service name="AddService">
- <interface.java interface="calculator.AddService" />
- <binding.ws requires="authentication"/>
- </service>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- <service name="SubtractService">
- <interface.java interface="calculator.SubtractService" />
- <binding.ws requires="integrity"/>
- </service>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index 858e87a34f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures
-# handler classname;qname=<policy intent addressed>;model=<policy model class>
-org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicyHandler;intent=http://calculator#wsAuthentication,model=org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy
-org.apache.tuscany.sca.policy.security.ws.WSSecurityPolicyHandler;intent=http://calculator#wsIntegrity,model=org.apache.neethi.Policy
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks Binary files differdeleted file mode 100644 index b6b244244b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml deleted file mode 100644 index 4611669bbd..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml +++ /dev/null @@ -1,198 +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.
--->
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:calc="http://calculator">
-
-
- <!-- WS Security POLICY SETS -->
- <sca:policySet name="calc:wsAuthenticationPolicy"
- provides="sca:authentication"
- appliesTo="sca:service/sca:binding.ws"
- >
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>UsernameToken</items>
- <passwordCallbackClass>calculator.security.ServerPWCBHandler</passwordCallbackClass>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
- <sca:policySet name="calc:wsClientAuthenticationPolicy"
- provides="sca:authentication"
- appliesTo="sca:reference/sca:binding.ws">
- <tuscany:wsConfigParam>
- <parameter name="OutflowSecurity">
- <action>
- <items>UsernameToken</items>
- <user>CalculatorUser</user>
- <passwordCallbackClass>calculator.security.ClientPWCBHandler</passwordCallbackClass>" +
- <passwordType>PasswordText</passwordType>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
-
- <sca:policySet name="tuscany:wsSecurityPolicyForIntegrity"
- provides="sca:integrity"
- appliesTo="sca:service/sca:binding.ws">
- <wsp:Policy wsu:Id="SignOnly"
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:InitiatorToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:InitiatorToken>
- <sp:RecipientToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:RecipientToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:TripleDesRsa15/>
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Strict/>
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp/>
- <sp:OnlySignEntireHeadersAndBody/>
- </wsp:Policy>
- </sp:AsymmetricBinding>
- <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:MustSupportRefKeyIdentifier/>
- <sp:MustSupportRefIssuerSerial/>
- </wsp:Policy>
- </sp:Wss10>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body/>
- </sp:SignedParts>
-
- <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- <ramp:user>CalculatorAdmin</ramp:user>
- <ramp:encryptionUser>CalculatorAdmin</ramp:encryptionUser>
- <ramp:passwordCallbackClass>calculator.security.ServerPWCBHandler</ramp:passwordCallbackClass>
-
- <ramp:signatureCrypto>
- <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.file">calculatorKeys.jks</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">CalculatorAdmin</ramp:property>
- </ramp:crypto>
- </ramp:signatureCrypto>
- </ramp:RampartConfig>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- </sca:policySet>
-
- <sca:policySet name="tuscany:wsSecurityPolicyForClientIntegrity"
- provides="sca:integrity"
- appliesTo="sca:reference/sca:binding.ws">
- <wsp:Policy wsu:Id="SignOnly"
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:InitiatorToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:InitiatorToken>
- <sp:RecipientToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:RecipientToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:TripleDesRsa15/>
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Strict/>
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp/>
- <sp:OnlySignEntireHeadersAndBody/>
- </wsp:Policy>
- </sp:AsymmetricBinding>
- <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:MustSupportRefKeyIdentifier/>
- <sp:MustSupportRefIssuerSerial/>
- </wsp:Policy>
- </sp:Wss10>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body/>
- </sp:SignedParts>
-
- <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- <ramp:user>CalculatorAdmin</ramp:user>
- <ramp:encryptionUser>CalculatorAdmin</ramp:encryptionUser>
- <ramp:passwordCallbackClass>calculator.security.ClientPWCBHandler</ramp:passwordCallbackClass>
-
- <ramp:signatureCrypto>
- <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.file">calculatorKeys.jks</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">CalculatorAdmin</ramp:property>
- </ramp:crypto>
- </ramp:signatureCrypto>
- </ramp:RampartConfig>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- </sca:policySet>
-
- </sca:definitions>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/security.properties b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/security.properties deleted file mode 100644 index 8ef9928018..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/resources/security.properties +++ /dev/null @@ -1,20 +0,0 @@ -## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
-org.apache.ws.security.crypto.merlin.keystore.type=jks
-org.apache.ws.security.crypto.merlin.keystore.password=CalculatorAdmin
-org.apache.ws.security.crypto.merlin.file=calculatorKeys.jks
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 8b60ae590c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-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://www.osoa.org/xmlns/sca/1.0"
- xmlns:sample="http://sample">
- <deployable composite="sample:Calculator"/>
-</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index eb8786e13a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /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.
--->
-<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
- xmlns:d="http://geronimo.apache.org/xml/ns/deployment-1.2">
-
- <d:environment>
- <d:moduleId>
- <d:groupId>org.apache.tuscany.sca</d:groupId>
- <d:artifactId>sample-calculator-ws-webapp</d:artifactId>
- <d:version>1.6.1-SNAPSHOT</d:version>
- <d:type>war</d:type>
- </d:moduleId>
-
- <!-- TUSCANY-2622 -->
- <d:hidden-classes>
- <d:filter>org.apache.axiom</d:filter>
- <d:filter>org.apache.axis2</d:filter>
- <d:filter>org.apache.commons</d:filter>
- <d:filter>org.jdom</d:filter>
- </d:hidden-classes>
-
- </d:environment>
-</web-app>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d3a62d39f4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
-Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
-
- <display-name>Apache Tuscany Calculator Web Service Sample</display-name>
-
- <filter>
- <filter-name>tuscany</filter-name>
- <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>tuscany</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>calc.jsp</welcome-file>
- </welcome-file-list>
-
-</web-app>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp b/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4c4366747d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%>
-
-<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%>
-<%@ page import="calculator.CalculatorService" %> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); - CalculatorService calculatorService = (CalculatorService)scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
-%> -<html> -<head><title>Calculator sample</title></head> - -<body> -<table> - <tr> - <th>Expression</th><th>Result</th> - </tr> - <tr> - <td>2 + 3</td><td><%= calculatorService.add(2, 3) %></td> - </tr> - <tr> - <td>3 - 2</td><td><%= calculatorService.subtract(3, 2) %></td> - </tr>
- <tr>
- <td>3 * 2</td><td><%= calculatorService.multiply(3, 2) %></td>
- </tr>
- <tr>
- <td>3 / 2</td><td><%= calculatorService.divide(3, 2) %></td>
- </tr> -</table> -</body> -</html>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/README deleted file mode 100644 index 9c1729123f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/README +++ /dev/null @@ -1,104 +0,0 @@ -Customer Dojo RPC Sample -=========================== - -Note. This sample is currently not working correctly on WebSphere - see TUSCANY-1990 - -This sample demostrates the SCA JSONRPC binding using a simple web app that -uses the RPC support of the Dojo Toolkit to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-dojo-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -See also the similar helloworld-jsonrpc-webapp sample which also uses the SCA JSONRPC binding -but uses SCA scaDomain.js script on the client instead of the Dojo Toolkit. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the Dojo Toolkit JSON-RPC support can be -used to invoke the SCA service. - -The web app provided shows how the service can be called by using the DOJO toolkit. - -helloworld-dojo-webapp/ - build-dojo.xml - This file is an Ant script used by the - sample build process to download the Dojo Toolkit - and get it included in the WAR file - for use by the sample. - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - dojo/ - the Dojo toolkit (this directory is created only - when you build the samples from the source distribution) - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-dojo-webapp -ant package - -This should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-dojo-webapp -mvn - -Again this should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/build-dojo.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/build-dojo.xml deleted file mode 100644 index 0d84681360..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/build-dojo.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 name="DojoZipInstaller"> - - <property name="dojo.version" value="1.3.0"/> - <property name="dojo.zip" value="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip"/> - <property name="unpack.location" value="${basedir}/src/main/webapp/dojo"/> - - - <target name="check-dojo-installed"> - <condition property="already.installed" > - <available file="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip"/> - </condition> - </target> - - <target name="check-dojo-unpacked"> - <condition property="already.unpacked" > - <available file="${unpack.location}"/> - </condition> - </target> - - <target name="unpack-dojo-files" depends="check-dojo-installed, check-dojo-unpacked" unless="already.unpacked"> - <fail message="dojo zip file not installed in local repository: ${localRepository}" unless="already.installed"/> - <mkdir dir="${basedir}/target/dojo-unpack-temp/"/> - <unzip src="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip" - dest="${basedir}/target/dojo-unpack-temp/" - overwrite="false" - encoding="native-encoding"> - <patternset> - <include name="dojo-${dojo.version}/dojo/**"/> - <exclude name="dojo-${dojo.version}/dojo/tests/**"/> - <include name="dojo-${dojo.version}/dijit/**"/> - <exclude name="dojo-${dojo.version}/dojox/**"/> - <exclude name="dojo-${dojo.version}/util/**"/> - </patternset> - </unzip> - <move file="${basedir}/target/dojo-unpack-temp/dojo-${dojo.version}" - tofile="${unpack.location}" - verbose="true"/> - <delete dir="${basedir}/target/dojo-unpack-temp/"/> - </target> - - <target name="clean-dojo-files"> - <delete dir="${unpack.location}"/> - </target> - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/build.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/build.xml deleted file mode 100644 index db10db5adf..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/build.xml +++ /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. ---> -<!DOCTYPE project [ -<!ENTITY buildDependency SYSTEM "build-dependency.xml"> -]> - -<project name="sample-customer-dojo-webapp" default="compile"> - - &buildDependency; - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - </copy> - - <ant antfile="./build-dojo.xml" target="install-dojo-nomaven"> - <property name="localRepository" value="./target/repo"/> - </ant> - - <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> - <property name="localRepository" value="./target/repo"/> - </ant> - - <war destfile="target/sample-helloworld-dojo-webapp.war" webxml="src/main/webapp/WEB-INF/web.xml"> - <fileset dir="src/main/webapp"/> - <lib refid="tuscany.jars"/> - <lib refid="3rdparty.jars"/> - <classes dir="target/classes"/> - </war> - - <ant antfile="./build-dojo.xml" target="clean-dojo-files"> - <property name="localRepository" value="./target/repo"/> - </ant> - </target> - - <target name="package" depends="compile"/> - - <target name="clean"> - <delete dir="target" includeemptydirs="true"/> - </target> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer-dojo-jsonrpc.png b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer-dojo-jsonrpc.png Binary files differdeleted file mode 100644 index 57f90aed01..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer-dojo-jsonrpc.png +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer-dojo-jsonrpc.svg b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer-dojo-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer-dojo-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-jsonrpc-webapp"
- sodipodi:docname="helloworld-jsonrpc-webapp.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-jsonrpc-webapp\helloworld-jsonrpc.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="516.28571"
- inkscape:cy="414.63224"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="158"
- inkscape:window-y="164" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="translate(144.2857,52.85714)">
- <rect
- rx="8.0946665"
- ry="12.692303"
- y="192.00233"
- x="258.31134"
- height="299.99988"
- width="262.14267"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999893;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">helloworldjsonrpc</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="449.91632"
- y="349.31049"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(190.3256,143.3719)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">HelloWorld</flowPara><flowPara
- id="flowPara1883">JSONService</flowPara><flowPara
- id="flowPara1885">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 373.48019,364.72909 L 455.16689,364.72909 L 470.019,392.34681 L 452.69154,417.84009 L 373.48019,417.84009 L 392.04536,392.34681 L 373.48019,364.72909 z "
- id="path3017" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1887"
- transform="translate(113.6483,167.4037)"><flowRegion
- id="flowRegion1889"><rect
- id="rect1891"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1893">HelloWorld</flowPara><flowPara
- id="flowPara1897">Service</flowPara></flowRoot> <rect
- style="opacity:1;fill:#f19a9a;fill-opacity:1;stroke:#2e2424;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3, 1;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1888"
- width="85"
- height="97.85714"
- x="214.28571"
- y="340.52307"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1892"
- transform="translate(-56.88742,135.3526)"><flowRegion
- id="flowRegion1894"><rect
- id="rect1896"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1900">WebApp</flowPara></flowRoot> <rect
- style="opacity:1;fill:#f19a9a;fill-opacity:1;stroke:#2e2424;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3, 1;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1912"
- width="45.714287"
- height="40.714287"
- x="277.85715"
- y="370.52304"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1914"
- transform="translate(1.400116,166.6895)"><flowRegion
- id="flowRegion1916"><rect
- id="rect1918"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1920">DOJO</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 324.28571,391.23734 C 391.42857,391.95163 391.42857,391.95163 391.42857,391.95163"
- id="path1922" />
- </g>
-</svg>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer.sql b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer.sql deleted file mode 100644 index a3caf8e050..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/customer.sql +++ /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. --- - -DROP TABLE CUSTOMER; - -CREATE TABLE CUSTOMER ( - ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY, - NAME VARCHAR(30), - PHONE VARCHAR(10), - ADDRESS VARCHAR(25), - CITY VARCHAR(15), - STATE VARCHAR(2), - ZIP VARCHAR(5)); - -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Joe Smith', '4081234567', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Erik Johnson', '4081230987', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Mark Pensacola', '4085679988', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134');
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/pom.xml deleted file mode 100644 index 7d235f66d7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/pom.xml +++ /dev/null @@ -1,218 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>sample-customer-dojo-webapp</artifactId> - <packaging>war</packaging> - <name>Apache Tuscany SCA Sample Customer DOJO WebApp</name> - - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository</url> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-webapp</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-jpa_3.0_spec</artifactId> - <version>1.1</version> - </dependency> - - <dependency> - <groupId>org.apache.openjpa</groupId> - <artifactId>openjpa</artifactId> - <version>1.0.0</version> - <exclusions> - <exclusion> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - </dependency> - - <dependency> - <groupId>org.dojotoolkit</groupId> - <artifactId>dojo</artifactId> - <version>1.3.0</version> - <type>zip</type> - </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.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <!-- version>1.1</version --> - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - </dependencies> - <executions> - <execution> - <id>copy-dojo-files</id> - <phase>generate-resources</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> - <property name="localRepository" value="${settings.localRepository}"/> - <property name="artifactId" value="${artifactId}"/> - </ant> - </tasks> - </configuration> - </execution> - <execution> - <id>clean-dojo-files</id> - <phase>package</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <ant antfile="./build-dojo.xml" target="clean-dojo-files"> - <property name="localRepository" value="${settings.localRepository}"/> - <property name="artifactId" value="${artifactId}"/> - </ant> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6.1-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <buildDependencyFileOnly>true</buildDependencyFileOnly> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>sql-maven-plugin</artifactId> - <version>1.3</version> - - <dependencies> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - </dependency> - </dependencies> - - <executions> - <execution> - <id>create-db</id> - <phase>generate-resources</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:${pom.basedir}/target/classes/customer-db;create=true</url> - <autocommit>true</autocommit> - <onError>continue</onError> - <onConnectionError>skip</onConnectionError> - <delimiter>;</delimiter> - <srcFiles> - <srcFile>${pom.basedir}/customer.sql</srcFile> - </srcFiles> - </configuration> - </execution> - - <!-- Shutdown DB in order to be able to run unit tests --> - <execution> - <id>shutdown-database-sothat-test-can-run</id> - <phase>process-test-resources</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:${pom.basedir}/target/classes/customer-db;shutdown=true</url> - <skipOnConnectionError>true</skipOnConnectionError> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/Customer.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/Customer.java deleted file mode 100644 index 6d207ea2ef..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/Customer.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 customer; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.Id; - -@Entity -public class Customer { - - @Id protected int id; - @Basic protected String name; - @Basic protected String phone; - @Basic protected String address; - @Basic protected String city; - @Basic protected String state; - @Basic protected String zip; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.java deleted file mode 100644 index 5ad39aad5c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.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 customer; - -import org.apache.tuscany.sca.data.collection.Collection; - - -public interface CustomerCollection extends Collection<String, Customer> { - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java deleted file mode 100644 index c0a2f25f15..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 customer; - -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; - - -public class CustomerCollectionImpl implements CustomerCollection { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerCollectionImpl() { - System.out.println(">>>"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void delete(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Customer get(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - return null; - } - - public Entry<String, Customer>[] getAll() { - EntityTransaction tx = em.getTransaction(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - - System.out.println(customer); - } - - tx.commit(); - } catch(Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return null; - } - - public String post(String arg0, Customer arg1) { - // TODO Auto-generated method stub - return null; - } - - public void put(String arg0, Customer arg1) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Entry<String, Customer>[] query(String arg0) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.java deleted file mode 100644 index 7915cc6e77..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.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 customer; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CustomerService { - - Customer[] get(); - - Customer findCustomerByName(String name); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java deleted file mode 100644 index 0cba7d8bc1..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package customer; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; - -public class CustomerServiceImpl implements CustomerService { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerServiceImpl() { - - } - - @Init - public void init() { - System.out.println(">>> Initializing JPA"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Destroy - public void destroy() { - emf.close(); - } - - public Customer[] get() { - EntityTransaction tx = em.getTransaction(); - List<Customer> customers = new ArrayList<Customer>(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - customers.add(customer); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - Customer[] customerArray = new Customer[customers.size()]; - customers.toArray(customerArray); - return customerArray; - } - - public Customer findCustomerByName(String name) { - EntityTransaction tx = em.getTransaction(); - Customer customer = null; - - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c WHERE c.name = '" + name + "'"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - customer = (Customer)iter.next(); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return customer; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/launch/Launch.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/launch/Launch.java deleted file mode 100644 index d7f88b8dd4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/java/launch/Launch.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class Launch { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("customer.composite"); - System.out.println("store.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.xml deleted file mode 100644 index 64be295302..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.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. ---> - -<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" - version="1.0"> - <entity class="customer.Customer" name="customer"> - <table name="CUSTOMER"/> - <attributes> - <id name="id"> - <generated-value strategy="TABLE"/> - </id> - <basic name="name"> - <column name="NAME" length="30"/> - </basic> - <basic name="phone"> - <column name="PHONE" length="10"/> - </basic> - <basic name="address"> - <column name="ADDRESS" length="25"/> - </basic> - <basic name="city"> - <column name="CITY" length="15"/> - </basic> - <basic name="state"> - <column name="STATE" length="2"/> - </basic> - <basic name="zip"> - <column name="ZIP" length="5"/> - </basic> - </attributes> - </entity> -</entity-mappings>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 5674dede06..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml +++ /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. ---> - -<persistence xmlns="http://java.sun.com/xml/ns/persistence" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/persistence - http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> - - <persistence-unit name="customer-openJPA"> - <mapping-file>orm.xml</mapping-file> - <class>customer.Customer</class> - - <properties> - <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/> - <property name="openjpa.ConnectionURL" value="jdbc:derby:/opt/apache-tomcat-6.0.16/webapps/sample-customer-dojo-webapp/WEB-INF/classes/customer-db"/> - <property name="openjpa.ConnectionUserName" value=""/> - <property name="openjpa.ConnectionPassword" value=""/> - - <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=TRACE"/> - </properties> - </persistence-unit> - -</persistence>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 59840213e4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. ---> - -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:sample="http://sample"> - <deployable composite="sample:customer"/> -</contribution> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/customer.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/customer.composite deleted file mode 100644 index 8b8a413499..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/resources/customer.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> - -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="customer"> - - <service name="CustomerService" promote="CustomerServiceComponent/CustomerService"> - <interface.java interface="customer.CustomerService"/> - <tuscany:binding.jsonrpc/> - </service> - - <component name="CustomerServiceComponent"> - <implementation.java class="customer.CustomerServiceImpl"/> - </component> - -</composite> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index b390efd009..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-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://www.osoa.org/xmlns/sca/1.0" - xmlns:sample="http://sample"> - <deployable composite="sample:customer"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 21dde0c2e5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /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. ---> -<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0" - xmlns:d="http://geronimo.apache.org/xml/ns/deployment-1.2"> - - <d:environment> - <d:moduleId> - <d:groupId>org.apache.tuscany.sca</d:groupId> - <d:artifactId>sample-customer-dojo-webapp</d:artifactId> - <d:version>1.6.1-SNAPSHOT</d:version> - <d:type>war</d:type> - </d:moduleId> - - <!-- TUSCANY-2622 --> - <d:hidden-classes> - <d:filter>org.apache.axiom</d:filter> - <d:filter>org.apache.axis2</d:filter> - <d:filter>org.apache.commons</d:filter> - <d:filter>org.jdom</d:filter> - </d:hidden-classes> - - </d:environment> -</web-app> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d90b4a7d62..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> - -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web -Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> -<web-app> - - <display-name>Apache Tuscany Customer dojo web application sample</display-name> - - <filter> - <filter-name>tuscany</filter-name> - <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> - </filter> - - <filter-mapping> - <filter-name>tuscany</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <welcome-file-list id="WelcomeFileList"> - <welcome-file>customer.jsp</welcome-file> - </welcome-file-list> - -</web-app> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/customer.jsp b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/customer.jsp deleted file mode 100644 index f7e864053e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo-webapp/src/main/webapp/customer.jsp +++ /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.
---%>
-
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
-<html>
-<head>
- <title>Tuscany Dojo JSON-RPC Customer Example</TITLE>
-
- <style type="text/css">
- @import "dojo/dijit/themes/soria/soria.css";
- @import "dojo/dojo/resources/dojo.css"
- </style>
-
- <script type="text/javascript">
- var djConfig = {
- parseOnLoad: true,
- baseRelativePath: "dojo",
- isDebug: true,
- debugContainerId: "dojoDebug"
- };
- djConfig.usePlainJson=true ;
- //djConfig.debugAtAllCosts = true;
- </script>
-
- <script type="text/javascript" src="dojo/dojo/dojo.js"></script>
- <script type="text/javascript" src="dojo/dijit/dijit.js"></script>
-
- <script type="text/javascript">
- dojo.require("dojo.parser");
- dojo.require("dojo.rpc.JsonService");
- dojo.require("dijit.form.ValidationTextBox");
- dojo.require("dijit.form.Button");
- </script>
-
- <link rel="stylesheet" type="text/css" href="style.css" />
-</head>
-
-<body class="soria">
-
-<h2>Tuscany Dojo JSON-RPC Customer Sample</h2>
-
-Customer Name :<br>
-<input type="text" id="name" size="30" value="Joe Smith" dojoType="dijit.form.TextBox" trim="true" propercase="true" required="true" />
-<input type="button" dojoType="dijit.form.Button" onclick="findCustomerByName()" />
-
-
-<script type="text/javascript">
- function findCustomerByName() {
- var name = document.getElementById("name").value;
- customerService.findCustomerByName(name).addCallback(contentCallBack);;
- }
-
- function contentCallBack(result) {
- alert(result.name);
- //var handlerNode = document.getElementById("ReturnedContent");
- //handlerNode.innerHTML = "<p>" + result + "</p>" ;
- }
-
- var customerService = new dojo.rpc.JsonService("CustomerService?smd");
-</script>
-
-</body>
-</html>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/README deleted file mode 100644 index 9c1729123f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/README +++ /dev/null @@ -1,104 +0,0 @@ -Customer Dojo RPC Sample -=========================== - -Note. This sample is currently not working correctly on WebSphere - see TUSCANY-1990 - -This sample demostrates the SCA JSONRPC binding using a simple web app that -uses the RPC support of the Dojo Toolkit to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-dojo-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -See also the similar helloworld-jsonrpc-webapp sample which also uses the SCA JSONRPC binding -but uses SCA scaDomain.js script on the client instead of the Dojo Toolkit. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the Dojo Toolkit JSON-RPC support can be -used to invoke the SCA service. - -The web app provided shows how the service can be called by using the DOJO toolkit. - -helloworld-dojo-webapp/ - build-dojo.xml - This file is an Ant script used by the - sample build process to download the Dojo Toolkit - and get it included in the WAR file - for use by the sample. - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - dojo/ - the Dojo toolkit (this directory is created only - when you build the samples from the source distribution) - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-dojo-webapp -ant package - -This should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-dojo-webapp -mvn - -Again this should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/build-dojo.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/build-dojo.xml deleted file mode 100644 index 5a715b1e6b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/build-dojo.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 name="DojoZipInstaller"> - - <property name="dojo.version" value="1.3.0"/> - <property name="dojo.zip" value="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip"/> - <property name="unpack.location" value="${basedir}/src/main/resources/dojo"/> - - - <target name="check-dojo-installed"> - <condition property="already.installed" > - <available file="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip"/> - </condition> - </target> - - <target name="check-dojo-unpacked"> - <condition property="already.unpacked" > - <available file="${unpack.location}"/> - </condition> - </target> - - <target name="unpack-dojo-files" depends="check-dojo-installed, check-dojo-unpacked" unless="already.unpacked"> - <fail message="dojo zip file not installed in local repository: ${localRepository}" unless="already.installed"/> - <mkdir dir="${basedir}/target/dojo-unpack-temp/"/> - <unzip src="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip" - dest="${basedir}/target/dojo-unpack-temp/" - overwrite="false" - encoding="native-encoding"> - <patternset> - <include name="dojo-${dojo.version}/dojo/**"/> - <exclude name="dojo-${dojo.version}/dojo/tests/**"/> - <exclude name="dojo-${dojo.version}/dijit/**"/> - <exclude name="dojo-${dojo.version}/dojox/**"/> - <exclude name="dojo-${dojo.version}/util/**"/> - </patternset> - </unzip> - <move file="${basedir}/target/dojo-unpack-temp/dojo-${dojo.version}" - tofile="${unpack.location}" - verbose="true"/> - <delete dir="${basedir}/target/dojo-unpack-temp/"/> - </target> - - <target name="clean-dojo-files"> - <delete dir="${unpack.location}"/> - </target> - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/build.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/build.xml deleted file mode 100644 index d2b0c0a3d7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/build.xml +++ /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. ---> -<!DOCTYPE project [ -<!ENTITY buildDependency SYSTEM "build-dependency.xml"> -]> - -<project name="sample-customer-dojo" default="compile"> - - &buildDependency; - - <target name="compile"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src\main\java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src\main\resources"/> - </copy> - - <ant antfile="./build-dojo.xml" target="install-dojo-nomaven"> - <property name="localRepository" value="./target/repo"/> - </ant> - - <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> - <property name="localRepository" value="./target/repo"/> - </ant> - - <war destfile="target/sample-helloworld-dojo-webapp.war" webxml="src/main/webapp/WEB-INF/web.xml"> - <fileset dir="src/main/webapp"/> - <lib refid="tuscany.jars"/> - <lib refid="3rdparty.jars"/> - <classes dir="target/classes"/> - </war> - - <ant antfile="./build-dojo.xml" target="clean-dojo-files"> - <property name="localRepository" value="./target/repo"/> - </ant> - </target> - - <target name="package" depends="compile"/> - - <target name="clean"> - <delete dir="target" includeemptydirs="true"/> - </target> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer-dojo-jsonrpc.png b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer-dojo-jsonrpc.png Binary files differdeleted file mode 100644 index 57f90aed01..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer-dojo-jsonrpc.png +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer-dojo-jsonrpc.svg b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer-dojo-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer-dojo-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-jsonrpc-webapp"
- sodipodi:docname="helloworld-jsonrpc-webapp.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-jsonrpc-webapp\helloworld-jsonrpc.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="516.28571"
- inkscape:cy="414.63224"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="158"
- inkscape:window-y="164" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="translate(144.2857,52.85714)">
- <rect
- rx="8.0946665"
- ry="12.692303"
- y="192.00233"
- x="258.31134"
- height="299.99988"
- width="262.14267"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999893;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">helloworldjsonrpc</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="449.91632"
- y="349.31049"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(190.3256,143.3719)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">HelloWorld</flowPara><flowPara
- id="flowPara1883">JSONService</flowPara><flowPara
- id="flowPara1885">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 373.48019,364.72909 L 455.16689,364.72909 L 470.019,392.34681 L 452.69154,417.84009 L 373.48019,417.84009 L 392.04536,392.34681 L 373.48019,364.72909 z "
- id="path3017" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1887"
- transform="translate(113.6483,167.4037)"><flowRegion
- id="flowRegion1889"><rect
- id="rect1891"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1893">HelloWorld</flowPara><flowPara
- id="flowPara1897">Service</flowPara></flowRoot> <rect
- style="opacity:1;fill:#f19a9a;fill-opacity:1;stroke:#2e2424;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3, 1;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1888"
- width="85"
- height="97.85714"
- x="214.28571"
- y="340.52307"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1892"
- transform="translate(-56.88742,135.3526)"><flowRegion
- id="flowRegion1894"><rect
- id="rect1896"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1900">WebApp</flowPara></flowRoot> <rect
- style="opacity:1;fill:#f19a9a;fill-opacity:1;stroke:#2e2424;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3, 1;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1912"
- width="45.714287"
- height="40.714287"
- x="277.85715"
- y="370.52304"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1914"
- transform="translate(1.400116,166.6895)"><flowRegion
- id="flowRegion1916"><rect
- id="rect1918"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1920">DOJO</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 324.28571,391.23734 C 391.42857,391.95163 391.42857,391.95163 391.42857,391.95163"
- id="path1922" />
- </g>
-</svg>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer.sql b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer.sql deleted file mode 100644 index a3caf8e050..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/customer.sql +++ /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. --- - -DROP TABLE CUSTOMER; - -CREATE TABLE CUSTOMER ( - ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY, - NAME VARCHAR(30), - PHONE VARCHAR(10), - ADDRESS VARCHAR(25), - CITY VARCHAR(15), - STATE VARCHAR(2), - ZIP VARCHAR(5)); - -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Joe Smith', '4081234567', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Erik Johnson', '4081230987', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Mark Pensacola', '4085679988', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134');
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/pom.xml deleted file mode 100644 index fa0c7d52ab..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/pom.xml +++ /dev/null @@ -1,237 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>sample-customer-dojo</artifactId> - <name>Apache Tuscany SCA Sample Customer DOJO</name> - - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository</url> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-data-api</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-resource-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-jpa_3.0_spec</artifactId> - <version>1.1</version> - </dependency> - - <dependency> - <groupId>org.apache.openjpa</groupId> - <artifactId>openjpa</artifactId> - <version>1.0.0</version> - <exclusions> - <exclusion> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - </dependency> - - <dependency> - <groupId>org.dojotoolkit</groupId> - <artifactId>dojo</artifactId> - <version>1.3.0</version> - <type>zip</type> - </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.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <!-- version>1.1</version --> - <dependencies> - <dependency> - <groupId>ant</groupId> - <artifactId>ant-trax</artifactId> - <version>1.6.5</version> - </dependency> - </dependencies> - <executions> - <execution> - <id>copy-dojo-files</id> - <phase>generate-resources</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> - <property name="localRepository" value="${settings.localRepository}"/> - <property name="artifactId" value="${artifactId}"/> - </ant> - </tasks> - </configuration> - </execution> - <execution> - <id>clean-dojo-files</id> - <phase>package</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <ant antfile="./build-dojo.xml" target="clean-dojo-files"> - <property name="localRepository" value="${settings.localRepository}"/> - <property name="artifactId" value="${artifactId}"/> - </ant> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6.1-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <buildDependencyFileOnly>true</buildDependencyFileOnly> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>sql-maven-plugin</artifactId> - <version>1.3</version> - - <dependencies> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.3.1.4</version> - </dependency> - </dependencies> - - <executions> - <execution> - <id>create-db</id> - <phase>generate-resources</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:${pom.basedir}/target/classes/customer-db;create=true</url> - <autocommit>true</autocommit> - <onError>continue</onError> - <onConnectionError>skip</onConnectionError> - <delimiter>;</delimiter> - <srcFiles> - <srcFile>${pom.basedir}/customer.sql</srcFile> - </srcFiles> - </configuration> - </execution> - - <!-- Shutdown DB in order to be able to run unit tests --> - <execution> - <id>shutdown-database-sothat-test-can-run</id> - <phase>process-test-resources</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:${pom.basedir}/target/classes/customer-db;shutdown=true</url> - <skipOnConnectionError>true</skipOnConnectionError> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/Customer.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/Customer.java deleted file mode 100644 index 6d207ea2ef..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/Customer.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 customer; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.Id; - -@Entity -public class Customer { - - @Id protected int id; - @Basic protected String name; - @Basic protected String phone; - @Basic protected String address; - @Basic protected String city; - @Basic protected String state; - @Basic protected String zip; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerCollection.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerCollection.java deleted file mode 100644 index 5ad39aad5c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerCollection.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 customer; - -import org.apache.tuscany.sca.data.collection.Collection; - - -public interface CustomerCollection extends Collection<String, Customer> { - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java deleted file mode 100644 index c0a2f25f15..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 customer; - -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; - - -public class CustomerCollectionImpl implements CustomerCollection { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerCollectionImpl() { - System.out.println(">>>"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void delete(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Customer get(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - return null; - } - - public Entry<String, Customer>[] getAll() { - EntityTransaction tx = em.getTransaction(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - - System.out.println(customer); - } - - tx.commit(); - } catch(Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return null; - } - - public String post(String arg0, Customer arg1) { - // TODO Auto-generated method stub - return null; - } - - public void put(String arg0, Customer arg1) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Entry<String, Customer>[] query(String arg0) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerService.java deleted file mode 100644 index 7915cc6e77..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerService.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 customer; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CustomerService { - - Customer[] get(); - - Customer findCustomerByName(String name); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java deleted file mode 100644 index 0cba7d8bc1..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package customer; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; - -public class CustomerServiceImpl implements CustomerService { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerServiceImpl() { - - } - - @Init - public void init() { - System.out.println(">>> Initializing JPA"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Destroy - public void destroy() { - emf.close(); - } - - public Customer[] get() { - EntityTransaction tx = em.getTransaction(); - List<Customer> customers = new ArrayList<Customer>(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - customers.add(customer); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - Customer[] customerArray = new Customer[customers.size()]; - customers.toArray(customerArray); - return customerArray; - } - - public Customer findCustomerByName(String name) { - EntityTransaction tx = em.getTransaction(); - Customer customer = null; - - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c WHERE c.name = '" + name + "'"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - customer = (Customer)iter.next(); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return customer; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/launch/Launch.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/launch/Launch.java deleted file mode 100644 index a51ab605bc..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/java/launch/Launch.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 launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class Launch { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("customer.composite"); - System.out.println("customer.composite ready for big business !!!"); - System.out.println("url : http://localhost:8080/customer.html"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/orm.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/orm.xml deleted file mode 100644 index 64be295302..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/orm.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. ---> - -<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" - version="1.0"> - <entity class="customer.Customer" name="customer"> - <table name="CUSTOMER"/> - <attributes> - <id name="id"> - <generated-value strategy="TABLE"/> - </id> - <basic name="name"> - <column name="NAME" length="30"/> - </basic> - <basic name="phone"> - <column name="PHONE" length="10"/> - </basic> - <basic name="address"> - <column name="ADDRESS" length="25"/> - </basic> - <basic name="city"> - <column name="CITY" length="15"/> - </basic> - <basic name="state"> - <column name="STATE" length="2"/> - </basic> - <basic name="zip"> - <column name="ZIP" length="5"/> - </basic> - </attributes> - </entity> -</entity-mappings>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/persistence.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 5add897279..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/persistence.xml +++ /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. ---> - -<persistence xmlns="http://java.sun.com/xml/ns/persistence" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/persistence - http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> - - <persistence-unit name="customer-openJPA"> - <mapping-file>orm.xml</mapping-file> - <class>customer.Customer</class> - - <properties> - <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/> - <property name="openjpa.ConnectionURL" value="jdbc:derby:target/classes/customer-db"/> - <property name="openjpa.ConnectionUserName" value=""/> - <property name="openjpa.ConnectionPassword" value=""/> - - <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=TRACE"/> - </properties> - </persistence-unit> - -</persistence>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 59840213e4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. ---> - -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:sample="http://sample"> - <deployable composite="sample:customer"/> -</contribution> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/content/customer.html b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/content/customer.html deleted file mode 100644 index dbc8aad9d0..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/content/customer.html +++ /dev/null @@ -1,77 +0,0 @@ -<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 Dojo JSON-RPC Customer Example</TITLE> - - <style type="text/css"> - @import "dojo/dijit/themes/soria/soria.css"; - @import "dojo/dojo/resources/dojo.css" - </style> - - <script type="text/javascript"> - var djConfig = { - parseOnLoad: true, - baseRelativePath: "dojo", - isDebug: true, - debugContainerId: "dojoDebug" - }; - djConfig.usePlainJson=true ; - //djConfig.debugAtAllCosts = true; - </script> - - <script type="text/javascript" src="dojo/dojo/dojo.js"></script> - <script type="text/javascript" src="dojo/dijit/dijit.js"></script> - - <script type="text/javascript"> - dojo.require("dojo.parser"); - dojo.require("dojo.rpc.JsonService"); - dojo.require("dijit.form.ValidationTextBox"); - dojo.require("dijit.form.Button"); - </script> - - <link rel="stylesheet" type="text/css" href="style.css" /> -</head> - -<body class="soria"> - -<h2>Tuscany Dojo JSON-RPC Customer Sample</h2> - -Customer Name :<br> -<input type="text" id="name" size="30" value="Joe Smith" dojoType="dijit.form.TextBox" trim="true" propercase="true" required="true" /> -<input type="button" dojoType="dijit.form.Button" onclick="findCustomerByName()" /> - - -<script type="text/javascript"> - function findCustomerByName() { - var name = document.getElementById("name").value; - customerService.findCustomerByName(name).addCallback(contentCallBack);; - } - - function contentCallBack(result) { - alert(result.name); - //var handlerNode = document.getElementById("ReturnedContent"); - //handlerNode.innerHTML = "<p>" + result + "</p>" ; - } - - var customerService = new dojo.rpc.JsonService("/CustomerService?smd"); -</script> - -</body> -</html> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/customer.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/customer.composite deleted file mode 100644 index 4c370f2a9f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/customer-dojo/src/main/resources/customer.composite +++ /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. ---> - -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - name="customer"> - - <component name="ui"> - <tuscany:implementation.resource location="content"/> - <service name="Resource"> - <tuscany:binding.http uri="/"/> - </service> - </component> - - <service name="CustomerService" promote="CustomerServiceComponent/CustomerService"> - <interface.java interface="customer.CustomerService"/> - <tuscany:binding.jsonrpc/> - </service> - - <component name="CustomerServiceComponent"> - <implementation.java class="customer.CustomerServiceImpl"/> - </component> - -</composite> - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/README deleted file mode 100644 index c01a0dd39a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/README +++ /dev/null @@ -1,310 +0,0 @@ -Domain Webapp Sample
-====================
-
-Not actually a webapp just yet as webapp host need to use the new domain for it to work.
-If you run the DomainServer in a debugger you will get a server that provides a registry
-for servide URLs, listens for Nodes starting and stopping and provides a web page where
-you can see what nodes are registered and pull up their web pages.
-
-Use the nodes from the calculator-distributed to register with this domain
-
-
-==========================================
-Below copied from calculator sample as a template for when this gets done
-
-
-This sample implements a simple calculator using SCA components. It uses
-exactly the same calculator application classes as the calculator sample but
-runs the application distributed across three nodes.
-
-A node in this sample means an instance of the Tuscany SCA java runtime running
-in a Java virtual machine.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open four command prompts and
-navigate to this sample directory in each one. There is one command to be run
-in each command prompt:
-
-ant runDomainNode
-ant runNodeB
-ant runNodeC
-ant runNodeA
-
-Please run the commands in this order.
-
-OR if you don't have ant, on Windows use
-
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.DomainNode
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.CalculatorNode mydomain nodeB
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.CalculatorNode mydomain nodeC
-java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.CalculatorNode mydomain nodeA
-
-and on *nix do
-
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.DomainNode
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.CalculatorNode mydomain nodeB
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.CalculatorNode mydomain nodeC
-java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.CalculatorNode mydomain nodeA
-
-
-The processes started on each of these command prompts can be ended by pressing
-the <Enter> key.
-
-
-Sample Overview
----------------
-The sample provides a single calculator service with a default SCA (java)
-binding. NodeA exercises this interface by calling add, subtract, multiply and
-divide operations.
-
-In the case of add and subtract the runtime recognises that
-it can't find these services locally and, using the remote (web services)
-version of the default SCA binding contacts the add service running in NodeB
-and the subtract service running in NodeC.
-
-On the command prompt where you started NodeA, you would see output of invoking the
-calculator functions distributed over NodeB and and NodeC. On the command prompts
-where you have started NodeB and NodeC, you would see log messages that indicate that
-the add and substract services where called on these nodes respectively.
-
-The sample demonstrates that the calculator application can be distributed
-across multiple nodes with no change to the application or to the SCA description
-files.
-
-
-calculator/
- src/
- main/
- java/
- calculator/
- CalculatorService.java - the first component, calls +-/* as
- appropriate
- AddService.java - adds two numbers
- AddServiceImpl.java
- SubtractService.java - subtracts one number from another
- SubtractServiceImpl.java
- MultiplyService.java - multiplies two numbers
- MultiplyServiceImpl.java
- DivideService.java - divides one number by another
- DivideServiceImpl.java
- node/
- CalculatorNode.java - runs up an sca application based on
- configuration given on the command
- line in the form
-
- CalculatorNode <domain name> <node name>
-
- it looks for a directory name the same
- as <node name> and loads the composites
- there
-
- if <node name> = nodeA it calls the
- +-/* operations otherwise it behaves
- like a server and waits for service
- requests
- DomainNode.java - the node that provides the service
- discovery mechanism to the distributed
- domain
- resources/
- domain - the SCA assembly for the service discovery
- function
- management/ - the SCA assembly for each nodes management
- function
- nodeA - the SCA assembly for nodeA's part of the
- calculator application
- nodeB - the SCA assembly for nodeB's part of the
- calculator application
- nodeC - the SCA assembly for nodeB's part of the
- calculator application
- test/
- java/
- calculator/
- DomainInMemoryTestCase.java - JUnit test case which runs all of the
- separate ndes in a single VM for test
- purposes
- calculator-distributed.png - a pictorial representation of the sample
- .composite files
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd calculator-distributed
-ant compile
-ant runDomainNode
-ant runNodeB
-ant runNodeC
-ant runNodeA
-
-You should see the following output from the four separate command prompt:
-
-runDomainNode:
- [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.
-om.util.StAXUtils).
- [java] log4j:WARN Please initialize the log4j system properly.
- [java] 23-Aug-2007 17:40:40 org.apache.tuscany.sca.http.jetty.JettyServer a
-ddServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8080/ServiceDiscoveryC
-omponent/ServiceDiscovery
- [java] Domain node started (press enter to shutdown)
- [java] Registering service: [mydomain nodeB AddServiceComponent org.apache.
-tuscany.sca.assembly.SCABinding http://localhost:8085/AddServiceComponent]
- [java] Registering service: [mydomain nodeC SubtractServiceComponent org.ap
-ache.tuscany.sca.assembly.SCABinding http://localhost:8086/SubtractServiceCompon
-ent]
- [java] Finding service: [mydomain SubtractServiceComponent org.apache.tusca
-ny.sca.assembly.SCABinding]
- [java] Matching service url: http://localhost:8086/SubtractServiceComponent
-
- [java] Finding service: [mydomain AddServiceComponent org.apache.tuscany.sc
-a.assembly.SCABinding]
- [java] Matching service url: http://localhost:8085/AddServiceComponent
- [java] Java Result: 1
-Terminate batch job (Y/N)? y
-
-
-
-runNodeB:
- [java] file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/
-target/classes/management/
- [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.
-om.util.StAXUtils).
- [java] log4j:WARN Please initialize the log4j system properly.
- [java] Registering service: [mydomain nodeB AddServiceComponent/ org.apache
-.tuscany.sca.assembly.SCABinding http://localhost:8085/AddServiceComponent]
- [java] 23-Aug-2007 17:41:25 org.apache.tuscany.sca.http.jetty.JettyServer a
-ddServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8085/AddServiceCompone
-nt
- [java] Node started (press enter to shutdown)
- [java] AddService - add 3.0 and 2.0
-
-
-runNodeC:
- [java] file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/
-target/classes/management/
- [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.
-om.util.StAXUtils).
- [java] log4j:WARN Please initialize the log4j system properly.
- [java] Registering service: [mydomain nodeC SubtractServiceComponent org.ap
-ache.tuscany.sca.assembly.SCABinding http://localhost:8086/SubtractServiceCompon
-ent]
- [java] 23-Aug-2007 17:41:51 org.apache.tuscany.sca.http.jetty.JettyServer a
-ddServletMapping
- [java] Node started (press enter to shutdown)
- [java] INFO: Added Servlet mapping: http://localhost:8086/SubtractServiceCo
-mponent
- [java] SubtractService - subtract 3.0 and 2.0
-Terminate batch job (Y/N)? y
-
-
-runNodeA:
- [java] file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/
-target/classes/management/
- [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.
-om.util.StAXUtils).
- [java] log4j:WARN Please initialize the log4j system properly.
- [java] 23-Aug-2007 17:42:12 org.apache.tuscany.sca.assembly.builder.impl.Co
-mpositeBuilderImpl$1 problem
- [java] WARNING: [WARNING] Component reference target not found, it might be
- a remote service: AddServiceComponent null
- [java]
- [java] 23-Aug-2007 17:42:12 org.apache.tuscany.sca.assembly.builder.impl.Co
-mpositeBuilderImpl$1 problem
- [java] WARNING: [WARNING] Component reference target not found, it might be
- a remote service: SubtractServiceComponent null
- [java]
- [java] Finding service: [mydomain SubtractServiceComponent org.apache.tusca
-ny.sca.assembly.SCABinding]
- [java] Finding service: [mydomain AddServiceComponent org.apache.tuscany.sc
-a.assembly.SCABinding]
- [java] CalculatorService - add 3.0 and 2.0
- [java] 3 + 2=5.0
- [java] CalculatorService - subtract 3.0 and 2.0
- [java] 3 - 2=1.0
- [java] CalculatorService - multiply 3.0 and 2.0
- [java] 3 * 2=6.0
- [java] CalculatorService - divide 3.0 and 2.0
- [java] 3 / 2=1.5
-
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows. When running from Maven the four nodes all run within
-Java virtual machine.
-
-cd calculator-distributed
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running calculator.DomainInMemoryTestCase
-Setting up distributed nodes
-file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/target/class
-es/management/
-log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAX
-Utils).
-log4j:WARN Please initialize the log4j system properly.
-23-Aug-2007 18:18:41 org.apache.tuscany.sca.assembly.builder.impl.CompositeBuild
-erImpl$1 problem
-WARNING: [WARNING] Component reference target not found, it might be a remote se
-rvice: AddServiceComponent null
-
-23-Aug-2007 18:18:41 org.apache.tuscany.sca.assembly.builder.impl.CompositeBuild
-erImpl$1 problem
-WARNING: [WARNING] Component reference target not found, it might be a remote se
-rvice: SubtractServiceComponent null
-
-file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/target/class
-es/management/
-Registering service: [mydomain nodeB AddServiceComponent org.apache.tuscany.sca.
-assembly.SCABinding http://localhost:8085/AddServiceComponent]
-file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/target/class
-es/management/
-Registering service: [mydomain nodeC SubtractServiceComponent org.apache.tuscany
-.sca.assembly.SCABinding http://localhost:8086/SubtractServiceComponent]
-Finding service: [mydomain SubtractServiceComponent org.apache.tuscany.sca.assem
-bly.SCABinding]
-Matching service url: http://localhost:8086/SubtractServiceComponent
-Finding service: [mydomain AddServiceComponent org.apache.tuscany.sca.assembly.S
-CABinding]
-Matching service url: http://localhost:8085/AddServiceComponent
-23-Aug-2007 18:18:45 org.apache.tuscany.sca.http.jetty.JettyServer addServletMap
-ping
-INFO: Added Servlet mapping: http://localhost:8085/AddServiceComponent
-23-Aug-2007 18:18:47 org.apache.tuscany.sca.http.jetty.JettyServer addServletMap
-ping
-INFO: Added Servlet mapping: http://localhost:8086/SubtractServiceComponent
-CalculatorService - add 3.0 and 2.0
-AddService - add 3.0 and 2.0
-CalculatorService - subtract 3.0 and 2.0
-SubtractService - subtract 3.0 and 2.0
-CalculatorService - multiply 3.0 and 2.0
-CalculatorService - divide 3.0 and 2.0
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.14 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-
-This shows that the Junit test cases have run successfully.
-
-Known Bug :
----------
-The processes that are running NodeB and NodeC do not seem to end on pressing the
-<Enter>. This will be fixed for the next release. For this release you should use
-^C (Control C) to exit these processes.
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/build.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/build.xml deleted file mode 100644 index eb4d1b6348..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/build.xml +++ /dev/null @@ -1,294 +0,0 @@ -<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT 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="calculator" default="runDomainNode">
- <property name="node.class" value="node.CalculatorNode" />
- <property name="domain.class" value="node.DomainNode" />
- <property name="test.jar" value="sample-calculator-distributed.jar"
-/>
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="runDomainNode">
- <java classname="${domain.class}"
- fork="true">
- <classpath>
- <pathelement path="src/main/resources"/>
- <pathelement path="target/classes"/>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="runNodeA">
- <java classname="${node.class}"
- fork="true">
- <classpath>
- <pathelement path="src/main/resources"/>
- <pathelement path="target/classes"/>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- <arg value="mydomain"/>
- <arg value="nodeA"/>
- </java>
- </target>
-
- <target name="runNodeB">
- <java classname="${node.class}"
- fork="true">
- <classpath>
- <pathelement path="src/main/resources"/>
- <pathelement path="target/classes"/>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- <arg value="mydomain"/>
- <arg value="nodeB"/>
- </java>
- </target>
-
- <target name="runNodeC">
- <java classname="${node.class}"
- fork="true">
- <classpath>
- <pathelement path="src/main/resources"/>
- <pathelement path="target/classes"/>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- <arg value="mydomain"/>
- <arg value="nodeC"/>
- </java>
- </target>
-
- <target name="clean">
- <delete dir="target" includeemptydirs="true"/>
- </target>
-
- <!-- If you want to test without building the distribution jars set the -->
- <!-- localtion value of the m2.repo on your machine and use the targets below -->
- <property name="m2.repo" value="your dir here\.m2\repository" />
- <path id="repo.classpath">
- <!--pathelement location="${classpath}"/-->
- <!--pathelement location="${m2.repo}\annogen\annogen\0.1.0\annogen-0.1.0.jar"/>
- <pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
- <pathelement location="${m2.repo}\backport-util-concurrent\backport-util-concurrent\2.2\backport-util-concurrent-2.2.jar"/>
- <pathelement location="${m2.repo}\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar"/>
- <pathelement location="${m2.repo}\com\metaparadigm\json-rpc\1.0\json-rpc-1.0.jar"/>
- <pathelement location="${m2.repo}\commons-codec\commons-codec\1.3\commons-codec-1.3.jar"/>
- <pathelement location="${m2.repo}\commons-fileupload\commons-fileupload\1.1.1\commons-fileupload-1.1.1.jar"/>
- <pathelement location="${m2.repo}\commons-httpclient\commons-httpclient\3.0.1\commons-httpclient-3.1.jar"/>
- <pathelement location="${m2.repo}\commons-io\commons-io\1.1\commons-io-1.1.jar"/>
- <pathelement location="${m2.repo}\commons-logging\commons-logging\1.1\commons-logging-1.1.jar"/>
- <pathelement location="${m2.repo}\javax\activation\activation\1.1\activation-1.1.jar"/>
- <pathelement location="${m2.repo}\javax\mail\mail\1.4\mail-1.4.jar"/>
- <pathelement location="${m2.repo}\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar"/>
- <pathelement location="${m2.repo}\jaxen\jaxen\1.1-beta-9\jaxen-1.1-beta-9.jar"/>
- <pathelement location="${m2.repo}\log4j\log4j\1.2.12\log4j-1.2.12.jar"/>
- <pathelement location="${m2.repo}\logkit\logkit\1.0.1\logkit-1.0.1.jar"/>
- <pathelement location="${m2.repo}\org\apache\ant\ant\1.7.0\ant-1.7.0.jar"/>
- <pathelement location="${m2.repo}\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar"/>
- <pathelement location="${m2.repo}\org\apache\axis2\axis2-java2wsdl\1.2\axis2-java2wsdl-1.2.jar"/>
- <pathelement location="${m2.repo}\org\apache\axis2\axis2-kernel\1.2\axis2-kernel-1.2.jar"/>
- <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-commonj_1.1_spec\1.0\geronimo-commonj_1.1_spec-1.0.jar"/>
- <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar"/>
- <pathelement location="${m2.repo}\org\apache\httpcomponents\jakarta-httpcore\4.0-alpha4\jakarta-httpcore-4.0-alpha4.jar"/>
- <pathelement location="${m2.repo}\org\apache\neethi\neethi\2.0.1\neethi-2.0.1.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\sca-api\1.6.1-SNAPSHOT\sca-api-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly\1.6.1-SNAPSHOT\tuscany-assembly-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xml\1.6.1-SNAPSHOT\tuscany-assembly-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca\1.6.1-SNAPSHOT\tuscany-binding-sca-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-axis2\1.6.1-SNAPSHOT\tuscany-binding-sca-axis2-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-xml\1.6.1-SNAPSHOT\tuscany-binding-sca-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws\1.6.1-SNAPSHOT\tuscany-binding-ws-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-axis2\1.6.1-SNAPSHOT\tuscany-binding-ws-axis2-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-xml\1.6.1-SNAPSHOT\tuscany-binding-ws-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution\1.6.1-SNAPSHOT\tuscany-contribution-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-impl\1.6.1-SNAPSHOT\tuscany-contribution-impl-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-java\1.6.1-SNAPSHOT\tuscany-contribution-java-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\1.6.1-SNAPSHOT\tuscany-contribution-namespace-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core\1.6.1-SNAPSHOT\tuscany-core-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\1.6.1-SNAPSHOT\tuscany-core-databinding-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-spi\1.6.1-SNAPSHOT\tuscany-core-spi-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding\1.6.1-SNAPSHOT\tuscany-databinding-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding-axiom\1.6.1-SNAPSHOT\tuscany-databinding-axiom-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed\1.6.1-SNAPSHOT\tuscany-distributed-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed-impl\1.6.1-SNAPSHOT\tuscany-distributed-impl-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\1.6.1-SNAPSHOT\tuscany-host-embedded-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-http\1.6.1-SNAPSHOT\tuscany-host-http-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-tomcat\1.6.1-SNAPSHOT\tuscany-host-jetty-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java\1.6.1-SNAPSHOT\tuscany-implementation-java-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-runtime\1.6.1-SNAPSHOT\tuscany-implementation-java-runtime-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-xml\1.6.1-SNAPSHOT\tuscany-implementation-java-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface\1.6.1-SNAPSHOT\tuscany-interface-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java\1.6.1-SNAPSHOT\tuscany-interface-java-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java-xml\1.6.1-SNAPSHOT\tuscany-interface-java-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl\1.6.1-SNAPSHOT\tuscany-interface-wsdl-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl-xml\1.6.1-SNAPSHOT\tuscany-interface-wsdl-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy\1.6.1-SNAPSHOT\tuscany-policy-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\1.6.1-SNAPSHOT\tuscany-policy-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology\1.6.1-SNAPSHOT\tuscany-topology-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology-xml\1.6.1-SNAPSHOT\tuscany-topology-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\woden\woden\1.0-incubating-M7a\woden-1.0-incubating-M7a.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.4\axiom-api-1.2.4.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-dom\1.2.4\axiom-dom-1.2.4.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-impl\1.2.4\axiom-impl-1.2.4.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\schema\XmlSchema\1.3.1\XmlSchema-1.3.1.jar"/>
- <pathelement location="${m2.repo}\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar"/>
- <pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
- <pathelement location="${m2.repo}\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar"/>
- <pathelement location="${m2.repo}\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar"/>
- <pathelement location="${m2.repo}\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar"/>
- <pathelement location="target/classes"/-->
- <pathelement location="${m2.repo}\annogen\annogen\0.1.0\annogen-0.1.0.jar"/>
- <pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
- <pathelement location="${m2.repo}\backport-util-concurrent\backport-util-concurrent\2.2\backport-util-concurrent-2.2.jar"/>
- <pathelement location="${m2.repo}\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar"/>
- <pathelement location="${m2.repo}\com\metaparadigm\json-rpc\1.0\json-rpc-1.0.jar"/>
- <pathelement location="${m2.repo}\commons-codec\commons-codec\1.3\commons-codec-1.3.jar"/>
- <pathelement location="${m2.repo}\commons-fileupload\commons-fileupload\1.1.1\commons-fileupload-1.1.1.jar"/>
- <pathelement location="${m2.repo}\commons-httpclient\commons-httpclient\3.0.1\commons-httpclient-3.0.1.jar"/>
- <pathelement location="${m2.repo}\commons-io\commons-io\1.1\commons-io-1.1.jar"/>
- <pathelement location="${m2.repo}\commons-logging\commons-logging\1.1\commons-logging-1.1.jar"/>
- <pathelement location="${m2.repo}\javax\activation\activation\1.1\activation-1.1.jar"/>
- <pathelement location="${m2.repo}\javax\mail\mail\1.4\mail-1.4.jar"/>
- <pathelement location="${m2.repo}\jaxen\jaxen\1.1-beta-9\jaxen-1.1-beta-9.jar"/>
- <pathelement location="${m2.repo}\log4j\log4j\1.2.12\log4j-1.2.12.jar"/>
- <pathelement location="${m2.repo}\logkit\logkit\1.0.1\logkit-1.0.1.jar"/>
- <pathelement location="${m2.repo}\org\apache\ant\ant\1.7.0\ant-1.7.0.jar"/>
- <pathelement location="${m2.repo}\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar"/>
- <pathelement location="${m2.repo}\org\apache\axis2\axis2-adb\1.2\axis2-adb-1.2.jar"/>
- <pathelement location="${m2.repo}\org\apache\axis2\axis2-java2wsdl\1.2\axis2-java2wsdl-1.2.jar"/>
- <pathelement location="${m2.repo}\org\apache\axis2\axis2-kernel\1.2\axis2-kernel-1.2.jar"/>
- <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-commonj_1.1_spec\1.0\geronimo-commonj_1.1_spec-1.0.jar"/>
- <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar"/>
- <pathelement location="${m2.repo}\org\apache\httpcomponents\jakarta-httpcore\4.0-alpha4\jakarta-httpcore-4.0-alpha4.jar"/>
- <pathelement location="${m2.repo}\org\apache\neethi\neethi\2.0.1\neethi-2.0.1.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\sca-api\1.6.1-SNAPSHOT\sca-api-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly\1.6.1-SNAPSHOT\tuscany-assembly-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xml\1.6.1-SNAPSHOT\tuscany-assembly-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-http\1.6.1-SNAPSHOT\tuscany-binding-http-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-jsonrpc\1.6.1-SNAPSHOT\tuscany-binding-jsonrpc-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca\1.6.1-SNAPSHOT\tuscany-binding-sca-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-axis2\1.6.1-SNAPSHOT\tuscany-binding-sca-axis2-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-xml\1.6.1-SNAPSHOT\tuscany-binding-sca-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws\1.6.1-SNAPSHOT\tuscany-binding-ws-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-axis2\1.6.1-SNAPSHOT\tuscany-binding-ws-axis2-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-xml\1.6.1-SNAPSHOT\tuscany-binding-ws-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution\1.6.1-SNAPSHOT\tuscany-contribution-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-impl\1.6.1-SNAPSHOT\tuscany-contribution-impl-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-java\1.6.1-SNAPSHOT\tuscany-contribution-java-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\1.6.1-SNAPSHOT\tuscany-contribution-namespace-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core\1.6.1-SNAPSHOT\tuscany-core-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\1.6.1-SNAPSHOT\tuscany-core-databinding-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-spi\1.6.1-SNAPSHOT\tuscany-core-spi-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding\1.6.1-SNAPSHOT\tuscany-databinding-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding-axiom\1.6.1-SNAPSHOT\tuscany-databinding-axiom-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed\1.6.1-SNAPSHOT\tuscany-distributed-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed-impl\1.6.1-SNAPSHOT\tuscany-distributed-impl-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-extension-helper\1.6.1-SNAPSHOT\tuscany-extension-helper-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\1.6.1-SNAPSHOT\tuscany-host-embedded-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-http\1.6.1-SNAPSHOT\tuscany-host-http-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface\1.6.1-SNAPSHOT\tuscany-interface-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java\1.6.1-SNAPSHOT\tuscany-interface-java-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java-xml\1.6.1-SNAPSHOT\tuscany-interface-java-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl\1.6.1-SNAPSHOT\tuscany-interface-wsdl-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl-xml\1.6.1-SNAPSHOT\tuscany-interface-wsdl-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy\1.6.1-SNAPSHOT\tuscany-policy-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\1.6.1-SNAPSHOT\tuscany-policy-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology\1.6.1-SNAPSHOT\tuscany-topology-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology-xml\1.6.1-SNAPSHOT\tuscany-topology-xml-1.6.1-SNAPSHOT.jar"/>
- <pathelement location="${m2.repo}\org\apache\woden\woden\1.0-incubating-M7a\woden-1.0-incubating-M7a.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.4\axiom-api-1.2.4.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-dom\1.2.4\axiom-dom-1.2.4.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-impl\1.2.4\axiom-impl-1.2.4.jar"/>
- <pathelement location="${m2.repo}\org\apache\ws\commons\schema\XmlSchema\1.3.1\XmlSchema-1.3.1.jar"/>
- <pathelement location="${m2.repo}\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar"/>
- <pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
- <pathelement location="${m2.repo}\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar"/>
- <pathelement location="${m2.repo}\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar"/>
- <pathelement location="${m2.repo}\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar"/>
- </path>
-
- <target name="runDomainNodeRepo">
- <java classname="${domain.class}"
- fork="true">
- <classpath>
- <path refid="repo.classpath"/>
- </classpath>
- </java>
- </target>
-
- <target name="runNodeARepo">
- <java classname="${node.class}"
- fork="true">
- <classpath>
- <path refid="repo.classpath"/>
- </classpath>
- <arg value="mydomain"/>
- <arg value="nodeA"/>
- </java>
- </target>
-
- <target name="runNodeBRepo">
- <java classname="${node.class}"
- fork="true">
- <classpath>
- <path refid="repo.classpath"/>
- </classpath>
- <arg value="mydomain"/>
- <arg value="nodeB"/>
- </java>
- </target>
-
- <target name="runNodeCRepo">
- <java classname="${node.class}"
- fork="true">
- <classpath>
- <path refid="repo.classpath"/>
- </classpath>
- <arg value="mydomain"/>
- <arg value="nodeC"/>
- </java>
- </target>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/pom.xml deleted file mode 100644 index 913e8f0013..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-samples</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>sample-domain-webapp</artifactId>
- <name>Apache Tuscany SCA Domain Webapp Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-domain-impl</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonrpc</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-sca-axis2</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-http</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-resource</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/java/node/DomainServer.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/java/node/DomainServer.java deleted file mode 100644 index ea3cddc01b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/java/node/DomainServer.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package node; - -import java.io.IOException; - - -/** - * This server program that loads a composite to provide simple registry function. - * This server can be replaced with any registry that is appropriate but the components - * in each node that talk to the registry should be replaced also. - */ -public class DomainServer { - - public static void main(String[] args) { - try { -/* - NodeImpl node = new NodeImpl(); - node.start(); - node.getContributionManager().startContribution(DomainServer.class.getClassLoader().getResource(".")); - - try { - System.out.println("Domain server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - node.stop(); - System.out.println("Domain server stopped"); -*/ - } catch (Exception ex) { - System.out.println("Exception in domain server " + - ex.toString()); - } - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100755 index 95e10e43cd..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:sample="http://sample"> - <deployable composite="sample:Domain"/> -</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/domain.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/domain.composite deleted file mode 100644 index dbaaebd3c7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/domain.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://sample" - xmlns:sample="http://sample" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - name="Domain"> - - <component name="domain"> - <service name="Resource"> - <tuscany:binding.http/> - </service> - <tuscany:implementation.resource location="webroot"/> - </component> - - <component name="DomainManagerComponent"> - <implementation.java class="org.apache.tuscany.sca.domain.impl.DomainManagerServiceImpl"/> - <service name="DomainManagerService"> - <interface.java interface="org.apache.tuscany.sca.domain.DomainManagerService"/> - <binding.ws uri="http://localhost:8080/DomainManagerComponent/DomainManager"/> - <tuscany:binding.jsonrpc uri="http://localhost:8080/DomainManagerComponent/DomainManagerJson"/> - </service> - <reference name="serviceDiscovery" target="ServiceDiscoveryComponent"/> - - </component> - - <component name="ServiceDiscoveryComponent"> - <implementation.java class="org.apache.tuscany.sca.domain.impl.ServiceDiscoveryServiceImpl" /> - <service name="ServiceDiscoveryService"> - <interface.java interface="org.apache.tuscany.sca.domain.ServiceDiscoveryService"/> - <binding.sca uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscoverySCA"/> - <binding.ws uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscovery"/> - <tuscany:binding.jsonrpc uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscoveryJson"/> - </service> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/index.html b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/index.html deleted file mode 100644 index 425bd73734..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/index.html +++ /dev/null @@ -1,354 +0,0 @@ -<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>Apache Tuscany Domain</TITLE> - - <script type="text/javascript" src="../SCADomain/scaDomain.js"></script> - - <script language="JavaScript"> - - domainManager = new JSONRpcClient("../DomainManagerComponent/DomainManagerJson"); - - function getNodeInfo() { - domainManager.DomainManagerService.getNodeInfo(handleGetNodeInfo); - } - - function handleGetNodeInfo(result) { - - var text = "" - - for (var i in result.list){ - var node = result.list[i]; - - text = text + "<table>"; - text = text + "<TR CLASS='source_1' >"; - text = text + " <TD>"; - text = text + " <IMG SRC='node.png'/> " + node.domainUri; - text = text + " </TD>"; - - var noProtocol = node.nodeManagerUrl.substring(7); - var colonPos = noProtocol.indexOf(':') - var nodeManagerWebUrl = noProtocol.substring(0, colonPos + 6); - nodeManagerWebUrl = "http://" + nodeManagerWebUrl + "node/index.html"; - - text = text + " <TD CLASS='clickable link' ONCLICK=\"showNode('" + nodeManagerWebUrl + "')\">" + node.nodeUri + "</TD>"; - text = text + "</TR>"; - } - - document.getElementById('domainInfo').innerHTML=text; - } - - function showNode(url) - { - document.getElementById("nodePage").innerHTML="<IFRAME CLASS='alert_data' SRC='"+url+"'/>"; - window.location="#data"; - return; - } - - </script> - - <link rel="stylesheet" type="text/css" href="style.css" /> -</head> - -<body onload="getNodeInfo()"> - -<!--script type="text/javascript"> - - // The proxy for the alert and alertsources services running in Tuscany - var alertsService = new dojo.rpc.JsonService("AlertsServiceJSONRPC?smd"); - var alertSourcesService = new dojo.rpc.JsonService("AlertsSourcesServiceJSONRPC?smd"); - - // If you want to put an HTTP sniffer in the way to look at the JSONROPC packets you'll - // need to edit the target address of the service in the smd. The only way to do this easily - // is to read an smd from disc rather than generate one. There are two smds provided for this - //var alertsService = new dojo.rpc.JsonService("service.smd"); - //var alertSourcesService = new dojo.rpc.JsonService("sources.smd"); - - // The global list of alerts sources - var alertSourceList = null; - - // The global list of alerts - var alertList = null; - - // the constructor for entries on the alert source list - function alertSourceType(name,id,address,feedAddress,feedType,popUsername,popPassword,popServer,lastChecked,javaClass) { - this.name = name; - this.id = id; - this.address = address; - this.feedAddress = feedAddress; - this.feedType = feedType; - this.lastChecked = lastChecked; - this.javaClass = "org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl"; - - } - - function errorCallback(result, error, id) { - var resultsNode = document.getElementById("errors"); - // There seems to be a problem somewhere as I should be able to get the error - // details but all I can actually get is the Id from the error message - // resultsNode.innerHTML = "there was an error! message id = " + " error code = " + result.error.code + " error message = " + result.error.msg ; - resultsNode.innerHTML = "An error was returned by the server. Message id = " + result.id; - } - - // Generate the alert sources table - function getAlertSources() - { - response = alertSourcesService.getAlertSources("Dojo"); - response.addCallbacks(getAlertSourcesCallback, errorCallback); - - getAlerts(); - } - - function getAlertSourcesCallback(result) { - var resultsNode = document.getElementById("alertSourcesTable"); - if ( result.error != null ) { - resultsNode.innerHTML = result.error; - } else { - // stash away the source list for when we come to edit it - alertSourceList = result.source.list; - - // put out the html - var text = "" - var nextSourceId = 0 - for (var i in result.source.list){ - var source = result.source.list[i]; - - text = text + "<table>"; - text = text + "<TR CLASS='source_" + source.id + "' >"; - text = text + " <TD CLASS='source_name clickable' ONCLICK=\"displayAlert('" + source.address + "')\">"; - text = text + " <IMG SRC='rss.png'/> " + source.name; - text = text + " </TD>"; - text = text + " <TD CLASS='clickable link' ONCLICK=\"showEditSource('" + source.id + "')\">Edit</TD>"; - text = text + " <TD CLASS='clickable link' ONCLICK=\"deleteSource('" + source.id + "')\">Delete</TD>"; - text = text + "</TR>"; - text = text + "<TR ID='edit_source_" + source.id + "' CLASS='hidden source_" + source.id + "'>"; - text = text + " <TD COLSPAN='3'>"; - text = text + " <TABLE CLASS='sourceDetailsTable'>"; - text = text + " <TR>"; - text = text + " <TD>Source name:</TD>"; - text = text + " <TD>"; - text = text + " <INPUT ID='source_" + source.id + "_name' TYPE='TEXT' SIZE='50' VALUE='" + source.name + "'/>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " <TR>"; - text = text + " <TD>Source address:</TD>" - text = text + " <TD>"; - text = text + " <INPUT ID='source_" + source.id + "_address' TYPE='TEXT' SIZE='50' VALUE='" + source.address + "'/>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " <TR>"; - text = text + " <TD>"; - text = text + " <INPUT ID='source_" + source.id + "_type' TYPE='HIDDEN' VALUE='" + source.id + "'/>"; - text = text + " <INPUT TYPE='BUTTON' VALUE='Update' ONCLICK=\"updateSource('" + source.id + "')\"/>"; - text = text + " <INPUT TYPE='BUTTON' VALUE='Cancel' ONCLICK=\"hideEditSource('" + source.id + "')\"/>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " </TABLE>"; - text = text + " </TD>"; - text = text + "</TR>"; - - nextSourceId = eval(source.id); - } - - nextSourceId = nextSourceId + 1; - - text = text + "<TR CLASS='source_" + nextSourceId + "'>"; - text = text + " <TD COLSPAN='4' CLASS='clickable link' ONCLICK=\"showAddNewSource('" + nextSourceId + "')\">Add new Alert Source</TD>"; - text = text + "</TR>"; - text = text + "<TR ID='add_source_" + nextSourceId + "' CLASS='hidden source_" + nextSourceId + "'>"; - text = text + " <TD COLSPAN='4'>"; - text = text + " <TABLE CLASS='sourceDetailsTable'>"; - text = text + " <TR>"; - text = text + " <TD>Source name:</TD>"; - text = text + " <TD>"; - text = text + " <INPUT ID='source_" + nextSourceId + "_name' TYPE='TEXT' SIZE='50'>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " <TR>"; - text = text + " <TD>Source address:</TD>"; - text = text + " <TD>"; - text = text + " <INPUT ID='source_" + nextSourceId + "_address' TYPE='TEXT' SIZE='50'>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " <TR>"; - text = text + " <TD>Source type:</TD>"; - text = text + " <TD>"; - text = text + " <SELECT ID='source_" + nextSourceId + "_type' ONCHANGE=\"showSourceType('" + nextSourceId + "')\">"; - text = text + " <OPTION value='rss' selected='selected'>RSS/Atom feed</OPTION>"; - text = text + " </SELECT>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " <TR ID='add_rss_source'>"; - text = text + " <TD COLSPAN='2'>"; - text = text + " <TABLE CLASS='sourceDetailsTable'>"; - text = text + " <TR>"; - text = text + " <TD>Feed address:</TD>"; - text = text + " <TD>"; - text = text + " <INPUT ID='source_" + nextSourceId + "_feedAddress' TYPE='TEXT' SIZE='50'/>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " </TABLE>"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " <TR>"; - text = text + " <TD>"; - text = text + " <INPUT TYPE='BUTTON' VALUE='Add' ONCLICK=\"addSource('" + nextSourceId + "')\">"; - text = text + " <INPUT TYPE='BUTTON' VALUE='Cancel' ONCLICK=\"hideAddNewSource('" + nextSourceId + "')\">"; - text = text + " </TD>"; - text = text + " </TR>"; - text = text + " </TABLE>"; - text = text + " </TD>"; - text = text + "</TR>"; - text = text + "</table>"; - - resultsNode.innerHTML = text; - } - } - - function showEditSource(sourceid) - { - document.getElementById("edit_source_"+sourceid).className = "source_"+sourceid; - } - - function hideEditSource(sourceid) - { - document.getElementById("edit_source_"+sourceid).className = "hidden source_"+sourceid; - } - - function updateSource(sourceid) - { - hideEditSource(sourceid); - var source = getSource(sourceId); - alertSourcesService.updateAlertSource(source); - getAlertSources(); - } - - function deleteSource(sourceid) - { - alertSourcesService.removeAlertSource(sourceid); - getAlertSources(); - } - - function showAddNewSource(sourceid) - { - document.getElementById("add_source_"+sourceid).className = "source_"+sourceid; - } - - function hideAddNewSource(sourceid) - { - document.getElementById("add_source_"+sourceid).className = "hidden source_"+sourceid; - } - - function addSource(sourceid) - { - hideAddNewSource(sourceid); - var source = getSource(sourceid); - alertSourcesService.addAlertSource(source); - - // wait a little before getting the list back from the server - setTimeout("getAlertSources()",1250); - } - - function getSource(sourceid) - { - var source = alertSourceList[sourceid]; - - if ( source == null ){ - source = new alertSourceType("name","id","address","feedAddress","feedType","popUsername","popPassword","popServer","lastChecked","javaClass"); - alertSourceList[sourceid] = source; - } - - source.name = document.getElementById("source_"+sourceid+"_name").value; - source.id = sourceid; - source.address = document.getElementById("source_"+sourceid+"_address").value; - var typeElem = document.getElementById("source_"+sourceid+"_type"); - source.feedType = typeElem.options[typeElem.selectedIndex].value; - - if(source.feedType=="rss") - { - source.feedAddress = document.getElementById("source_"+sourceid+"_feedAddress").value; - - } - else if(source.feedType=="pop") - { - source.popServer = document.getElementById("source_"+sourceid+"_popServer").value; - source.popUsername = document.getElementById("source_"+sourceid+"_popUsername").value; - source.popPassword = document.getElementById("source_"+sourceid+"_popPassword").value; - } - return source; - } - - // Generate the alerts table - function getAlerts() - { - response = alertsService.getAllNewAlerts("Dojo"); - response.addCallbacks(getAlertsCallback, errorCallback); - } - - function getAlertsCallback(result) { - var resultsNode = document.getElementById("alertsTable"); - if ( result.error != null ) { - resultsNode.innerHTML = result.error; - } else { - alertList = result.alert.list; - var text = "" - for (var i in result.alert.list){ - var alert = result.alert.list[i]; - - text = text + "<table>"; - text = text + "<TR class='source_" + alert.sourceId + " clickable' onclick=\"displayAlert('" + alert.address + "')\">"; - text = text + " <TD class='alert_text'>"; - text = text + " <SPAN id='" + alert.id + "' class='unread_title'>" + alert.title + "</SPAN>"; - text = text + " <SPAN class='summary'> - " + alert.summary.substring(0, 80) + "...</SPAN>"; - text = text + " </TD>"; - text = text + " <TD>"; - text = text + alert.date; - text = text + " </TD>" - text = text + "</TR>" - text = text + "</table>"; - } - - resultsNode.innerHTML = text; - } - } - - - - function displayAlert(url) - { - document.getElementById("alertData").innerHTML="<IFRAME CLASS='alert_data' SRC='"+url+"'/>"; - window.location="#data"; - return; - } -</script--> - -<h1 id="top">Apache Tuscany Domain</h1> -<div id="errors"></div> - -<p>Domain Name<span id="domainName"></span>:</p> - -<div id="domainInfo"></div> - -<p /><input type="button" value="Refresh" onclick="getNodeInfo()" /> - -<div id="nodePage"></div> - -</body> -</html> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/node.png b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/node.png Binary files differdeleted file mode 100644 index b3c949d224..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/node.png +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/style.css b/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/style.css deleted file mode 100644 index f5bbf23379..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/domain-webapp/src/main/resources/webroot/style.css +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; -} - -.source_1 -{ -background-color: LightSkyBlue; -} - -.source_2 -{ -background-color: Khaki; -} - -.source_3 -{ -background-color: LightPink; -} - -.source_4 -{ -background-color: Orange; -} - -.source_5 -{ -background-color: LightCoral; -} - -.source_6 -{ -background-color: Orchid; -} - -.source_7 -{ -background-color: Peru; -} - -.source_8 -{ -background-color: SpringGreen; -} - -.source_9 -{ -background-color: LightGrey; -} - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/README deleted file mode 100644 index 9be2e0b0f6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/README +++ /dev/null @@ -1,130 +0,0 @@ -JMS HelloWorld Sample -===================== -This sample demonstrates a simple webapp containing a hello world style client -and service using the JMS binding for request-response style messaging. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-jms-webapp.war ) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-jms-webapp/ - -The port and hostname will of course vary depending on your local installation. - -Configuring the JMS resources ------------------------------ - -The sample requires JMS resources be manually configured in the server environment, these are: - -- a JMS connection factory named "ConnectionFactory" -- a JMS queue named "HelloWorldService" - -See the following for how to define these resources depending on the application server being used: - -Tuscany with embedded ActiveMQ broker -------------------------------------- - - -Apache Tomcat -------------- - -No configuration is necessary for Tomcat as the sample WAR includes everything pre-configured to run -an ActiveMQ embedded JMS broker and to configure the JMS resources in JNDI. - -The JNDI resources are configured in the META-INF/comtext.xml file, for more information on running -ActiveMQ in Tomcat see: http://activemq.apache.org/tomcat.html - - -Apache Geronimo ---------------- - -For Apache Geronimo 2.0.1 (2.0.2 fails to define JMS resources for me) - -Logon to the Geronimo Server Console (http://localhost:8080/console, uid system, pswd manager) - -In the Console Navigation on the left under Services click JMS Resources - -At the bottom of the JMS Resources panel click under Create a new JMS Resource Group click For ActiveMQ - -In Resource Group Name enter "MyRGN" and click next - -At JMS Resource Group click Add Connection Factory - -For JMS Factory Type choose javax.jms.ConnectionFactory and click Next - -In Connection Factory Name enter "ConnectionFactory" and click Next - -Click Add destination - -For JMS Destination Type choose javax.jms.Queue and click Next - -Enter "HelloWorldService" for both Message Destination Name and PhysicalName and click Next - -Click Deploy Now - -Thats it, you're done. - - -WebSphere ---------- - -To define the JMS resources in a new WebSphere Application Server 6.1 installation: - -1) First define a Service integration bus: - -Logon to the WebSphere Integrated Solutions Console (http://localhost:9060/ibm/console) - -On the Left hand menu expand Service integration, and click on Buses. - -In the Buses panel click on New - -Enter a name for the bus, eg MyBus, and click Next, and then click Finish and Save the changes. - -In the Buses panel click on MyBus - -Find the Topology secion and click on Bus members - -Click on Add, leave the defaults and click Next, Next, Next, Finish, and Save the changes. - -Restart WebSphere and when back up logon back on to the Integrated Solutions Console - -2) Now define the JMS rescources - -On the Left hand menu expand Resources, and JMS and click on Connection Facotories. - -In the Connection factories panel click New. - -Leave the Default messaging provider and click OK - -Enter "ConnectionFactory" in the Name and JNDI name and in the Bus name in the Connection pane choose MyBus and click OK - -On the Left hand menu in JMS click on Queues - -In the Queues panel click New, accept the defaults and click OK - -Enter "HelloWorldService" for the Name and JNDI name and in the Bus name in the Connection pane choose MyBus, -and then in the Queue name drop down list choose "Create SIB destination" - -In the Set queue attributes panel enter "HelloWorldService" for the Identifier and click Next, Next, and Finish - -That should take you back to the Queues panel where you can click OK to create the new JMS queue. - -Save the changes - -Restart WebSphere and you're done. - - - -Others... ---------- - - - -
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/pom.xml deleted file mode 100644 index b885f9aff5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>sample-helloworld-jms-webapp</artifactId> - <packaging>war</packaging> - <name>Apache Tuscany SCA Sample JMS HelloWorld in a WebApp</name> - - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository</url> - </repository> - </repositories> - - <dependencies> - - <dependency> - <groupId>${pom.groupId}</groupId> - <artifactId>tuscany-host-webapp</artifactId> - <version>${pom.version}</version> - </dependency> - - <dependency> - <groupId>${pom.groupId}</groupId> - <artifactId>tuscany-binding-jms-runtime</artifactId> - <version>${pom.version}</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jms-asf</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>${pom.groupId}</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>${pom.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>activemq-core</artifactId> - <version>5.1.0</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>backport-util-concurrent</groupId> - <artifactId>backport-util-concurrent</artifactId> - <version>3.1</version> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index c24a741ee2..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.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 helloworld; - -/** - * The HelloWorld client implementation - */ -public class HelloWorldClient implements HelloWorldService { - - HelloWorldService helloWorldRef; - - public String sayHello(String name) { - System.out.println("HelloWorldClient.sayHello " + name); - return helloWorldRef.sayHello(name); - } - - public void setHelloWorldRef(HelloWorldService helloWorldRef) { - System.out.println("HelloWorldClient .setHelloWorldService " + helloWorldRef); - this.helloWorldRef = helloWorldRef; - } -}
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 2af978b9ce..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String sayHello(String name); -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 280388f443..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - System.out.println("HelloWorldServiceImpl .sayHello " + name); - return "Hello " + name; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 2419887413..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml +++ /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. ---> - -<Context> - - <Resource name="ConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory" - factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="vm://localhost?broker.persistent=false" brokerName="LocalActiveMQBroker"/> - - <Resource name="HelloWorldService" auth="Container" type="org.apache.activemq.command.ActiveMQQueue" description="my Queue" - factory="org.apache.activemq.jndi.JNDIReferenceFactory" physicalName="RequestQueue"/> - -</Context>
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite deleted file mode 100644 index f6328d156c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite +++ /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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="HelloWorld">
-
- <component name="HelloWorldClient">
- <implementation.java class="helloworld.HelloWorldClient"/>
- <reference name="helloWorldRef">
- <binding.jms uri="jms:HelloWorldService"/>
- </reference>
- </component>
-
- <component name="HelloWorldServiceComponent">
- <implementation.java class="helloworld.HelloWorldServiceImpl" />
- <service name="HelloWorldService">
- <binding.jms />
- </service>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index f5f359105f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /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. ---> -<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0" - xmlns:d="http://geronimo.apache.org/xml/ns/deployment-1.2"> - - <d:environment> - <d:moduleId> - <d:groupId>org.apache.tuscany.sca</d:groupId> - <d:artifactId>sample-helloworld-jms-webapp</d:artifactId> - <d:version>1.6.1-SNAPSHOT</d:version> - <d:type>war</d:type> - </d:moduleId> - - <!-- TUSCANY-2622 --> - <d:hidden-classes> - <d:filter>org.apache.axiom</d:filter> - <d:filter>org.apache.axis2</d:filter> - <d:filter>org.apache.commons</d:filter> - <d:filter>org.jdom</d:filter> - </d:hidden-classes> - - </d:environment> -</web-app> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 86710435ae..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
-Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
-
- <display-name>Apache Tuscany JMS Web Service Sample</display-name>
-
- <filter>
- <filter-name>tuscany</filter-name>
- <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>tuscany</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>hello.jsp</welcome-file>
- </welcome-file-list>
-
- <!-- Uncomment this to use an appserver thread pool
- <resource-ref>
- <res-ref-name>wm/TuscanyWorkManager</res-ref-name>
- <res-type>commonj.work.WorkManager</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
- -->
-
- <!-- Uncomment these to use local jndi name aliases
- <resource-ref>
- <res-ref-name>ConnectionFactory</res-ref-name>
- <res-type>javax.jms.ConnectionFactory</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- <resource-ref>
- <res-ref-name>HelloWorldService</res-ref-name>
- <res-type>javax.jms.Queue</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
- -->
-
-</web-app>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index bc6ef59a9b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
---%>
-
-<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%>
-<%@ page import="helloworld.HelloWorldService" %>
-
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%
- SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain");
- HelloWorldService helloWorldService = (HelloWorldService)scaDomain.getService(HelloWorldService.class, "HelloWorldClient");
-%>
-<html>
-<head><title>HelloWorld JMS sample</title></head>
-
-<body>
-
-If this sample is working correctly you should see "Hello World" on the next line...
-<p>
-<%= helloWorldService.sayHello("world") %>
-<p>
-If you do not see "Hello World" on the line above then there has been a problem.
-<p>
-The sample requires JMS resources be manually configured in the server environment, these are:
-a JMS connection factory named "ConnectionFactory", and a destination queues named "HelloWorldService".
-See the sample README file for more information.
-
-</body>
-</html>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/README deleted file mode 100644 index 13c89ab2f6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/README +++ /dev/null @@ -1,178 +0,0 @@ -Hello World Web Service References Sample -========================================= -This sample demonstrates an SCA reference that uses a web service binding. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens you need to run the server first -so open a command prompt, navigate to the helloworld-ws-service sample directory -and do - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer - - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-reference.jar helloworld.HelloWorldClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-reference.jar helloworld.HelloWorldClient - - -Sample Overview ---------------- -The sample provides a single component that is wired to a reference with a -web service binding. The binding refers to WSDL that identifies the service -exposed by the helloworld-ws-service sample. - -helloworld-ws-reference/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldClient.java - starts the SCA Runtime and - deploys the helloworldwsclient - .composite. It then calls the - HelloWorldServiceComponent - resources/ - wsdl - helloworld.wsdl - the service description that the - SCA reference uses to bind to - helloworldwsclient.composite - the SCA assembly for this sample - logging.properties - log4j configuration file - test/ - java/ - helloworld/ - HelloWorldClientTestCase.java - JUnit test case - HelloWorldServerTest.java - starts the Web service - helloworld-ws-reference.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Before -you do this start up the service that the reference will talk to. To do this -run up the helloworld-ws-service test. Take a look at the README in that sample -and you will see you need the following commands - -cd helloworld-ws-service -ant run - -Once done you can now compile and run this sample using the following commands; - -cd helloworld-ws-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-service sample first as Maven does this for you. - -cd helloworld-ws-reference -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldClientTestCase -14-Jan-2008 14:06:12 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:06:12 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -14-Jan-2008 14:06:12 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:12 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:12 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -14-Jan-2008 14:06:14 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:06:17 org.apache.catalina.loader.WebappLoader start -INFO: Dual registration of jndi stream handler: factory already defined -14-Jan-2008 14:06:17 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -14-Jan-2008 14:06:17 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -14-Jan-2008 14:06:18 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.625 sec - -This shows that the Junit test cases have run successfully. diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png Binary files differdeleted file mode 100644 index bd2bba41db..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png +++ /dev/null diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg deleted file mode 100644 index 354ffbae8f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg +++ /dev/null @@ -1,150 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1052.3622" - height="744.09448" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.44" - sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-ws-reference" - sodipodi:docname="helloworld-ws-reference.svg" - version="1.0" - inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-ws-reference\helloworld-ws-reference.png" - inkscape:export-xdpi="52.84" - inkscape:export-ydpi="52.84"> - <defs - id="defs4" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - gridtolerance="10000" - guidetolerance="10" - objecttolerance="10" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="1.4" - inkscape:cx="519.38407" - inkscape:cy="414.63224" - inkscape:document-units="px" - inkscape:current-layer="layer1" - inkscape:window-width="1054" - inkscape:window-height="721" - inkscape:window-x="85" - inkscape:window-y="295" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <g - id="g2997" - transform="matrix(0.991389,0,0,1,2.215655,0)"> - <rect - rx="13.79423" - ry="12.692303" - y="192.00233" - x="258.3114" - height="299.99988" - width="446.72086" - id="rect2067" - style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.00866628;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - <flowRoot - id="flowRoot2954" - xml:space="preserve"><flowRegion - id="flowRegion2956"><rect - y="212.66591" - x="281.42856" - height="61.42857" - width="170" - id="rect2958" /></flowRegion><flowPara - id="flowPara2960">helloworldwsclient</flowPara></flowRoot> </g> - <rect - style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2988" - width="115.66247" - height="85.862968" - x="432.05917" - y="307.1676" - rx="6.9961648" - ry="7.1230249" /> - <flowRoot - xml:space="preserve" - id="flowRoot2966" - transform="translate(172.4684,115.2291)"><flowRegion - id="flowRegion2968"><rect - id="rect2970" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" /></flowRegion><flowPara - id="flowPara2972">HelloWorld</flowPara><flowPara - id="flowPara1883">Service</flowPara><flowPara - id="flowPara1885">Component</flowPara></flowRoot> <path - style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 414.90867,339.0146 L 448.24371,339.0146 L 454.30462,352.14658 L 447.23356,364.26842 L 414.90867,364.26842 L 422.48482,352.14658 L 414.90867,339.0146 z " - id="path3017" /> - <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 528.16111,337.17632 L 561.49615,337.17632 L 567.55706,350.3083 L 560.486,362.43014 L 528.16111,362.43014 L 535.73726,350.3083 L 528.16111,337.17632 z " - id="path3019" /> - <path - style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 651.01647,320.75333 L 718.80207,320.75333 L 731.12672,349.11387 L 716.74797,375.29287 L 651.01647,375.29287 L 666.4223,349.11387 L 651.01647,320.75333 z " - id="path1887" /> - <flowRoot - xml:space="preserve" - id="flowRoot1889" - transform="translate(388.9491,122.6895)" - style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion - id="flowRegion1891"><rect - id="rect1893" - width="170" - height="61.42857" - x="281.42856" - y="212.66591" - style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara - id="flowPara1895">HelloWorld</flowPara><flowPara - id="flowPara1897">Service</flowPara><flowPara - id="flowPara1899" /></flowRoot> <path - style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 567.85714,349.09448 C 666.42857,348.3802 666.42857,348.3802 666.42857,348.3802" - id="path1901" /> - </g> -</svg> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/pom.xml deleted file mode 100644 index 4fa602a3b5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-helloworld-ws-reference-lean</artifactId>
- <name>Apache Tuscany SCA Sample HelloWorld Web Service Reference</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>sample-helloworld-ws-service</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index f8d66876fa..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.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 helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient { - - static HelloWorldService helloWorldService; - - @Reference - public void setHelloWorldService(HelloWorldService service) { - helloWorldService = service; - } - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } -}
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.java deleted file mode 100644 index 13a31b6391..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.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 helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient2 { - - private static HelloWorldClient2 client; - - @Reference - public HelloWorldService helloWorldService; - - public HelloWorldClient2() { - client = this; - } - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient2.composite"); - - client.doit(args); - - scaDomain.close(); - } - - void doit(String[] args) { - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - } -}
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.java deleted file mode 100644 index 6d1722095b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.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 helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient3 { - - @Reference - public HelloWorldService helloWorldService; - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient3.composite"); - - scaDomain.getService(HelloWorldClient3.class, "HelloWorldClient3").doit(args); - - scaDomain.close(); - } - - public void doit(String[] args) { - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - } -}
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.java deleted file mode 100644 index 3def5194a5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.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 helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient4 { - - static ComponentContext clientContext; - - @Context - public void setContext(ComponentContext context) { - clientContext = context; - } - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient4.composite"); - - HelloWorldService helloWorldService = clientContext.getService(HelloWorldService.class, "helloWorldService"); - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } - - public void doit(String[] args) { - } -}
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java deleted file mode 100644 index 7c1853566f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.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 helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient5 { - - @Reference - public HelloWorldService helloWorldService; - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient5.composite"); - - scaDomain.close(); - } - - @Init - public void doit() { - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - } -}
\ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index db0c947cf7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(String name); -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index 991e4b4881..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="helloworldwsclient"> - - <!-- A component representing the client program --> - <component name="HelloWorldClient"> - <implementation.java class="helloworld.HelloWorldClient"/> - <reference name="helloWorldService"> - <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/> - </reference> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.composite deleted file mode 100644 index 6ea14602b3..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="helloworldwsclient"> - - <!-- A component representing the client program --> - <component name="HelloWorldClient2"> - <implementation.java class="helloworld.HelloWorldClient2"/> - <reference name="helloWorldService"> - <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/> - </reference> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.composite deleted file mode 100644 index 3d6364f55f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="helloworldwsclient"> - - <!-- A component representing the client program --> - <component name="HelloWorldClient3"> - <implementation.java class="helloworld.HelloWorldClient3"/> - <reference name="helloWorldService"> - <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/> - </reference> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite deleted file mode 100644 index 106e9db988..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="helloworldwsclient"> - - <!-- A component representing the client program --> - <component name="HelloWorldClient4"> - <implementation.java class="helloworld.HelloWorldClient4"/> - <reference name="helloWorldService"> - <interface.java interface="helloworld.HelloWorldService"/> - <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/> - </reference> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.composite deleted file mode 100644 index bbac4c3703..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.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://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="helloworldwsclient"> - - <!-- A component representing the client program --> - <component name="HelloWorldClient5"> - <implementation.java class="helloworld.HelloWorldClient5"/> - <reference name="helloWorldService"> - <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/> - </reference> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties +++ /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. -# -# $Rev$ $Date$ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 662c9affac..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 51b70f47c2..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.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 helloworld; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Test case for helloworld web service client - */ -public class HelloWorldClientTestCase extends HelloWorldClient { - - private SCADomain scaDomain; - private SCATestCaseRunner server; - - @Before - public void startClient() throws Exception { - scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - - server = new SCATestCaseRunner(HelloWorldTestServer.class); - server.before(); - } - - @Test - public void testWSClient() throws Exception { - String msg = helloWorldService.getGreetings("Smith"); - Assert.assertEquals("Hello Smith", msg); - } - - @After - public void stopClient() throws Exception { - server.after(); - scaDomain.close(); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 8226ec884e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Starts up the SCA runtime which starts listening for service requests - */ -public class HelloWorldTestServer { - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - try { - scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/pom.xml deleted file mode 100644 index 3cbb831560..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/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>tuscany-sca</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-loanapplication</artifactId>
- <name>Apache Tuscany SCA Sample Loan Application Conversation</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java deleted file mode 100644 index 4fedb70782..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -public class LoanApplication { - - private String customerName; - private float loanAmount; - - public LoanApplication(String customerName, float loanAmount) { - this.customerName = customerName; - this.loanAmount = loanAmount; - } - - @Override - public String toString() { - return "[Customer: " + customerName + ", loan amount: " - + loanAmount + "]"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java deleted file mode 100644 index 5183ece867..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.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 loanapplication; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - - -public class LoanApplicationClient { - - public static void main(String[] args) throws Exception { - SCADomain domain = SCADomain.newInstance("loanapplication.composite"); - - // Locate the MyClient component and invoke it - LoanClient loanClient = domain.getService(LoanClient.class, "LoanClientComponent"); - loanClient.applyForLoan("John Doe", 1000.0f); - System.out.println(loanClient.displayLoan()); - System.out.println("Loan approved: " + loanClient.isApproved()); - - domain.close(); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanClient.java deleted file mode 100644 index 7e4438bbff..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -public interface LoanClient { - - void applyForLoan(String customerName, float amount); - boolean isApproved(); - boolean isCancelled(); - String displayLoan(); - void cancelLoan(); - void closeLoan(); -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java deleted file mode 100644 index b06d9465a2..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.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 loanapplication; - - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class LoanClientImpl implements LoanClient { - - private LoanService loanService; - - @Reference - public void setLoanService(LoanService loanService) { - this.loanService = loanService; - } - - public void applyForLoan(String customerName, float amount) { - loanService.apply(new LoanApplication(customerName, amount)); - } - - public boolean isApproved() { - if (loanService.getLoanStatus() == null) { - return false; - } - return loanService.getLoanStatus().equals("approved"); - } - - public boolean isCancelled() { - if (loanService.getLoanStatus() == null) { - return false; - } - return loanService.getLoanStatus().equals("cancelled"); - } - - public String displayLoan() { - return loanService.display(); - } - - public void cancelLoan() { - loanService.cancelApplication(); - } - - public void closeLoan() { - loanService.close(); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanService.java deleted file mode 100644 index 9dfd8b42fe..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanService.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 loanapplication; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Conversational -@Remotable -public interface LoanService { - - void apply(LoanApplication application); - - void lockCurrentRate(int termInYears); - - @OneWay - void cancelApplication(); - - String getLoanStatus(); - - String display(); - - @EndsConversation - void close(); -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java deleted file mode 100644 index 76a53323bd..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; - -@Scope("CONVERSATION") -@AllowsPassByReference -public class LoanServiceImpl implements LoanService { - - private LoanApplication application; - private String status; - private int termLocked = 0; - @ConversationID - protected String conversationID; - - public void apply(LoanApplication application) { - this.application = application; - status = "open"; - } - - public void lockCurrentRate(int termInYears) { - termLocked = termInYears; - status = "locked"; - } - - public void cancelApplication() { - status = "cancelled"; - } - - public String getLoanStatus() { - return status; - } - - public String display() { - return "Loan application: " + application + ", term: " - + termLocked + ", status: " + status - + ", conversationID: " + conversationID; - } - - public void close() { - this.application = null; - this.status = "closed"; - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/resources/loanapplication.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/resources/loanapplication.composite deleted file mode 100644 index 3aa8d030b7..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/main/resources/loanapplication.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://loanapplication" - xmlns:la="http://loanapplication" - name="loanapplication"> - - <component name="LoanClientComponent"> - <implementation.java class="loanapplication.LoanClientImpl"/> - <reference name="loanService" target="LoanServiceComponent"/> - </component> - - <component name="LoanServiceComponent"> - <implementation.java class="loanapplication.LoanServiceImpl"/> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java deleted file mode 100644 index e88e48a53a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.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 loanapplication; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class LoanApplicationTestCase extends TestCase { - - private LoanClient loanClient; - private SCADomain domain; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("loanapplication.composite"); - - loanClient = domain.getService(LoanClient.class, "LoanClientComponent"); - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - public void test() throws Exception { - try { - loanClient.applyForLoan("John Doe", 1000.0f); - System.out.println("Applied: " + loanClient.displayLoan()); - System.out.println("Loan approved: " + loanClient.isApproved()); - loanClient.cancelLoan(); - System.out.println("Sleeping to let cancel complete ..."); - Thread.sleep(500); - if (!loanClient.isCancelled()) { - fail("Loan should be cancelled"); - } - System.out.println("Cancelled: " + loanClient.displayLoan()); - loanClient.closeLoan(); - - /* This is a mistake, after @EndsConversation, a new conversation is - * started automatically, so we should not get TargetNotFoundException. - * Keep this for the timeout case, where we should get the exception - try { - System.out.println("Trying to use the closed loan in the ended conversation ..."); - System.out.println("Closed: " + loanClient.displayLoan()); - fail("Target should not be found"); - } catch(TargetNotFoundException e) { - System.out.println("Target not found as expected"); - } - */ - - // Now check that a new conversation's loan is not cancelled - - if (loanClient.isCancelled()) { - fail("Loan should not be cancelled"); - } - } catch(Throwable e) { - e.printStackTrace(); - if (e instanceof Exception) { - throw (Exception)e; - } - if (e instanceof Error) { - throw (Error)e; - } - } - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/pom-distribution.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/pom-distribution.xml deleted file mode 100644 index 12609a0d19..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/pom-distribution.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>
- <!--
- This file is a modified version of the samples/pom.xml file in
- the svn source tree. This file is used as the pom.xml for the
- samples directory in the binary distribution. Any updates to
- samples/pom.xml in the svn source tree must also be applied to
- samples/pom-distribution.xml to keep these two files in sync
- (except where marked).
-
- The samples directory of the binary distribution needs to contain
- a pom.xml so that users can run "mvn eclipse:eclipse" to generate
- Eclipse project files for all the samples. We can't just copy the
- samples pom.xml from the svn source tree to the binary distribution
- because there are 10 samples in the svn source tree (and the source
- distribution) that aren't included in the binary distribution. This
- mismatch is being tracked as issue TUSCANY-3678 and it should be
- possible to remove this file when this issue is fixed.
- -->
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.6.1-SNAPSHOT</version>
- </parent>
- <artifactId>tuscany-samples-distribution</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tuscany SCA Samples in Binary Distribution</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>binding-echo</module>
- <module>binding-echo-extension</module>
- <module>binding-notification-broker</module>
- <module>binding-notification-consumer</module>
- <module>binding-notification-producer</module>
- <module>calculator</module>
- <module>calculator-corba-reference</module>
- <module>calculator-corba-service</module>
- <!-- the following is excluded from pom-distribution.xml
- <module>calculator-lean</module -->
- <module>calculator-distributed</module>
- <module>calculator-implementation-policies</module>
- <module>calculator-rmi-reference</module>
- <module>calculator-rmi-service</module>
- <module>calculator-script</module>
- <module>calculator-webapp</module>
- <!-- the following is excluded from pom-distribution.xml
- <module>calculator-ws-secure-webapp</module -->
- <module>calculator-ws-webapp</module>
- <module>callback-ws-client</module>
- <module>callback-ws-service</module>
- <module>callbacks-jms</module>
- <module>chat-webapp</module>
- <!-- the following is excluded from pom-distribution.xml
- <module>customer-dojo</module -->
- <!-- the following is excluded from pom-distribution.xml
- <module>customer-dojo-webapp</module -->
- <module>databinding-echo</module>
- <!--module>domain-webapp</module-->
- <module>domain-management</module>
- <module>feed-aggregator</module>
- <module>feed-aggregator-webapp</module>
- <module>helloworld-bpel</module>
- <module>helloworld-dojo-webapp</module>
- <module>helloworld-erlang-reference</module>
- <module>helloworld-erlang-service</module>
- <!-- the following is excluded from pom-distribution.xml
- <module>helloworld-jms-webapp</module -->
- <module>helloworld-jsonrpc-webapp</module>
- <module>helloworld-reference-jms</module>
- <module>helloworld-service-jms</module>
- <module>helloworld-ws-service</module>
- <module>helloworld-ws-service-jms</module>
- <module>helloworld-ws-service-secure</module>
- <module>helloworld-ws-reference</module>
- <!-- the following is excluded from pom-distribution.xml
- <module>helloworld-ws-reference-lean</module -->
- <module>helloworld-ws-reference-jms</module>
- <module>helloworld-ws-reference-secure</module>
- <module>helloworld-ws-sdo</module>
- <module>helloworld-ws-sdo-webapp</module>
- <module>holder-ws-service</module>
- <module>implementation-composite</module>
- <module>implementation-crud</module>
- <module>implementation-crud-extension</module>
- <module>implementation-notification</module>
- <module>implementation-pojo-extension</module>
- <!-- the following is excluded from pom-distribution.xml
- <module>loanapplication</module -->
- <module>osgi-supplychain</module>
- <module>photo-gallery</module>
- <module>quote-xquery</module>
- <module>simple-bigbank</module>
- <module>simple-bigbank-spring</module>
- <module>spring-bigbank-checkaccount</module>
- <module>spring-bigbank-calculator</module>
- <module>spring-bigbank-stockquote</module>
- <module>simple-callback</module>
- <module>simple-callback-ws</module>
- <module>store</module>
- <module>store-dojo</module>
- <module>store-webapp</module>
- <module>store-secure</module>
- <module>supplychain</module>
- <module>web-resource</module>
- <!--module>zipcode-jaxws</module-->
- </modules>
- </profile>
- </profiles>
-
-</project>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/pom.xml index b081e6c9f0..f48b476f02 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/pom.xml +++ b/sca-java-1.x/branches/sca-java-1.6.1/samples/pom.xml @@ -18,22 +18,6 @@ * under the License. --> <project> - <!-- - The pom-distribution.xml file in this directory is a modified version - of this pom.xml file and is used as the pom.xml for the samples - directory of the binary distribution. Any updates to this pom.xml - file must be applied to pom-distribution.xml to keep the two files - in sync (except where marked). - - The samples directory of the binary distribution needs to contain - a pom.xml so that users can run "mvn eclipse:eclipse" to generate - Eclipse project files for all the samples. We can't just copy the - samples pom.xml from the svn source tree to the binary distribution - because there are 10 samples in the svn source tree (and the source - distribution) that aren't included in the binary distribution. This - mismatch is being tracked as issue TUSCANY-3678 and it should be - possible to remove pom-distribution.xml when this issue is fixed. - --> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.tuscany.sca</groupId> @@ -67,27 +51,18 @@ <module>calculator</module> <module>calculator-corba-reference</module> <module>calculator-corba-service</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>calculator-lean</module> <module>calculator-distributed</module> <module>calculator-implementation-policies</module> <module>calculator-rmi-reference</module> <module>calculator-rmi-service</module> <module>calculator-script</module> <module>calculator-webapp</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>calculator-ws-secure-webapp</module> <module>calculator-ws-webapp</module> <module>callback-ws-client</module> <module>callback-ws-service</module> <module>callbacks-jms</module> <module>chat-webapp</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>customer-dojo</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>customer-dojo-webapp</module> <module>databinding-echo</module> - <!--module>domain-webapp</module--> <module>domain-management</module> <module>feed-aggregator</module> <module>feed-aggregator-webapp</module> @@ -95,8 +70,6 @@ <module>helloworld-dojo-webapp</module> <module>helloworld-erlang-reference</module> <module>helloworld-erlang-service</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>helloworld-jms-webapp</module> <module>helloworld-jsonrpc-webapp</module> <module>helloworld-reference-jms</module> <module>helloworld-service-jms</module> @@ -104,8 +77,6 @@ <module>helloworld-ws-service-jms</module> <module>helloworld-ws-service-secure</module> <module>helloworld-ws-reference</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>helloworld-ws-reference-lean</module> <module>helloworld-ws-reference-jms</module> <module>helloworld-ws-reference-secure</module> <module>helloworld-ws-sdo</module> @@ -116,8 +87,6 @@ <module>implementation-crud-extension</module> <module>implementation-notification</module> <module>implementation-pojo-extension</module> - <!-- the following is excluded from pom-distribution.xml --> - <module>loanapplication</module> <module>osgi-supplychain</module> <module>photo-gallery</module> <module>quote-xquery</module> @@ -134,7 +103,6 @@ <module>store-secure</module> <module>supplychain</module> <module>web-resource</module> - <!--module>zipcode-jaxws</module--> </modules> </profile> </profiles> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/README b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/README deleted file mode 100644 index 03f97f0ceb..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/README +++ /dev/null @@ -1,77 +0,0 @@ -ZipCode JAX-WS Sample
-======================================
-This sample demonstrates how to access an existing web service using JAX-WS/JAXB generated java interfaces/classes.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-zipcode-jaxws.jar zipcode.ZipCodeClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-zipcode-jaxws.jar zipcode.ZipCodeClient
-
-
-Sample Overview
----------------
-The sample provides a single component exposing a Web resource.
-
-zipcode-jaxws/
- src/
- main/
- java/
-
- resources/
- ZipCode.composite - the SCA assembly for this sample
- zipcode-jaxws.png - a pictorial representation of the
- sample .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant using the
-following commands
-
-cd zipcode-jaxws
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] 14-Jan-2008 14:28:07 org.apache.tuscany.sca.http.jetty.JettyServer a
-ddServletMapping
- [java] INFO: Added Servlet mapping: http://L3AW203:8080/myWeb/*
- [java] Sample server started (press enter to shutdown)
- [java]
- [java] To get the Web resource, point your Web browser to the following add
-ress:
- [java] http://localhost:8080/myWeb/index.html
- [java]
-
-As this point the Web resource is exposed by a web server started automatically
-by the SCA runtime. To stop the server just press enter.
-
-*** Note: This sample uses external services hosted at www.webservicex.net, these
- services are occasionally not available which causes this sample to hang.
- If that happens please try again later.
-
-
-Building The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built using
-Maven as follows.
-
-cd zipcode-jaxws
-mvn
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/build.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/build.xml deleted file mode 100644 index 5530a71ad4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/build.xml +++ /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. ---> -<!DOCTYPE project [ -<!ENTITY buildDependency SYSTEM "build-dependency.xml"> -]> - -<project name="zipcode-jaxws" default="compile"> - &buildDependency; - - <property name="test.class" value="zipcode.ZipCodeClient" /> - <property name="test.jar" value="sample-zipcode-jaxws.jar" /> - - <target name="compile" depends="download-wsdl"> - <mkdir dir="target/classes"/> - <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> - <src path="src/main/java"/> - <classpath> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src/main/resources"/> - </copy> - <jar destfile="target/${test.jar}" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="${test.class}"/> - </manifest> - </jar> - </target> - - <target name="download-wsdl"> - <mkdir dir="target/classes/wsdl/" /> - <get src="http://www.webservicex.net/uszip.asmx?wsdl" dest="target/classes/wsdl//uszip.wsdl" verbose="true" usetimestamp="true" /> - <get src="http://www.webservicex.net/WeatherForecast.asmx?wsdl" dest="target/classes/wsdl/WeatherForecast.wsdl" verbose="true" usetimestamp="true" /> - </target> - - <target name="package" depends="compile" /> - - <target name="run"> - <java classname="${test.class}" fork="true"> - <classpath> - <pathelement location="target/${test.jar}"/> - <fileset refid="tuscany.jars"/> - <fileset refid="3rdparty.jars"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete dir="target" includeemptydirs="true"/> - </target> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/pom.xml deleted file mode 100644 index 422a670b71..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/pom.xml +++ /dev/null @@ -1,245 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - <artifactId>sample-zipcode-jaxws</artifactId> - <packaging>jar</packaging> - <name>Apache Tuscany SCA Sample US Zip Code JAX-WS</name> - <description>Apache Tuscany SCA Sample US Zip Code JAX-WS</description> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>1.6.1-SNAPSHOT</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <repositories> - <repository> - <id>java.net</id> - <name>java.net Maven 1.x Repository</name> - <url>http://download.java.net/maven/1</url> - <layout>legacy</layout> - </repository> - <repository> - <id>java.net2</id> - <name>java.net Maven 2.x Repository</name> - <url>http://download.java.net/maven/2</url> - </repository> - </repositories> - - <pluginRepositories> - <pluginRepository> - <id>java.net2</id> - <name>java.net Maven 2.x Repository</name> - <url>http://download.java.net/maven/2</url> - </pluginRepository> - </pluginRepositories> - - - <build> - <finalName>${artifactId}</finalName> - <plugins> - <!-- comment out the following to build offline --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.1</version> - - <executions> - <execution> - <id>install-wsdl</id> - <phase>validate</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <mkdir dir="${project.build.outputDirectory}/wsdl/" /> - <get src="http://www.webservicex.net/uszip.asmx?wsdl" - dest="${project.build.outputDirectory}/wsdl/uszip.wsdl" verbose="true" - usetimestamp="true" /> - <get src="http://www.webservicex.net/WeatherForecast.asmx?wsdl" - dest="${project.build.outputDirectory}/wsdl/WeatherForecast.wsdl" verbose="true" - usetimestamp="true" /> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - <!-- end of offline excluded section --> - <plugin> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-maven-ant-generator</artifactId> - <version>1.6.1-SNAPSHOT</version> - <executions> - <execution> - <configuration> - <mainClass>location.LocationClient</mainClass> - <buildDependencyFileOnly>true</buildDependencyFileOnly> - </configuration> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <argLine>-Djava.endorsed.dirs=target/endorsed</argLine> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy</id> - <phase>generate-sources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.1</version> - <type>jar</type> - </artifactItem> - <artifactItem> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.1</version> - <type>jar</type> - </artifactItem> - </artifactItems> - <outputDirectory>${project.build.directory}/endorsed</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - </configuration> - </execution> - </executions> - </plugin> - <!-- - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/jaxws-source</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxws-maven-plugin</artifactId> - <version>1.9</version> - <executions> - <execution> - <id>wsimport1</id> - <phase>process-resources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.example.uszip</packageName> - <wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory> - <wsdlFiles> - <wsdlFile>uszip.wsdl</wsdlFile> - </wsdlFiles> - </configuration> - </execution> - <execution> - <id>wsimport2</id> - <phase>process-resources</phase> - <goals> - <goal>wsimport</goal> - </goals> - <configuration> - <packageName>com.example.weather</packageName> - <wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory> - <wsdlFiles> - <wsdlFile>WeatherForecast.wsdl</wsdlFile> - </wsdlFiles> - </configuration> - </execution> - </executions> - <configuration> - <target>2.1</target> - <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir> - <verbose>false</verbose> - <xnocompile>true</xnocompile> - </configuration> - </plugin> - --> - </plugins> - </build> - - -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java deleted file mode 100644 index 8c9a48bf40..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="USAreaCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usAreaCode" -}) -@XmlRootElement(name = "GetInfoByAreaCode") -public class GetInfoByAreaCode { - - @XmlElement(name = "USAreaCode") - protected String usAreaCode; - - /** - * Gets the value of the usAreaCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSAreaCode() { - return usAreaCode; - } - - /** - * Sets the value of the usAreaCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSAreaCode(String value) { - this.usAreaCode = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java deleted file mode 100644 index 93847c8809..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="GetInfoByAreaCodeResult" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByAreaCodeResult" -}) -@XmlRootElement(name = "GetInfoByAreaCodeResponse") -public class GetInfoByAreaCodeResponse { - - @XmlElement(name = "GetInfoByAreaCodeResult") - protected GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult getInfoByAreaCodeResult; - - /** - * Gets the value of the getInfoByAreaCodeResult property. - * - * @return - * possible object is - * {@link GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult } - * - */ - public GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult getGetInfoByAreaCodeResult() { - return getInfoByAreaCodeResult; - } - - /** - * Sets the value of the getInfoByAreaCodeResult property. - * - * @param value - * allowed object is - * {@link GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult } - * - */ - public void setGetInfoByAreaCodeResult(GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult value) { - this.getInfoByAreaCodeResult = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByAreaCodeResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java deleted file mode 100644 index cf9276d417..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="USCity" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usCity" -}) -@XmlRootElement(name = "GetInfoByCity") -public class GetInfoByCity { - - @XmlElement(name = "USCity") - protected String usCity; - - /** - * Gets the value of the usCity property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSCity() { - return usCity; - } - - /** - * Sets the value of the usCity property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSCity(String value) { - this.usCity = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java deleted file mode 100644 index 9dc0e41b2b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="GetInfoByCityResult" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByCityResult" -}) -@XmlRootElement(name = "GetInfoByCityResponse") -public class GetInfoByCityResponse { - - @XmlElement(name = "GetInfoByCityResult") - protected GetInfoByCityResponse.GetInfoByCityResult getInfoByCityResult; - - /** - * Gets the value of the getInfoByCityResult property. - * - * @return - * possible object is - * {@link GetInfoByCityResponse.GetInfoByCityResult } - * - */ - public GetInfoByCityResponse.GetInfoByCityResult getGetInfoByCityResult() { - return getInfoByCityResult; - } - - /** - * Sets the value of the getInfoByCityResult property. - * - * @param value - * allowed object is - * {@link GetInfoByCityResponse.GetInfoByCityResult } - * - */ - public void setGetInfoByCityResult(GetInfoByCityResponse.GetInfoByCityResult value) { - this.getInfoByCityResult = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByCityResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java deleted file mode 100644 index 48be94b14a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="USState" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usState" -}) -@XmlRootElement(name = "GetInfoByState") -public class GetInfoByState { - - @XmlElement(name = "USState") - protected String usState; - - /** - * Gets the value of the usState property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSState() { - return usState; - } - - /** - * Sets the value of the usState property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSState(String value) { - this.usState = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java deleted file mode 100644 index 1645e11ca2..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="GetInfoByStateResult" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByStateResult" -}) -@XmlRootElement(name = "GetInfoByStateResponse") -public class GetInfoByStateResponse { - - @XmlElement(name = "GetInfoByStateResult") - protected GetInfoByStateResponse.GetInfoByStateResult getInfoByStateResult; - - /** - * Gets the value of the getInfoByStateResult property. - * - * @return - * possible object is - * {@link GetInfoByStateResponse.GetInfoByStateResult } - * - */ - public GetInfoByStateResponse.GetInfoByStateResult getGetInfoByStateResult() { - return getInfoByStateResult; - } - - /** - * Sets the value of the getInfoByStateResult property. - * - * @param value - * allowed object is - * {@link GetInfoByStateResponse.GetInfoByStateResult } - * - */ - public void setGetInfoByStateResult(GetInfoByStateResponse.GetInfoByStateResult value) { - this.getInfoByStateResult = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByStateResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java deleted file mode 100644 index 45c948b4b4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="USZip" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usZip" -}) -@XmlRootElement(name = "GetInfoByZIP") -public class GetInfoByZIP { - - @XmlElement(name = "USZip") - protected String usZip; - - /** - * Gets the value of the usZip property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSZip() { - return usZip; - } - - /** - * Sets the value of the usZip property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSZip(String value) { - this.usZip = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java deleted file mode 100644 index 9e78dc6d0a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="GetInfoByZIPResult" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByZIPResult" -}) -@XmlRootElement(name = "GetInfoByZIPResponse") -public class GetInfoByZIPResponse { - - @XmlElement(name = "GetInfoByZIPResult") - protected GetInfoByZIPResponse.GetInfoByZIPResult getInfoByZIPResult; - - /** - * Gets the value of the getInfoByZIPResult property. - * - * @return - * possible object is - * {@link GetInfoByZIPResponse.GetInfoByZIPResult } - * - */ - public GetInfoByZIPResponse.GetInfoByZIPResult getGetInfoByZIPResult() { - return getInfoByZIPResult; - } - - /** - * Sets the value of the getInfoByZIPResult property. - * - * @param value - * allowed object is - * {@link GetInfoByZIPResponse.GetInfoByZIPResult } - * - */ - public void setGetInfoByZIPResult(GetInfoByZIPResponse.GetInfoByZIPResult value) { - this.getInfoByZIPResult = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <any/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByZIPResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List<Object> content; - - /** - * Gets the value of the content property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the content property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getContent().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List<Object> getContent() { - if (content == null) { - content = new ArrayList<Object>(); - } - return this.content; - } - - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java deleted file mode 100644 index ced83ff09a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import javax.xml.bind.annotation.XmlRegistry; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the com.example.uszip package. - * <p>An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.example.uszip - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link GetInfoByCity } - * - */ - public GetInfoByCity createGetInfoByCity() { - return new GetInfoByCity(); - } - - /** - * Create an instance of {@link GetInfoByState } - * - */ - public GetInfoByState createGetInfoByState() { - return new GetInfoByState(); - } - - /** - * Create an instance of {@link GetInfoByZIPResponse.GetInfoByZIPResult } - * - */ - public GetInfoByZIPResponse.GetInfoByZIPResult createGetInfoByZIPResponseGetInfoByZIPResult() { - return new GetInfoByZIPResponse.GetInfoByZIPResult(); - } - - /** - * Create an instance of {@link GetInfoByStateResponse.GetInfoByStateResult } - * - */ - public GetInfoByStateResponse.GetInfoByStateResult createGetInfoByStateResponseGetInfoByStateResult() { - return new GetInfoByStateResponse.GetInfoByStateResult(); - } - - /** - * Create an instance of {@link GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult } - * - */ - public GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult createGetInfoByAreaCodeResponseGetInfoByAreaCodeResult() { - return new GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult(); - } - - /** - * Create an instance of {@link GetInfoByZIP } - * - */ - public GetInfoByZIP createGetInfoByZIP() { - return new GetInfoByZIP(); - } - - /** - * Create an instance of {@link GetInfoByAreaCodeResponse } - * - */ - public GetInfoByAreaCodeResponse createGetInfoByAreaCodeResponse() { - return new GetInfoByAreaCodeResponse(); - } - - /** - * Create an instance of {@link GetInfoByCityResponse } - * - */ - public GetInfoByCityResponse createGetInfoByCityResponse() { - return new GetInfoByCityResponse(); - } - - /** - * Create an instance of {@link GetInfoByStateResponse } - * - */ - public GetInfoByStateResponse createGetInfoByStateResponse() { - return new GetInfoByStateResponse(); - } - - /** - * Create an instance of {@link GetInfoByCityResponse.GetInfoByCityResult } - * - */ - public GetInfoByCityResponse.GetInfoByCityResult createGetInfoByCityResponseGetInfoByCityResult() { - return new GetInfoByCityResponse.GetInfoByCityResult(); - } - - /** - * Create an instance of {@link GetInfoByZIPResponse } - * - */ - public GetInfoByZIPResponse createGetInfoByZIPResponse() { - return new GetInfoByZIPResponse(); - } - - /** - * Create an instance of {@link GetInfoByAreaCode } - * - */ - public GetInfoByAreaCode createGetInfoByAreaCode() { - return new GetInfoByAreaCode(); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java deleted file mode 100644 index 22493ba9b8..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import javax.xml.ws.WebEndpoint; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceFeature; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebServiceClient(name = "USZip", targetNamespace = "http://www.webserviceX.NET", wsdlLocation = "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/uszip.wsdl") -public class USZip - extends Service -{ - - private final static URL USZIP_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(com.example.uszip.USZip.class.getName()); - - static { - URL url = null; - try { - URL baseUrl; - baseUrl = com.example.uszip.USZip.class.getResource("."); - url = new URL(baseUrl, "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/uszip.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/uszip.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - USZIP_WSDL_LOCATION = url; - } - - public USZip(URL wsdlLocation, QName serviceName) { - super(wsdlLocation, serviceName); - } - - public USZip() { - super(USZIP_WSDL_LOCATION, new QName("http://www.webserviceX.NET", "USZip")); - } - - /** - * - * @return - * returns USZipSoap - */ - @WebEndpoint(name = "USZipSoap") - public USZipSoap getUSZipSoap() { - return super.getPort(new QName("http://www.webserviceX.NET", "USZipSoap"), USZipSoap.class); - } - - /** - * - * @param features - * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. - * @return - * returns USZipSoap - */ - @WebEndpoint(name = "USZipSoap") - public USZipSoap getUSZipSoap(WebServiceFeature... features) { - return super.getPort(new QName("http://www.webserviceX.NET", "USZipSoap"), USZipSoap.class, features); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java deleted file mode 100644 index 5ac370005f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.uszip; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -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 = "USZipSoap", targetNamespace = "http://www.webserviceX.NET") -@XmlSeeAlso({ - ObjectFactory.class -}) -public interface USZipSoap { - - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by Zip Code - * - * @param usZip - * @return - * returns com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult - */ - @WebMethod(operationName = "GetInfoByZIP", action = "http://www.webserviceX.NET/GetInfoByZIP") - @WebResult(name = "GetInfoByZIPResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByZIP", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByZIP") - @ResponseWrapper(localName = "GetInfoByZIPResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByZIPResponse") - public com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult getInfoByZIP( - @WebParam(name = "USZip", targetNamespace = "http://www.webserviceX.NET") - String usZip); - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by City - * - * @param usCity - * @return - * returns com.example.uszip.GetInfoByCityResponse.GetInfoByCityResult - */ - @WebMethod(operationName = "GetInfoByCity", action = "http://www.webserviceX.NET/GetInfoByCity") - @WebResult(name = "GetInfoByCityResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByCity", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByCity") - @ResponseWrapper(localName = "GetInfoByCityResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByCityResponse") - public com.example.uszip.GetInfoByCityResponse.GetInfoByCityResult getInfoByCity( - @WebParam(name = "USCity", targetNamespace = "http://www.webserviceX.NET") - String usCity); - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by state - * - * @param usState - * @return - * returns com.example.uszip.GetInfoByStateResponse.GetInfoByStateResult - */ - @WebMethod(operationName = "GetInfoByState", action = "http://www.webserviceX.NET/GetInfoByState") - @WebResult(name = "GetInfoByStateResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByState", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByState") - @ResponseWrapper(localName = "GetInfoByStateResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByStateResponse") - public com.example.uszip.GetInfoByStateResponse.GetInfoByStateResult getInfoByState( - @WebParam(name = "USState", targetNamespace = "http://www.webserviceX.NET") - String usState); - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by Area Code - * - * @param usAreaCode - * @return - * returns com.example.uszip.GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult - */ - @WebMethod(operationName = "GetInfoByAreaCode", action = "http://www.webserviceX.NET/GetInfoByAreaCode") - @WebResult(name = "GetInfoByAreaCodeResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByAreaCode", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByAreaCode") - @ResponseWrapper(localName = "GetInfoByAreaCodeResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByAreaCodeResponse") - public com.example.uszip.GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult getInfoByAreaCode( - @WebParam(name = "USAreaCode", targetNamespace = "http://www.webserviceX.NET") - String usAreaCode); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java deleted file mode 100644 index d120f34ee5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.webserviceX.NET", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package com.example.uszip; diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java deleted file mode 100644 index 5385fb57be..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.weather; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for ArrayOfWeatherData complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ArrayOfWeatherData"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="WeatherData" type="{http://www.webservicex.net}WeatherData" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ArrayOfWeatherData", propOrder = { - "weatherData" -}) -public class ArrayOfWeatherData { - - @XmlElement(name = "WeatherData") - protected List<WeatherData> weatherData; - - /** - * Gets the value of the weatherData property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the weatherData property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getWeatherData().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link WeatherData } - * - * - */ - public List<WeatherData> getWeatherData() { - if (weatherData == null) { - weatherData = new ArrayList<WeatherData>(); - } - return this.weatherData; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java deleted file mode 100644 index 9eb205e75d..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="PlaceName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "placeName" -}) -@XmlRootElement(name = "GetWeatherByPlaceName") -public class GetWeatherByPlaceName { - - @XmlElement(name = "PlaceName") - protected String placeName; - - /** - * Gets the value of the placeName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPlaceName() { - return placeName; - } - - /** - * Sets the value of the placeName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPlaceName(String value) { - this.placeName = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java deleted file mode 100644 index e281509623..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="GetWeatherByPlaceNameResult" type="{http://www.webservicex.net}WeatherForecasts"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getWeatherByPlaceNameResult" -}) -@XmlRootElement(name = "GetWeatherByPlaceNameResponse") -public class GetWeatherByPlaceNameResponse { - - @XmlElement(name = "GetWeatherByPlaceNameResult", required = true) - protected WeatherForecasts getWeatherByPlaceNameResult; - - /** - * Gets the value of the getWeatherByPlaceNameResult property. - * - * @return - * possible object is - * {@link WeatherForecasts } - * - */ - public WeatherForecasts getGetWeatherByPlaceNameResult() { - return getWeatherByPlaceNameResult; - } - - /** - * Sets the value of the getWeatherByPlaceNameResult property. - * - * @param value - * allowed object is - * {@link WeatherForecasts } - * - */ - public void setGetWeatherByPlaceNameResult(WeatherForecasts value) { - this.getWeatherByPlaceNameResult = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java deleted file mode 100644 index 08d4a70364..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="ZipCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "zipCode" -}) -@XmlRootElement(name = "GetWeatherByZipCode") -public class GetWeatherByZipCode { - - @XmlElement(name = "ZipCode") - protected String zipCode; - - /** - * Gets the value of the zipCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getZipCode() { - return zipCode; - } - - /** - * Sets the value of the zipCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setZipCode(String value) { - this.zipCode = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java deleted file mode 100644 index 9288f5332e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="GetWeatherByZipCodeResult" type="{http://www.webservicex.net}WeatherForecasts"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getWeatherByZipCodeResult" -}) -@XmlRootElement(name = "GetWeatherByZipCodeResponse") -public class GetWeatherByZipCodeResponse { - - @XmlElement(name = "GetWeatherByZipCodeResult", required = true) - protected WeatherForecasts getWeatherByZipCodeResult; - - /** - * Gets the value of the getWeatherByZipCodeResult property. - * - * @return - * possible object is - * {@link WeatherForecasts } - * - */ - public WeatherForecasts getGetWeatherByZipCodeResult() { - return getWeatherByZipCodeResult; - } - - /** - * Sets the value of the getWeatherByZipCodeResult property. - * - * @param value - * allowed object is - * {@link WeatherForecasts } - * - */ - public void setGetWeatherByZipCodeResult(WeatherForecasts value) { - this.getWeatherByZipCodeResult = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java deleted file mode 100644 index 0c4fdbcde1..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.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.example.weather; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the com.example.weather package. - * <p>An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _WeatherForecasts_QNAME = new QName("http://www.webservicex.net", "WeatherForecasts"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.example.weather - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link WeatherData } - * - */ - public WeatherData createWeatherData() { - return new WeatherData(); - } - - /** - * Create an instance of {@link GetWeatherByPlaceName } - * - */ - public GetWeatherByPlaceName createGetWeatherByPlaceName() { - return new GetWeatherByPlaceName(); - } - - /** - * Create an instance of {@link GetWeatherByPlaceNameResponse } - * - */ - public GetWeatherByPlaceNameResponse createGetWeatherByPlaceNameResponse() { - return new GetWeatherByPlaceNameResponse(); - } - - /** - * Create an instance of {@link GetWeatherByZipCodeResponse } - * - */ - public GetWeatherByZipCodeResponse createGetWeatherByZipCodeResponse() { - return new GetWeatherByZipCodeResponse(); - } - - /** - * Create an instance of {@link GetWeatherByZipCode } - * - */ - public GetWeatherByZipCode createGetWeatherByZipCode() { - return new GetWeatherByZipCode(); - } - - /** - * Create an instance of {@link WeatherForecasts } - * - */ - public WeatherForecasts createWeatherForecasts() { - return new WeatherForecasts(); - } - - /** - * Create an instance of {@link ArrayOfWeatherData } - * - */ - public ArrayOfWeatherData createArrayOfWeatherData() { - return new ArrayOfWeatherData(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link WeatherForecasts }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.webservicex.net", name = "WeatherForecasts") - public JAXBElement<WeatherForecasts> createWeatherForecasts(WeatherForecasts value) { - return new JAXBElement<WeatherForecasts>(_WeatherForecasts_QNAME, WeatherForecasts.class, null, value); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java deleted file mode 100644 index a4ca6190b5..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for WeatherData complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="WeatherData"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="Day" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="WeatherImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="MaxTemperatureF" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="MinTemperatureF" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="MaxTemperatureC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="MinTemperatureC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "WeatherData", propOrder = { - "day", - "weatherImage", - "maxTemperatureF", - "minTemperatureF", - "maxTemperatureC", - "minTemperatureC" -}) -public class WeatherData { - - @XmlElement(name = "Day") - protected String day; - @XmlElement(name = "WeatherImage") - protected String weatherImage; - @XmlElement(name = "MaxTemperatureF") - protected String maxTemperatureF; - @XmlElement(name = "MinTemperatureF") - protected String minTemperatureF; - @XmlElement(name = "MaxTemperatureC") - protected String maxTemperatureC; - @XmlElement(name = "MinTemperatureC") - protected String minTemperatureC; - - /** - * Gets the value of the day property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDay() { - return day; - } - - /** - * Sets the value of the day property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDay(String value) { - this.day = value; - } - - /** - * Gets the value of the weatherImage property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getWeatherImage() { - return weatherImage; - } - - /** - * Sets the value of the weatherImage property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setWeatherImage(String value) { - this.weatherImage = value; - } - - /** - * Gets the value of the maxTemperatureF property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMaxTemperatureF() { - return maxTemperatureF; - } - - /** - * Sets the value of the maxTemperatureF property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMaxTemperatureF(String value) { - this.maxTemperatureF = value; - } - - /** - * Gets the value of the minTemperatureF property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMinTemperatureF() { - return minTemperatureF; - } - - /** - * Sets the value of the minTemperatureF property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMinTemperatureF(String value) { - this.minTemperatureF = value; - } - - /** - * Gets the value of the maxTemperatureC property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMaxTemperatureC() { - return maxTemperatureC; - } - - /** - * Sets the value of the maxTemperatureC property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMaxTemperatureC(String value) { - this.maxTemperatureC = value; - } - - /** - * Gets the value of the minTemperatureC property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMinTemperatureC() { - return minTemperatureC; - } - - /** - * Sets the value of the minTemperatureC property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMinTemperatureC(String value) { - this.minTemperatureC = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java deleted file mode 100644 index 0902ce67fe..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.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.example.weather; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import javax.xml.ws.WebEndpoint; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceFeature; - - -/** - * Get one week weather forecast for valid zip code or Place name in USA - * - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebServiceClient(name = "WeatherForecast", targetNamespace = "http://www.webservicex.net", wsdlLocation = "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/WeatherForecast.wsdl") -public class WeatherForecast - extends Service -{ - - private final static URL WEATHERFORECAST_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(com.example.weather.WeatherForecast.class.getName()); - - static { - URL url = null; - try { - URL baseUrl; - baseUrl = com.example.weather.WeatherForecast.class.getResource("."); - url = new URL(baseUrl, "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/WeatherForecast.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/WeatherForecast.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - WEATHERFORECAST_WSDL_LOCATION = url; - } - - public WeatherForecast(URL wsdlLocation, QName serviceName) { - super(wsdlLocation, serviceName); - } - - public WeatherForecast() { - super(WEATHERFORECAST_WSDL_LOCATION, new QName("http://www.webservicex.net", "WeatherForecast")); - } - - /** - * - * @return - * returns WeatherForecastSoap - */ - @WebEndpoint(name = "WeatherForecastSoap") - public WeatherForecastSoap getWeatherForecastSoap() { - return super.getPort(new QName("http://www.webservicex.net", "WeatherForecastSoap"), WeatherForecastSoap.class); - } - - /** - * - * @param features - * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. - * @return - * returns WeatherForecastSoap - */ - @WebEndpoint(name = "WeatherForecastSoap") - public WeatherForecastSoap getWeatherForecastSoap(WebServiceFeature... features) { - return super.getPort(new QName("http://www.webservicex.net", "WeatherForecastSoap"), WeatherForecastSoap.class, features); - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java deleted file mode 100644 index aa000a44d2..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.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.example.weather; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -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 = "WeatherForecastSoap", targetNamespace = "http://www.webservicex.net") -@XmlSeeAlso({ - ObjectFactory.class -}) -public interface WeatherForecastSoap { - - - /** - * Get one week weather forecast for a valid Zip Code(USA) - * - * @param zipCode - * @return - * returns com.example.weather.WeatherForecasts - */ - @WebMethod(operationName = "GetWeatherByZipCode", action = "http://www.webservicex.net/GetWeatherByZipCode") - @WebResult(name = "GetWeatherByZipCodeResult", targetNamespace = "http://www.webservicex.net") - @RequestWrapper(localName = "GetWeatherByZipCode", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByZipCode") - @ResponseWrapper(localName = "GetWeatherByZipCodeResponse", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByZipCodeResponse") - public WeatherForecasts getWeatherByZipCode( - @WebParam(name = "ZipCode", targetNamespace = "http://www.webservicex.net") - String zipCode); - - /** - * Get one week weather forecast for a place name(USA) - * - * @param placeName - * @return - * returns com.example.weather.WeatherForecasts - */ - @WebMethod(operationName = "GetWeatherByPlaceName", action = "http://www.webservicex.net/GetWeatherByPlaceName") - @WebResult(name = "GetWeatherByPlaceNameResult", targetNamespace = "http://www.webservicex.net") - @RequestWrapper(localName = "GetWeatherByPlaceName", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByPlaceName") - @ResponseWrapper(localName = "GetWeatherByPlaceNameResponse", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByPlaceNameResponse") - public WeatherForecasts getWeatherByPlaceName( - @WebParam(name = "PlaceName", targetNamespace = "http://www.webservicex.net") - String placeName); - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java deleted file mode 100644 index 8ded0946d9..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for WeatherForecasts complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="WeatherForecasts"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="Latitude" type="{http://www.w3.org/2001/XMLSchema}float"/> - * <element name="Longitude" type="{http://www.w3.org/2001/XMLSchema}float"/> - * <element name="AllocationFactor" type="{http://www.w3.org/2001/XMLSchema}float"/> - * <element name="FipsCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="PlaceName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="StateCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="Details" type="{http://www.webservicex.net}ArrayOfWeatherData" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "WeatherForecasts", propOrder = { - "latitude", - "longitude", - "allocationFactor", - "fipsCode", - "placeName", - "stateCode", - "status", - "details" -}) -public class WeatherForecasts { - - @XmlElement(name = "Latitude") - protected float latitude; - @XmlElement(name = "Longitude") - protected float longitude; - @XmlElement(name = "AllocationFactor") - protected float allocationFactor; - @XmlElement(name = "FipsCode") - protected String fipsCode; - @XmlElement(name = "PlaceName") - protected String placeName; - @XmlElement(name = "StateCode") - protected String stateCode; - @XmlElement(name = "Status") - protected String status; - @XmlElement(name = "Details") - protected ArrayOfWeatherData details; - - /** - * Gets the value of the latitude property. - * - */ - public float getLatitude() { - return latitude; - } - - /** - * Sets the value of the latitude property. - * - */ - public void setLatitude(float value) { - this.latitude = value; - } - - /** - * Gets the value of the longitude property. - * - */ - public float getLongitude() { - return longitude; - } - - /** - * Sets the value of the longitude property. - * - */ - public void setLongitude(float value) { - this.longitude = value; - } - - /** - * Gets the value of the allocationFactor property. - * - */ - public float getAllocationFactor() { - return allocationFactor; - } - - /** - * Sets the value of the allocationFactor property. - * - */ - public void setAllocationFactor(float value) { - this.allocationFactor = value; - } - - /** - * Gets the value of the fipsCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFipsCode() { - return fipsCode; - } - - /** - * Sets the value of the fipsCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFipsCode(String value) { - this.fipsCode = value; - } - - /** - * Gets the value of the placeName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPlaceName() { - return placeName; - } - - /** - * Sets the value of the placeName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPlaceName(String value) { - this.placeName = value; - } - - /** - * Gets the value of the stateCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStateCode() { - return stateCode; - } - - /** - * Sets the value of the stateCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStateCode(String value) { - this.stateCode = value; - } - - /** - * Gets the value of the status property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStatus() { - return status; - } - - /** - * Sets the value of the status property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStatus(String value) { - this.status = value; - } - - /** - * Gets the value of the details property. - * - * @return - * possible object is - * {@link ArrayOfWeatherData } - * - */ - public ArrayOfWeatherData getDetails() { - return details; - } - - /** - * Sets the value of the details property. - * - * @param value - * allowed object is - * {@link ArrayOfWeatherData } - * - */ - public void setDetails(ArrayOfWeatherData value) { - this.details = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java deleted file mode 100644 index 6543ed7abf..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.webservicex.net", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package com.example.weather; diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/location/LocationClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/location/LocationClient.java deleted file mode 100644 index 35c114093a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/location/LocationClient.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package location; - -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import com.example.uszip.GetInfoByZIPResponse; -import com.example.uszip.USZipSoap; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class LocationClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("USLocation.composite"); - USZipSoap zipService = domain.getService(USZipSoap.class, "USLocationService"); - - GetInfoByZIPResponse.GetInfoByZIPResult result = zipService.getInfoByZIP("94555"); - - GetInfoByZIPResponse response = new GetInfoByZIPResponse(); - response.setGetInfoByZIPResult(result); - - JAXBContext context = JAXBContext.newInstance(GetInfoByZIPResponse.class); - StringWriter writer = new StringWriter(); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.marshal(response, writer); - - String xml = writer.toString(); - System.out.println(xml); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java deleted file mode 100644 index cf27332e60..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package location; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import com.example.uszip.USZipSoap; -import com.example.uszip.GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult; -import com.example.uszip.GetInfoByCityResponse.GetInfoByCityResult; -import com.example.uszip.GetInfoByStateResponse.GetInfoByStateResult; -import com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult; - -/** - * @version $Rev$ $Date$ - */ -@Service(USZipSoap.class) -@AllowsPassByReference -public class USLocationImpl implements USZipSoap { - @Reference - protected USZipSoap usZipService; - - public GetInfoByAreaCodeResult getInfoByAreaCode(String usAreaCode) { - return usZipService.getInfoByAreaCode(usAreaCode); - } - - public GetInfoByCityResult getInfoByCity(String usCity) { - return usZipService.getInfoByCity(usCity); - } - - public GetInfoByStateResult getInfoByState(String usState) { - return usZipService.getInfoByState(usState); - } - - public GetInfoByZIPResult getInfoByZIP(String usZip) { - return usZipService.getInfoByZIP(usZip); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java deleted file mode 100644 index c03cf2955f..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package weather; - -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import com.example.weather.GetWeatherByZipCodeResponse; -import com.example.weather.WeatherForecastSoap; -import com.example.weather.WeatherForecasts; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class WeatherForecastClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("WeatherForecast.composite"); - WeatherForecastSoap weatherService = domain.getService(WeatherForecastSoap.class, "WeatherForecastService"); - - WeatherForecasts result = weatherService.getWeatherByZipCode("94555"); - - // Dump the result as XML - - // Wrap the result so that it can be marshaled - GetWeatherByZipCodeResponse response = new GetWeatherByZipCodeResponse(); - response.setGetWeatherByZipCodeResult(result); - - // Marshal the JAXB object into XML - JAXBContext context = JAXBContext.newInstance(GetWeatherByZipCodeResponse.class); - StringWriter writer = new StringWriter(); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.marshal(response, writer); - - String xml = writer.toString(); - System.out.println(xml); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java deleted file mode 100644 index cf50a6cd9e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 weather; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import com.example.weather.WeatherForecastSoap; -import com.example.weather.WeatherForecasts; - -/** - * @version $Rev$ $Date$ - */ -@Service(WeatherForecastSoap.class) -public class WeatherForecastImpl implements WeatherForecastSoap{ - @Reference - protected WeatherForecastSoap weatherForecast; - - public WeatherForecasts getWeatherByPlaceName(String placeName) { - return weatherForecast.getWeatherByPlaceName(placeName); - } - - public WeatherForecasts getWeatherByZipCode(String zipCode) { - return weatherForecast.getWeatherByZipCode(zipCode); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java deleted file mode 100644 index f181d9bd0e..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.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 zipcode; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class ZipCodeClient { - - public static void main(String[] args) throws Exception { - - System.out.println("Please wait..."); - - SCADomain domain = SCADomain.newInstance("ZipCode.composite"); - ZipCodeService zipService = domain.getService(ZipCodeService.class, "ZipCodeService"); - - String result = zipService.lookup("94555"); - System.out.println(result); - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java deleted file mode 100644 index ec0f05dd6c..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.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 zipcode; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface ZipCodeService { - String lookup(String zipCode); -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java deleted file mode 100644 index 284e5a3aa3..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.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 zipcode; - -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; - -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import com.example.uszip.GetInfoByZIPResponse; -import com.example.uszip.USZipSoap; -import com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult; -import com.example.weather.GetWeatherByZipCodeResponse; -import com.example.weather.WeatherForecastSoap; -import com.example.weather.WeatherForecasts; - -/** - * @version $Rev$ $Date$ - */ -@Service(ZipCodeService.class) -@AllowsPassByReference -public class ZipCodeServiceImpl implements ZipCodeService { - @Reference - protected USZipSoap usZipService; - - @Reference - protected WeatherForecastSoap weatherForecast; - - public String lookup(String zipCode) { - GetInfoByZIPResult result1 = usZipService.getInfoByZIP(zipCode); - - GetInfoByZIPResponse response1 = new GetInfoByZIPResponse(); - response1.setGetInfoByZIPResult(result1); - - String xml1 = toXML(response1); - - WeatherForecasts result2 = weatherForecast.getWeatherByZipCode(zipCode); - // Wrap the result so that it can be marshaled - GetWeatherByZipCodeResponse response2 = new GetWeatherByZipCodeResponse(); - response2.setGetWeatherByZipCodeResult(result2); - - String xml2 = toXML(response2); - // Marshal the JAXB object into XML - return xml1 + "\n" + xml2; - } - - private String toXML(Object jaxb) { - try { - JAXBContext context = JAXBContext.newInstance(jaxb.getClass()); - StringWriter writer = new StringWriter(); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.marshal(jaxb, writer); - return writer.toString(); - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/USLocation.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/USLocation.composite deleted file mode 100644 index a171fe62c9..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/USLocation.composite +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://location" name="USLocation">
-
- <component name="USLocationService">
- <implementation.java class="location.USLocationImpl" />
- <reference name="usZipService">
- <binding.ws wsdlElement="http://www.webserviceX.NET#wsdl.port(USZip/USZipSoap)" />
- </reference>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite deleted file mode 100644 index 0e1b118e44..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://weather" name="WeatherForecast">
-
- <component name="WeatherForecastService">
- <implementation.java class="weather.WeatherForecastImpl" />
- <reference name="weatherForecast">
- <binding.ws wsdlElement="http://www.webservicex.net#wsdl.port(WeatherForecast/WeatherForecastSoap)" />
- </reference>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/ZipCode.composite b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/ZipCode.composite deleted file mode 100644 index 28d674c29b..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/main/resources/ZipCode.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://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - targetNamespace="http://zipcode" name="ZipCode"> - - <component name="ZipCodeService"> - <implementation.java class="zipcode.ZipCodeServiceImpl" /> - <reference name="usZipService"> - <binding.ws uri="http://www.webservicex.net/uszip.asmx" /> - </reference> - <reference name="weatherForecast"> - <binding.ws wsdlElement="http://www.webservicex.net#wsdl.port(WeatherForecast/WeatherForecastSoap)" /> - </reference> - </component> - -</composite> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java deleted file mode 100644 index 019fce26d6..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 zipcode; - -import location.LocationClient; -import weather.WeatherForecastClient; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the callback server is available - */ -public class ZipCodeClientTestCase { - - @Before - public void startServer() throws Exception { - } - - @Test - public void testClient() throws Exception { - /* - System.out.println("Running LocationClient..."); - LocationClient.main(null); - System.out.println("Running WeatherForecastClient..."); - WeatherForecastClient.main(null); - */ - System.out.println("Running ZipCodeClient..."); - ZipCodeClient.main(null); - } - - @After - public void stopServer() throws Exception { - } -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/LICENSE b/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ -
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/NOTICE b/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/NOTICE deleted file mode 100644 index ad2ba40961..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/pom.xml deleted file mode 100644 index b432bf17aa..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-maven-tools</artifactId> - <version>1.6.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-maven-osgi-junit</artifactId> - <packaging>maven-plugin</packaging> - <name>Apache Tuscany SCA OSGi JUnit Maven Plugin</name> - - <dependencies> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <version>2.0.7</version> - </dependency> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> - <version>2.0.7</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-launcher-osgi</artifactId> - <version>1.6.1-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>compile</scope> - </dependency> - - </dependencies> -</project> diff --git a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java b/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java deleted file mode 100644 index a2251a6a2a..0000000000 --- a/sca-java-1.x/branches/sca-java-1.6.1/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 org.apache.tuscany.tools.sca.osgi.junit.plugin; - -import java.io.File; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import junit.framework.Assert; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; -import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.project.MavenProject; -import org.apache.tuscany.sca.node.osgi.launcher.FelixOSGiHost; -import org.apache.tuscany.sca.node.osgi.launcher.LauncherBundleActivator; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * @version $Rev$ $Date$ - * @goal test - * @phase integration-test - * @requiresDependencyResolution test - * @description Run the unit test with OSGi - */ -public class OSGiJUnitMojo extends AbstractMojo { - /** - * The project to create a build for. - * - * @parameter expression="${project}" - * @required - * @readonly - */ - private MavenProject project; - - /** - * The basedir of the project. - * - * @parameter expression="${basedir}" - * @required @readonly - */ - protected File basedir; - - /** - * Used to look up Artifacts in the remote repository. - * - * @parameter expression="${component.org.apache.maven.artifact.factory.ArtifactFactory}" - * @required - * @readonly - */ - protected org.apache.maven.artifact.factory.ArtifactFactory factory; - - /** - * Used to look up Artifacts in the remote repository. - * - * @parameter expression="${component.org.apache.maven.artifact.resolver.ArtifactResolver}" - * @required - * @readonly - */ - protected org.apache.maven.artifact.resolver.ArtifactResolver resolver; - - /** - * Location of the local repository. - * - * @parameter expression="${localRepository}" - * @readonly - * @required - */ - protected org.apache.maven.artifact.repository.ArtifactRepository local; - - /** - * List of Remote Repositories used by the resolver - * - * @parameter expression="${project.remoteArtifactRepositories}" - * @readonly - * @required - */ - protected java.util.List remoteRepos; - - /** - * @parameter - */ - protected String osgiRuntime; - - protected Artifact getArtifact(String groupId, String artifactId) throws MojoExecutionException { - Artifact artifact; - VersionRange vr; - try { - vr = VersionRange.createFromVersionSpec(project.getVersion()); - } catch (InvalidVersionSpecificationException e1) { - vr = VersionRange.createFromVersion(project.getVersion()); - } - artifact = factory.createDependencyArtifact(groupId, artifactId, vr, "jar", null, Artifact.SCOPE_TEST); - - try { - resolver.resolve(artifact, remoteRepos, local); - } catch (ArtifactResolutionException e) { - throw new MojoExecutionException("Unable to resolve artifact.", e); - } catch (ArtifactNotFoundException e) { - throw new MojoExecutionException("Unable to find artifact.", e); - } - - return artifact; - } - - public void execute() throws MojoExecutionException { - if (project.getPackaging().equals("pom")) { - return; - } - - Log log = getLog(); - List<URL> jarFiles = new ArrayList<URL>(); - for (Object o : project.getArtifacts()) { - Artifact a = (Artifact)o; - try { - if (log.isDebugEnabled()) { - log.debug("Adding: " + a); - } - jarFiles.add(a.getFile().toURI().toURL()); - } catch (MalformedURLException e) { - getLog().error(e); - } - } - - /* - * Add org.apache.tuscany.sca:tuscany-extensibility-osgi module - */ - String aid = "equinox".equals(osgiRuntime) ? "tuscany-extensibility-equinox" : "tuscany-extensibility-osgi"; - Artifact ext = getArtifact("org.apache.tuscany.sca", aid); - try { - URL url = ext.getFile().toURI().toURL(); - if (!jarFiles.contains(url)) { - if (log.isDebugEnabled()) { - log.debug("Adding: " + ext); - } - jarFiles.add(url); - } - } catch (MalformedURLException e) { - getLog().error(e); - } - - // String home = new File(basedir, "target/tuscany").toString(); - // System.setProperty("TUSCANY_HOME", home); - // getLog().info(home); - try { - FelixOSGiHost host = new FelixOSGiHost(); - host.setActivator(new LauncherBundleActivator(jarFiles)); - BundleContext context = host.start(); - - for (Bundle b : context.getBundles()) { - if (getLog().isDebugEnabled()) { - getLog().debug(LauncherBundleActivator.toString(b, false)); - } - } - - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - URL[] urls = - new URL[] {new File(project.getBuild().getOutputDirectory()).toURI().toURL(), - new File(project.getBuild().getTestOutputDirectory()).toURI().toURL()}; - - URLClassLoader cl = new URLClassLoader(urls, tccl); - Thread.currentThread().setContextClassLoader(cl); - try { - runAllTestsFromDirs(cl, project.getBuild().getTestOutputDirectory()); - } finally { - Thread.currentThread().setContextClassLoader(tccl); - } - host.stop(); - } catch (Throwable e) { - throw new MojoExecutionException(e.getMessage(), e); - } - // finally { - // System.clearProperty("TUSCANY_HOME"); - // } - - } - - public void getTestCases(File dir, String prefix, HashSet<String> testCaseSet) { - File[] files = dir.listFiles(); - for (File file : files) { - if (file.isDirectory()) { - String newPrefix = prefix == null ? file.getName() : prefix + "." + file.getName(); - getTestCases(file, newPrefix, testCaseSet); - } else if (file.getName().endsWith("TestCase.class")) { - String name = file.getName(); - name = name.substring(0, name.length() - 6); // remove .class - name = (prefix == null) ? name : prefix + "." + name; - - testCaseSet.add(name); - } - } - } - - public void runAllTestsFromDirs(ClassLoader testClassLoader, String testDir) throws Exception { - - int failures = 0; - HashSet<String> testCaseSet = new HashSet<String>(); - getTestCases(new File(testDir), null, testCaseSet); - for (String className : testCaseSet) { - Class testClass = testClassLoader.loadClass(className); - failures += runTestCase(testClassLoader, testClass); - } - - Assert.assertEquals(0, failures); - - } - - /** - * Use java reflection to call JUNIT as the JUNIT might be in the bundles - * @param testClassLoader - * @param testClass - * @return - * @throws Exception - */ - public int runTestCase(ClassLoader testClassLoader, Class testClass) throws Exception { - - if (testClass.getName().endsWith("TestCase")) { - getLog().info("Running: " + testClass.getName()); - Class coreClass = Class.forName("org.junit.runner.JUnitCore", true, testClassLoader); - Object core = coreClass.newInstance(); - Class reqClass = Class.forName("org.junit.runner.Request", true, testClassLoader); - Method aClass = reqClass.getMethod("aClass", Class.class); - Object req = aClass.invoke(null, testClass); - Method run = coreClass.getMethod("run", reqClass); - Object result = run.invoke(core, req); - Object runs = result.getClass().getMethod("getRunCount").invoke(result); - Object ignores = result.getClass().getMethod("getIgnoreCount").invoke(result); - List failureList = (List)result.getClass().getMethod("getFailures").invoke(result); - - int failures = 0, errors = 0; - Class errorClass = Class.forName("junit.framework.AssertionFailedError", true, testClassLoader); - for (Object f : failureList) { - Object ex = f.getClass().getMethod("getException").invoke(f); - if (errorClass.isInstance(ex)) { - failures++; - } else { - errors++; - } - getLog().error((Throwable)ex); - } - - getLog().info("Test Runs: " + runs - + ", Failures: " - + failures - + ", Errors: " - + errors - + ", Ignores: " - + ignores); - - return failureList.size(); - - } - return 0; - - } - -} diff --git a/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-test/pom.xml b/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-test/pom.xml index 0fb04a3f25..258d86c186 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-test/pom.xml +++ b/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-test/pom.xml @@ -136,14 +136,14 @@ <version>1.6.1-SNAPSHOT</version> <scope>runtime</scope> </dependency> - +<!-- <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-contribution-jee-impl</artifactId> <version>1.6.1-SNAPSHOT</version> <scope>runtime</scope> </dependency> - +--> <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-implementation-ejb</artifactId> |