Sandbox to experiment with different ways to embed the runtime.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990620 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6dea67b43e
commit
e6c733c4d9
5918 changed files with 509213 additions and 0 deletions
44
sandbox/sebastien/java/embed/BUILDING
Normal file
44
sandbox/sebastien/java/embed/BUILDING
Normal file
|
@ -0,0 +1,44 @@
|
|||
Building the Apache Tuscany SCA source distribution
|
||||
===================================================
|
||||
|
||||
Initial Setup
|
||||
-------------
|
||||
|
||||
1) Install J2SE 6.x JDK, which can be downloaded from
|
||||
http://java.sun.com/javase/downloads/index.jsp.
|
||||
|
||||
2) Make sure that your JAVA_HOME environment variable is set to the newly installed
|
||||
JDK location, and that your PATH includes %JAVA_HOME%\bin (windows) or
|
||||
$JAVA_HOME/bin (unix).
|
||||
|
||||
3) Install Maven 2.0.7 or higher (2.2.1 recommended), which can be downloaded from
|
||||
http://maven.apache.org/download.html. Make sure that your PATH includes
|
||||
the MVN_HOME/bin directory.
|
||||
|
||||
4) Make sure that your MAVEN_OPTS environment variable has -Xmx128M (or more),
|
||||
you can manually do this by executing the following in your prompt :
|
||||
Windows users:
|
||||
set MAVEN_OPTS=-Xmx128M
|
||||
Unix users:
|
||||
export MAVEN_OPTS=-Xmx128M
|
||||
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
1) Change to the top level directory of Apache Tuscany source distribution.
|
||||
2) Run
|
||||
|
||||
$> mvn
|
||||
|
||||
This will compile Apache Tuscany and run all of the tests in the source
|
||||
distribution.
|
||||
|
||||
Depending on the load of remote Maven 2.0 repositories, you may have
|
||||
to run "mvn" several times utill the required dependencies are
|
||||
all located in your local maven repository. It usually takes some time for
|
||||
maven to download required dependencies in the first build. Once all the
|
||||
dependencies have been downloaded you may use the -o option to run maven
|
||||
in offline mode, for example, 'mvn clean install -o'.
|
||||
|
||||
|
100
sandbox/sebastien/java/embed/CHANGES
Normal file
100
sandbox/sebastien/java/embed/CHANGES
Normal file
|
@ -0,0 +1,100 @@
|
|||
Changes With Apache Tuscany SCA 2.0-Beta1 June 2010
|
||||
====================================================
|
||||
|
||||
Lots of updates to keep up with recent changes in the OASIS Specifications
|
||||
|
||||
|
||||
Changes With Apache Tuscany SCA 2.0-M5 June 2010
|
||||
====================================================
|
||||
|
||||
Highlights include:
|
||||
- Passes the OASIS conformance test suite for the SCA Assembly, SCA-J CAA and SCA-J CI Specifications!
|
||||
- Passes OSGI remote service SCA config type conformance test suite
|
||||
- New Tuscany specific support for REST/JAXRS
|
||||
- Started improving the layout of the samples to separate contributions from launchers
|
||||
- Further improvements to the distributed SCA domain support
|
||||
- Improved support for the SCAClient in distributed scenarios
|
||||
- Dropped support for JDK 5
|
||||
- Numerous other bug fixes and improvements
|
||||
|
||||
Changes With Apache Tuscany SCA 2.0-M4 November 2009
|
||||
====================================================
|
||||
|
||||
Highlights include:
|
||||
- Passes the OASIS conformance test suite for the SCA-J CAA Specification!
|
||||
- Almost passes the OASIS conformance test suite for the SCA Assembly Specification with
|
||||
a small number of test failures that will be fixed in the next release
|
||||
- Support for <binding.jms> and the OASIS SCA JMS specification
|
||||
- Support for <binding.ejb> on references and partial support of the OASIS SCA EJB specification
|
||||
- A new Tuscany specific binding for JSONP support
|
||||
- Several Tuscany specific extensions ported up from the 1.x runtime including bindings for ATOM,
|
||||
HTTP, JSON-RPC, and implementation web clients, plus new support for JSON-RPC references
|
||||
- Improved distributed SCA domain support
|
||||
- Improve the implementation of OSGi remote services with SCA configuration type that supports dynamic
|
||||
OSGi remote service admin, including import, export and discovery
|
||||
- Add extension points for builders that can build implementation, binding and policy types
|
||||
- Add a Deployer utility to facilitate deployment-related functions
|
||||
- Improve the monitor usage so that monitors are isolated between requests
|
||||
- Numerous other bug fixes and improvements
|
||||
|
||||
|
||||
Changes With Apache Tuscany SCA 2.0-M3 June 2009
|
||||
================================================
|
||||
|
||||
Highlights include:
|
||||
- Support for <implementation.bpel> and the OASIS BPEL specification
|
||||
- Support for <implementation.spring> and the draft OASIS Spring specification
|
||||
- Support for the new SCACleint API as defined in the OASIS spec drafts
|
||||
- Runtime support for SCA contributions in ZIP archives from the OASIS Assembly spec
|
||||
- New Maven archetype to simplify create ZIP contributions
|
||||
- New tuscany:run maven plugin for easy running SCA contributions
|
||||
- Clean up and simplify the Tuscany module structure
|
||||
- Various fixes for Assembly spec compliance and improved error reporting
|
||||
- New deep integration into Apache Tomcat
|
||||
|
||||
|
||||
Changes With Apache Tuscany SCA 2.0-M2 April 2009
|
||||
=================================================
|
||||
|
||||
Highlights include:
|
||||
- OSGi Enhancements including support for <implementation.osgi> and a new OSGi RFC119 prototype
|
||||
- Many updates towards support for OASIS OpenCSA specification and the use OASIS namespaces and schemas
|
||||
- Start to implement the SCA policy framework 1.1 spec draft from OASIS OpenCSA
|
||||
- New Endpoint and EndpoitReference structures
|
||||
- Webapps integration support including <implementation.web> and the web application composite along
|
||||
- with support for various web technologies and frameworks including JSP support, JSF support with
|
||||
- Apache MyFaces, and integration with the Stripes Web Framework
|
||||
- New Maven Archetypes to make developing SCA applications easier,
|
||||
see http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+Maven+Archetypes
|
||||
|
||||
Changes With Apache Tuscany SCA 2.0-M1 February 2009
|
||||
====================================================
|
||||
|
||||
The first milestone release for the 2.0 codebase
|
||||
|
||||
Features and/or Enhancements
|
||||
|
||||
* SCA Specification support
|
||||
- The change over from OSOA SCA specification support to OASIS SCA
|
||||
specification support is now in progress. As such we don't claim to
|
||||
support either the OSOA or OASIS SCA specifications in the
|
||||
2.0 codebase yet.
|
||||
|
||||
* Core
|
||||
- Enable Tuscany to run inside an OSGi runtime
|
||||
- Updated SCA API package names.
|
||||
|
||||
* Other Extensions
|
||||
- Binding RMI
|
||||
- RMI Binding
|
||||
- Binding WS
|
||||
- WebServices Binding
|
||||
|
||||
* Samples/Tutorial/Demos
|
||||
- binding-ws-calculator/
|
||||
- calculator/
|
||||
- calculator-equinox/
|
||||
- calculator-osgi/
|
||||
- calculator-rmi-reference/
|
||||
- calculator-rmi-service/
|
||||
- implementation-java-calculator
|
485
sandbox/sebastien/java/embed/LICENSE
Normal file
485
sandbox/sebastien/java/embed/LICENSE
Normal file
|
@ -0,0 +1,485 @@
|
|||
|
||||
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.
|
||||
|
||||
|
||||
===============================================================================================================
|
||||
|
||||
Apache Tuscany SCA for Java Subcomponents
|
||||
=========================================:
|
||||
|
||||
The Tuscany SCA for Java release includes a number of subcomponents with
|
||||
separate copyright notices and license terms. Your use of the source
|
||||
code for the these subcomponents is subject to the terms and
|
||||
conditions of the following licenses.
|
||||
|
||||
===============================================================================================================
|
||||
|
||||
The module itest/databindings/common includes the test schema; datagraph.xsd, sdoJava.xsd, and sdoModel.xsd
|
||||
under the following license:
|
||||
|
||||
License for the Service Data Objects JavaDoc, Interface Definition files
|
||||
and XSD files.
|
||||
|
||||
The Service Data Objects JavaDoc, Interface Definition files and XSD files
|
||||
are being provided by the copyright holders under the following license.
|
||||
By using and/or copying this work, you agree that you have read,
|
||||
understood and will comply with the following terms and conditions:
|
||||
|
||||
Permission to copy, display, make derivative works of and distribute
|
||||
the Service Data Objects JavaDoc, Interface Definition files and XSD files
|
||||
(the "Artifacts") in any medium without fee or royalty is hereby granted,
|
||||
provided that you include the following on ALL copies of the Artifacts,
|
||||
or portions thereof, that you make:
|
||||
|
||||
1. A link or URL to the Artifacts at this location:
|
||||
http://www.osoa.org/display/Main/Service+Data+Objects+Specifications
|
||||
|
||||
2. The full text of this copyright notice as shown in the Artifacts.
|
||||
|
||||
|
||||
|
||||
THE ARTIFACTS ARE PROVIDED "AS IS" AND THE AUTHORS MAKE NO
|
||||
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THE
|
||||
ARTIFACTS AND THE IMPLEMENTATION OF THEIR CONTENTS,
|
||||
INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR TITLE.
|
||||
|
||||
THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
|
||||
USE OR DISTRIBUTION OF THE ARTIFACTS.
|
||||
|
||||
The name and trademarks of the Authors may NOT be used in any manner,
|
||||
including advertising or publicity pertaining to the Service Data
|
||||
Objects Specification or its contents without specific, written prior
|
||||
permission. Title to copyright in the Service Data Objects
|
||||
Specification will at all times remain with the Authors.
|
||||
|
||||
No other rights are granted by implication, estoppel or otherwise.
|
||||
|
||||
Revision level 1.11, last updated on 2007/12/21
|
||||
|
||||
=================================================================================================================
|
||||
|
||||
The module implementation-script temporarily includes one file under the following BSD license:
|
||||
|
||||
Copyright (c) 2006, Sun Microsystems, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of the Sun Microsystems, Inc. nor the names of
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 THE
|
||||
COPYRIGHT OWNER OR 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.
|
||||
|
||||
=================================================================================================================
|
||||
|
||||
The module assembly-xsd includes XSD files under the following license:
|
||||
|
||||
License for the Service Component Architecture JavaDoc, Interface
|
||||
Definition files and XSD files.
|
||||
|
||||
The Service Component Architecture JavaDoc, Interface Definition files,
|
||||
and XSD files are being provided by the copyright holders under the
|
||||
following license. By using and/or copying this work, you agree that
|
||||
you have read, understood and will comply with the following terms and
|
||||
conditions:
|
||||
|
||||
Permission to copy, display, make derivative works of, and distribute
|
||||
the Service Component Architecture JavaDoc, Interface Definition Files
|
||||
and XSD files (the "Artifacts") in any medium without fee or royalty is
|
||||
hereby granted, provided that you include the following on ALL copies
|
||||
of the Artifacts, or portions thereof, that you make:
|
||||
|
||||
1. A link or URL to the Artifacts at this location:
|
||||
http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications
|
||||
|
||||
2. The full text of this copyright notice as shown in the Artifacts.
|
||||
|
||||
THE ARTIFACTS ARE PROVIDED "AS IS," AND THE AUTHORS MAKE NO
|
||||
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THE
|
||||
ARTIFACTS AND THE IMPLEMENTATION OF THEIR CONTENTS, INCLUDING, BUT NOT
|
||||
LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT OR TITLE.
|
||||
|
||||
THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
|
||||
USE OR DISTRIBUTION OF THE ARTIFACTS.
|
||||
|
||||
The name and trademarks of the Authors may NOT be used in any manner,
|
||||
including advertising or publicity pertaining to the Service Component
|
||||
Architecture Specification or its contents without specific, written
|
||||
prior permission. Title to copyright in the Service Component
|
||||
Architecture Specification and the JavaDoc, Interface Definition Files
|
||||
and XSD Files will at all times remain with the Authors.
|
||||
|
||||
No other rights are granted by implication, estoppel or otherwise.
|
||||
|
||||
Revision level 1.1, last updated on 2007/11/19
|
||||
|
||||
=================================================================================================================
|
||||
|
||||
The modules assembly-xsd and definitions-xml includes XSD and XML files under the following license:
|
||||
|
||||
Copyright OASIS 2005, 2009. All Rights Reserved.
|
||||
All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual
|
||||
Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.
|
||||
This document and translations of it may be copied and furnished to others, and derivative works that
|
||||
comment on or otherwise explain it or assist in its implementation may be prepared, copied, published,
|
||||
and distributed, in whole or in part, without restriction of any kind, provided that the above copyright
|
||||
notice and this section are included on all such copies and derivative works. However, this document
|
||||
itself may not be modified in any way, including by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing any document or deliverable produced by an OASIS
|
||||
Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR
|
||||
Policy, must be followed) or as required to translate it into languages other than English.
|
||||
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors
|
||||
or assigns.
|
||||
This document and the information contained herein is provided on an "AS IS" basis and OASIS
|
||||
DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP
|
||||
RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
OASIS requests that any OASIS Party or any other party that believes it has patent claims that would
|
||||
necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard,
|
||||
to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to
|
||||
such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that
|
||||
produced this specification.
|
||||
OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of
|
||||
any patent claims that would necessarily be infringed by implementations of this specification by a patent
|
||||
holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR
|
||||
Mode of the OASIS Technical Committee that produced this specification. OASIS may include such
|
||||
claims on its website, but disclaims any obligation to do so.
|
||||
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that
|
||||
might be claimed to pertain to the implementation or use of the technology described in this document or
|
||||
the extent to which any license under such rights might or might not be available; neither does it represent
|
||||
that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to
|
||||
rights in any document or deliverable produced by an OASIS Technical Committee can be found on the
|
||||
OASIS website. Copies of claims of rights made available for publication and any assurances of licenses
|
||||
to be made available, or the result of an attempt made to obtain a general license or permission for the use
|
||||
of such proprietary rights by implementers or users of this OASIS Committee Specification or OASIS
|
||||
Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any
|
||||
information or list of intellectual property rights will at any time be complete, or that any claims in such list
|
||||
are, in fact, Essential Claims.
|
||||
The names "OASIS", are trademarks of OASIS, the owner and developer of this specification, and should
|
||||
be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and
|
||||
implementation and use of, specifications, while reserving the right to enforce its marks against misleading
|
||||
uses. Please see http://www.oasis-open.org/who/trademark.php for above guidance.
|
||||
|
||||
=================================================================================================================
|
||||
|
||||
The module assembly-xsd includes XSD files under the following license:
|
||||
|
||||
http://www.w3.org/Consortium/Legal/copyright-software-19980720
|
||||
|
||||
W3C® SOFTWARE NOTICE AND LICENSE
|
||||
Copyright (c) 1994-2002 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche
|
||||
en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
|
||||
|
||||
This W3C work (including software, documents, or other related items) is being provided by the copyright holders under
|
||||
the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood,
|
||||
and will comply with the following terms and conditions:
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,
|
||||
for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies
|
||||
of the software and documentation or portions thereof, including modifications, that you make:
|
||||
|
||||
1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
|
||||
2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short
|
||||
notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed
|
||||
or derivative code: "Copyright (c) [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology,
|
||||
Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
|
||||
3. Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs
|
||||
to the location from which the code is derived.)
|
||||
|
||||
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE
|
||||
OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
|
||||
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE
|
||||
OF THE SOFTWARE OR DOCUMENTATION.
|
||||
|
||||
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software
|
||||
without specific, written prior permission. Title to copyright in this software and any associated documentation will
|
||||
at all times remain with copyright holders.
|
||||
|
||||
=================================================================================================================
|
||||
|
||||
The module assembly-xsd includes XSD files under the following license:
|
||||
|
||||
The modules
|
||||
|
||||
binding-ws-xml
|
||||
databinding
|
||||
databinding-axiom
|
||||
databinding-jaxb
|
||||
databinding-json
|
||||
databinding-sdo
|
||||
databinding-sdo-axiom
|
||||
databinding-xmlbeans
|
||||
interface-wsdl-xml
|
||||
|
||||
Include the ipo.xsd and address.xsd information from the XML Schema Primer
|
||||
(http://www.w3.org/TR/2004/PER-xmlschema-0-20040318/) combined into the
|
||||
file ipo.xsd and extended with UK postcode structures.
|
||||
|
||||
The ipo.xsd file is also included under the following license:
|
||||
|
||||
W3C(c) SOFTWARE NOTICE AND LICENSE
|
||||
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
||||
|
||||
This work (and included software, documentation such as READMEs, or other
|
||||
related items) is being provided by the copyright holders under the following
|
||||
license. By obtaining, using and/or copying this work, you (the licensee) agree
|
||||
that you have read, understood, and will comply with the following terms and conditions.
|
||||
|
||||
Permission to copy, modify, and distribute this software and its documentation,
|
||||
with or without modification, for any purpose and without fee or royalty is
|
||||
hereby granted, provided that you include the following on ALL copies of the
|
||||
software and documentation or portions thereof, including modifications:
|
||||
|
||||
1. The full text of this NOTICE in a location viewable to users of the
|
||||
redistributed or derivative work.
|
||||
2. Any pre-existing intellectual property disclaimers, notices, or terms
|
||||
and conditions. If none exist, the W3C Software Short Notice should be
|
||||
included (hypertext is preferred, text is permitted) within the body of
|
||||
any redistributed or derivative code.
|
||||
3. Notice of any changes or modifications to the files, including the date
|
||||
changes were made. (We recommend you provide URIs to the location from which
|
||||
the code is derived.)
|
||||
|
||||
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
|
||||
NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
|
||||
USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
|
||||
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
|
||||
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
|
||||
|
||||
The name and trademarks of copyright holders may NOT be used in advertising or
|
||||
publicity pertaining to the software without specific, written prior permission.
|
||||
Title to copyright in this software and any associated documentation will at all
|
||||
times remain with copyright holders.
|
5
sandbox/sebastien/java/embed/NOTICE
Normal file
5
sandbox/sebastien/java/embed/NOTICE
Normal file
|
@ -0,0 +1,5 @@
|
|||
Apache Tuscany
|
||||
Copyright (c) 2005 - 2010 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
21
sandbox/sebastien/java/embed/README
Normal file
21
sandbox/sebastien/java/embed/README
Normal file
|
@ -0,0 +1,21 @@
|
|||
Apache Tuscany SCA README
|
||||
=========================
|
||||
|
||||
Welcome to this Tuscany SCA release.
|
||||
|
||||
See the RELEASE_NOTES file for information specific to this release.
|
||||
|
||||
In the binary release see the INSTALL file for information on how to
|
||||
install the release.
|
||||
|
||||
In the source distribution see the BUILDING file for information on
|
||||
building the source code.
|
||||
|
||||
Please note that milestone releases may support experimental
|
||||
features and APIs that may not exist in future releases.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
84
sandbox/sebastien/java/embed/RELEASE_NOTES
Normal file
84
sandbox/sebastien/java/embed/RELEASE_NOTES
Normal file
|
@ -0,0 +1,84 @@
|
|||
Apache Tuscany SCA 2.0-Beta1 June 2010 Release Notes
|
||||
=====================================================
|
||||
|
||||
Apache Tuscany provides a runtime based on the Service Component
|
||||
Architecture. SCA is a set of specifications aimed at simplifying SOA
|
||||
Application Development which are being standardized at OASIS as part
|
||||
of Open Composite Services Architecture (Open CSA) - http://www.oasis-opencsa.org/.
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The Apache Tuscany SCA 2.0-Beta1 release includes implementations of the
|
||||
main SCA specifications and recent updates from Open CSA drafts including:
|
||||
|
||||
SCA Assembly Model V1.1
|
||||
SCA Policy Framework V1.1
|
||||
SCA Java Common Annotations and APIs V1.1
|
||||
SCA Java Component Implementation V1.1
|
||||
SCA Client & Implementation: Spring V1.1
|
||||
SCA Web Services Binding V1.1
|
||||
SCA WS-BPEL Client and Implementation V1.1
|
||||
(portions of) SCA JEE Integration V1.1
|
||||
|
||||
It also includes implementations of many features not yet defined
|
||||
by SCA specifications, including:
|
||||
|
||||
- SCA bindings for RMI, HTTP, JSON-RPC, ATOM.
|
||||
- Databindings for JAXB, Axis2's AXIOM, DOM, SAX and StAX
|
||||
- Integration with various web frameworks
|
||||
|
||||
The Tuscany SCA Runtime can be configured as a single node SCA domain or
|
||||
as an SCA domain distributed across multiple nodes.
|
||||
In addition Tuscany SCA supports the following host-deployment options: -
|
||||
- running standalone
|
||||
- running in a OSGi enabled runtime Environment (Equinox)
|
||||
- running with distributed nodes across multiple JVMs
|
||||
|
||||
See the CHANGES file for a detailed list of the features in this release.
|
||||
|
||||
Known Issues
|
||||
------------
|
||||
|
||||
If when building using the source distribution of tuscany you see build errors
|
||||
relating to use of hazelcast, this is a known issue which occurs in some
|
||||
environments where our use of hazelcast doesn't match up with your network
|
||||
configuration. If you see these errors please contact us on the mailing list
|
||||
as described below. You may wish to build using the
|
||||
"mvn -fae"
|
||||
command, so that the rest of the build completes before it reports the issue.
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
For more information on Apache Tuscany visit the website at:
|
||||
|
||||
http://tuscany.apache.org/tuscany/
|
||||
|
||||
Any issues with this release can be reported to Apache Tuscany
|
||||
using the mailing lists or in the JIRA issue tracker.
|
||||
|
||||
Mailing list archives:
|
||||
|
||||
http://mail-archives.apache.org/mod_mbox/tuscany-user/
|
||||
http://mail-archives.apache.org/mod_mbox/tuscany-dev/
|
||||
|
||||
Jira:
|
||||
|
||||
http://issues.apache.org/jira/browse/TUSCANY
|
||||
|
||||
To join the project's mailing lists follow the instructions at:
|
||||
|
||||
http://incubator.apache.org/tuscany/mailing-lists.html
|
||||
|
||||
To find out more about OASIS Open CSA go to:
|
||||
|
||||
http://www.oasis-opencsa.org.
|
||||
|
||||
Apache Tuscany welcomes your help. Any contribution, including code,
|
||||
testing, improving the documentation, or bug reporting is always
|
||||
appreciated.
|
||||
|
||||
Thank you for using Apache Tuscany!
|
||||
|
||||
- The Tuscany Team.
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Name: Apache Tuscany SCA Contribution JAR
|
||||
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
|
||||
Bundle-Vendor: The Apache Software Foundation
|
||||
Bundle-Version: 2.0.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Bundle-Description: Apache Tuscany SCA Quickstart Archetype
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.jar
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-contribution-jar</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create an SCA JAR contribution project</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>tuscany-contribution-jar</id>
|
||||
<sources>
|
||||
<source>src/main/java/HelloworldImpl.java</source>
|
||||
<source>src/main/java/HelloworldService.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource>src/main/hello.composite</resource>
|
||||
<resource>src/main/webapp/META-INF/sca-contribution.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${version}</version>
|
||||
#literal()<!-- TODO project name -->
|
||||
<name>quickstart</name>
|
||||
<description></description>
|
||||
|
||||
<dependencies>
|
||||
<!-- TUSCANY DEPENDENCIES -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JUNIT DEPENDENCY FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.tuscany.maven.plugins</groupId>
|
||||
<artifactId>maven-tuscany-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
</properties>
|
||||
#end
|
||||
</project>
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
import org.oasisopen.sca.annotation.Init;
|
||||
import org.oasisopen.sca.annotation.Scope;
|
||||
import org.oasisopen.sca.annotation.EagerInit;
|
||||
|
||||
@Scope("COMPOSITE") @EagerInit
|
||||
public class HelloworldImpl implements HelloworldService {
|
||||
|
||||
public String sayHello(String name) {
|
||||
return "Hello " + name;
|
||||
}
|
||||
|
||||
@Init
|
||||
public void init() {
|
||||
System.out.println(sayHello("world"));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
import org.oasisopen.sca.annotation.Remotable;
|
||||
|
||||
@Remotable
|
||||
public interface HelloworldService {
|
||||
|
||||
String sayHello(String name);
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:sample="http://${package}">
|
||||
<deployable composite="sample:${artifactId}"/>
|
||||
</contribution>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="HelloworldComponent">
|
||||
<implementation.java class="${package}.HelloworldImpl"/>
|
||||
</component>
|
||||
|
||||
</composite>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-zip-contribution-descriptor</artifactId>
|
||||
<name>Tuscany SCA ZIP contribution Shared Assembly Descriptor</name>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<assembly>
|
||||
<id>zip-contribution</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<unpack>false</unpack>
|
||||
<scope>runtime</scope>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.build.outputDirectory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Name: Apache Tuscany SCA Contribution ZIP
|
||||
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
|
||||
Bundle-Vendor: The Apache Software Foundation
|
||||
Bundle-Version: 2.0.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Bundle-Description: Apache Tuscany SCA ZIP Contribution Archetype
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.zip
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-contribution-zip</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create an SCA ZIP contribution project</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>tuscany-contribution-zip</id>
|
||||
<sources>
|
||||
<source>src/main/java/AddImpl.java</source>
|
||||
<source>src/main/java/AddService.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource>src/main/resources/add.composite</resource>
|
||||
<resource>src/main/resources/META-INF/sca-contribution.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${version}</version>
|
||||
#literal() <!-- TODO project name -->
|
||||
<name>quickstart</name>
|
||||
<description></description>
|
||||
|
||||
<dependencies>
|
||||
<!-- TUSCANY DEPENDENCIES -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
AN EXAMPLE APPLICATION DEPENDENCY TO BE INCLUDED IN ZIP
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<!-- AN EXAMPLE APPLICATION DEPENDENCY TO BE INCLUDED IN ZIP -->
|
||||
<dependency>
|
||||
<groupId>commons-math</groupId>
|
||||
<artifactId>commons-math</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JUNIT DEPENDENCY FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2-beta-3</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-zip-contribution-descriptor</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<!-- This is where we use our shared assembly descriptor -->
|
||||
<descriptors>
|
||||
<descriptor>tuscany-zip-contribution.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.tuscany.maven.plugins</groupId>
|
||||
<artifactId>maven-tuscany-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
</properties>
|
||||
#end
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
import org.apache.commons.math.util.MathUtils;
|
||||
|
||||
import org.oasisopen.sca.annotation.Init;
|
||||
import org.oasisopen.sca.annotation.Scope;
|
||||
import org.oasisopen.sca.annotation.EagerInit;
|
||||
|
||||
@Scope("COMPOSITE") @EagerInit
|
||||
public class AddImpl implements AddService {
|
||||
|
||||
public int add(int x, int y) {
|
||||
return MathUtils.addAndCheck(x, y);
|
||||
}
|
||||
|
||||
@Init
|
||||
public void init() {
|
||||
System.out.println("1 + 2 = " + add(1, 2));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
public interface AddService {
|
||||
|
||||
int add(int x, int y);
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:sample="http://${package}">
|
||||
<deployable composite="sample:${artifactId}"/>
|
||||
</contribution>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="AddComponent">
|
||||
<implementation.java class="${package}.AddImpl"/>
|
||||
</component>
|
||||
|
||||
</composite>
|
51
sandbox/sebastien/java/embed/archetypes/pom.xml
Normal file
51
sandbox/sebastien/java/embed/archetypes/pom.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>tuscany-archetype</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Apache Tuscany SCA Maven Archetypes</name>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>default</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
|
||||
<modules>
|
||||
<module>contribution-jar</module>
|
||||
<module>contribution-zip</module>
|
||||
<module>contribution-zip-discriptor</module>
|
||||
<module>quickstart</module>
|
||||
<module>quickstart-jsf</module>
|
||||
<module>quickstart-stripes</module>
|
||||
<module>quickstart-bpel</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Name: Apache Tuscany SCA Quickstart Archetype
|
||||
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
|
||||
Bundle-Vendor: The Apache Software Foundation
|
||||
Bundle-Version: 2.0.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Bundle-Description: Apache Tuscany SCA Quickstart Archetype
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-quickstart-bpel</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create an SCA Webapp project using BPEL</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>tuscany-quickstart</id>
|
||||
<sources>
|
||||
<source>src/main/java/HelloworldImpl.java</source>
|
||||
<source>src/main/java/HelloworldService.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<source>src/main/resources/helloworld.bpel</source>
|
||||
<source>src/main/resources/helloworld.wsdl</source>
|
||||
<resource>src/main/webapp/hello.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.composite</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,182 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${version}</version>
|
||||
#literal()<!-- TODO project name -->
|
||||
<name>quickstart</name>
|
||||
<description></description>
|
||||
|
||||
<dependencies>
|
||||
<!-- TUSCANY DEPENDENCIES -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-implementation-web-runtime</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-implementation-bpel-runtime</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JUNIT DEPENDENCY FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JETTY DEPENDENCIES FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-management</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.ode</groupId>
|
||||
<artifactId>ode-dao-jpa-ojpa-derby</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>zip</type>
|
||||
<overWrite>false</overWrite>
|
||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||
<includes>**/*</includes>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<!-- this property is needed to avoid a problem in openjpa -->
|
||||
<name>openjpa.QueryCompilationCache</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<!-- need to override the src dir so src/main/resources are also included -->
|
||||
<webAppSourceDirectory>${basedir}/src/main</webAppSourceDirectory>
|
||||
<webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
<jetty.version>6.1.18</jetty.version>
|
||||
</properties>
|
||||
#end
|
||||
</project>
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
import org.oasisopen.sca.annotation.Remotable;
|
||||
|
||||
@Remotable
|
||||
public interface HelloworldService {
|
||||
|
||||
String hello(String name);
|
||||
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<process name="HelloWorld"
|
||||
targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld"
|
||||
xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
|
||||
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
|
||||
xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
|
||||
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
|
||||
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
|
||||
|
||||
<import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
|
||||
namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/>
|
||||
|
||||
<partnerLinks>
|
||||
<partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" />
|
||||
</partnerLinks>
|
||||
|
||||
<variables>
|
||||
<variable name="myVar" messageType="test:HelloMessage"/>
|
||||
<variable name="tmpVar" type="xsd:string"/>
|
||||
</variables>
|
||||
|
||||
<sequence>
|
||||
<receive
|
||||
name="start"
|
||||
partnerLink="helloPartnerLink"
|
||||
portType="test:HelloPortType"
|
||||
operation="hello"
|
||||
variable="myVar"
|
||||
createInstance="yes"/>
|
||||
|
||||
<assign name="assign1">
|
||||
<copy>
|
||||
<from variable="myVar" part="TestPart"/>
|
||||
<to variable="tmpVar"/>
|
||||
</copy>
|
||||
<copy>
|
||||
<from>concat($tmpVar,' World')</from>
|
||||
<to variable="myVar" part="TestPart"/>
|
||||
</copy>
|
||||
</assign>
|
||||
<reply name="end"
|
||||
partnerLink="helloPartnerLink"
|
||||
portType="test:HelloPortType"
|
||||
operation="hello"
|
||||
variable="myVar"/>
|
||||
</sequence>
|
||||
</process>
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT 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://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
|
||||
xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
|
||||
|
||||
<wsdl:types>
|
||||
<schema elementFormDefault="qualified"
|
||||
targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<element name="hello">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="message" type="xsd:string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
|
||||
<wsdl:message name="HelloMessage">
|
||||
<wsdl:part element="tns:hello" name="TestPart"/>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="HelloPortType">
|
||||
<wsdl:operation name="hello">
|
||||
<wsdl:input message="tns:HelloMessage" name="TestIn"/>
|
||||
<wsdl:output message="tns:HelloMessage" name="TestOut"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
|
||||
<wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
|
||||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="hello">
|
||||
<wsdlsoap:operation soapAction=""/>
|
||||
<wsdl:input name="TestIn">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="TestOut">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
|
||||
<wsdl:service name="HelloService">
|
||||
<wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
|
||||
<soap:address location="http://localhost:8085/ode/processes/helloWorld"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
|
||||
<plnk:partnerLinkType name="HelloPartnerLinkType">
|
||||
<plnk:role name="me" portType="tns:HelloPortType"/>
|
||||
<plnk:role name="you" portType="tns:HelloPortType"/>
|
||||
</plnk:partnerLinkType>
|
||||
</wsdl:definitions>
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="WebComponent">
|
||||
<implementation.web web-uri=""/>
|
||||
<reference name="service" target="HelloworldComponent">
|
||||
<interface.java interface="${package}.HelloworldService"/>
|
||||
</reference>
|
||||
</component>
|
||||
|
||||
<component name="HelloworldComponent">
|
||||
<implementation.bpel process="hns:HelloWorld"/>
|
||||
</component>
|
||||
|
||||
</composite>
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<web-app version="2.4"
|
||||
xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
|
||||
|
||||
<display-name>${artifactId}</display-name>
|
||||
|
||||
<filter>
|
||||
<filter-name>tuscany.${artifactId}</filter-name>
|
||||
<filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>tuscany.${artifactId}</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<welcome-file-list id="WelcomeFileList">
|
||||
<welcome-file>hello.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
|
@ -0,0 +1,36 @@
|
|||
<%--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
|
||||
|
||||
<sca:reference name="service" type="${package}.HelloworldService" />
|
||||
|
||||
<html>
|
||||
<body >
|
||||
|
||||
<h2>${artifactId}</h2>
|
||||
|
||||
Calling HelloworldService sayHello("world") returns:
|
||||
|
||||
<p>
|
||||
|
||||
<%= service.hello("world") %>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-quickstart-jsf</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create a Tuscany SCA and JSF project</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.html</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>quickstart-stripes</id>
|
||||
<sources>
|
||||
<source>src/main/java/sample/stripes/action/BaseActionBean.java</source>
|
||||
<source>src/main/java/sample/stripes/action/HomeActionBean.java</source>
|
||||
<source>src/main/java/sample/sca/HelloworldService.java</source>
|
||||
<source>src/main/java/sample/sca/HelloworldServiceImpl.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource>src/main/resources/log4j.properties</resource>
|
||||
<resource>src/main/resources/StripesResources.properties</resource>
|
||||
<resource>src/main/webapp/index.html</resource>
|
||||
<resource>src/main/webapp/WEB-INF/jsp/home.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/jsp/layout.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/jsp/taglibs.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.composite</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,154 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${version}</version>
|
||||
#literal()<!-- TODO project name -->
|
||||
<name>quickstart-jsf</name>
|
||||
<description></description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Tuscany dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-myfaces</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MyFaces JSF dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.myfaces.core</groupId>
|
||||
<artifactId>myfaces-api</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.myfaces.core</groupId>
|
||||
<artifactId>myfaces-impl</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.myfaces.tomahawk</groupId>
|
||||
<artifactId>tomahawk</artifactId>
|
||||
<version>1.1.6</version>
|
||||
<scope>runtime</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jstl</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
<myfaces.version>1.5</myfaces.version>
|
||||
<jetty.version>6.1.4</jetty.version>
|
||||
</properties>
|
||||
#end
|
||||
|
||||
</project>
|
|
@ -0,0 +1,64 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.myfaces;
|
||||
|
||||
import org.oasisopen.sca.annotation.Reference;
|
||||
|
||||
import ${package}.sca.HelloworldService;
|
||||
|
||||
/**
|
||||
* A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
|
||||
*
|
||||
*/
|
||||
public class HelloWorldController {
|
||||
|
||||
//properties
|
||||
private String name;
|
||||
|
||||
@Reference
|
||||
private HelloworldService service;
|
||||
|
||||
/**
|
||||
* default empty constructor
|
||||
*/
|
||||
public HelloWorldController(){
|
||||
}
|
||||
|
||||
//-------------------getter & setter
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that is backed to a submit button of a form.
|
||||
*/
|
||||
public String send(){
|
||||
|
||||
// invoke the SCA reference
|
||||
name = service.sayHello(name);
|
||||
|
||||
return "success";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.sca;
|
||||
|
||||
public interface HelloworldService {
|
||||
|
||||
String sayHello(String name);
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.sca;
|
||||
|
||||
public class HelloworldServiceImpl implements HelloworldService {
|
||||
|
||||
public String sayHello(String name) {
|
||||
return "Hello " + name;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<faces-config version="1.2"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
|
||||
|
||||
<!-- managed beans of the simple hello world app -->
|
||||
<managed-bean>
|
||||
<managed-bean-name>helloWorld</managed-bean-name>
|
||||
<managed-bean-class>${package}.myfaces.HelloWorldController</managed-bean-class>
|
||||
<managed-bean-scope>request</managed-bean-scope>
|
||||
</managed-bean>
|
||||
|
||||
<!-- navigation rules for helloWorld.jsp -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/helloWorld.jsp</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>success</from-outcome>
|
||||
<to-view-id>/page2.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rules for page2.jsp -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/page2.jsp</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>back</from-outcome>
|
||||
<to-view-id>/helloWorld.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
</faces-config>
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="${artifactId}WebComponent">
|
||||
<implementation.web web-uri=""/>
|
||||
<reference name="service" target="HelloworldComponent"/>
|
||||
</component>
|
||||
|
||||
<component name="HelloworldComponent">
|
||||
<implementation.java class="${package}.sca.HelloworldServiceImpl"/>
|
||||
</component>
|
||||
|
||||
</composite>
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT 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://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||
version="2.4">
|
||||
|
||||
<display-name>${artifactId}</display-name>
|
||||
|
||||
<!-- The only web.xml change to the MyFaces Helloworld sample is to add
|
||||
the Tuscany listener and annotation processor context parameter -->
|
||||
<listener>
|
||||
<listener-class>org.apache.tuscany.sca.host.webapp.TuscanyContextListener</listener-class>
|
||||
</listener>
|
||||
<context-param>
|
||||
<param-name>org.apache.myfaces.config.annotation.LifecycleProvider</param-name>
|
||||
<param-value>org.apache.tuscany.sca.myfaces.TuscanyAnnotationLifecycleProvider</param-value>
|
||||
</context-param>
|
||||
|
||||
<!--optional: context-param>
|
||||
<description>Comma separated list of URIs of (additional) faces config files.
|
||||
(e.g. /WEB-INF/my-config.xml)
|
||||
See JSF 1.0 PRD2, 10.3.2
|
||||
Attention: You do not need to put /WEB-INF/faces-config.xml in here.
|
||||
</description>
|
||||
<param-name>javax.faces.CONFIG_FILES</param-name>
|
||||
<param-value>/WEB-INF/examples-config.xml</param-value>
|
||||
</context-param-->
|
||||
<context-param>
|
||||
<description>State saving method: "client" or "server" (= default)
|
||||
See JSF Specification 2.5.3</description>
|
||||
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
|
||||
<param-value>client</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<description>Only applicable if state saving method is "server" (= default).
|
||||
Defines the amount (default = 20) of the latest views are stored in session.</description>
|
||||
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
|
||||
<param-value>20</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<description>Only applicable if state saving method is "server" (= default).
|
||||
If true (default) the state will be serialized to a byte stream before it
|
||||
is written to the session.
|
||||
If false the state will not be serialized to a byte stream.</description>
|
||||
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<description>Only applicable if state saving method is "server" (= default) and if
|
||||
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default)
|
||||
If true (default) the serialized state will be compressed before it
|
||||
is written to the session. If false the state will not be compressed.</description>
|
||||
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<description>This parameter tells MyFaces if javascript code should be allowed in the
|
||||
rendered HTML output.
|
||||
If javascript is allowed, command_link anchors will have javascript code
|
||||
that submits the corresponding form.
|
||||
If javascript is not allowed, the state saving info and nested parameters
|
||||
will be added as url parameters.
|
||||
Default: "true"</description>
|
||||
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
|
||||
<param-value>false</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<description>If true, rendered HTML code will be formatted, so that it is "human readable".
|
||||
i.e. additional line separators and whitespace will be written, that do not
|
||||
influence the HTML code.
|
||||
Default: "true"</description>
|
||||
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<description>If true, a javascript function will be rendered that is able to restore the
|
||||
former vertical scroll on every request. Convenient feature if you have pages
|
||||
with long lists and you do not want the browser page to always jump to the top
|
||||
if you trigger a link or button action that stays on the same page.
|
||||
Default: "false"</description>
|
||||
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>Used for encrypting view state. Only relevant for client side
|
||||
state saving. See MyFaces wiki/web site documentation for instructions
|
||||
on how to configure an application for diffenent encryption strengths.
|
||||
</description>
|
||||
<param-name>org.apache.myfaces.SECRET</param-name>
|
||||
<param-value>NzY1NDMyMTA=</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
Validate managed beans, navigation rules and ensure that forms are not nested.
|
||||
</description>
|
||||
<param-name>org.apache.myfaces.VALIDATE</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
Treat readonly same as if disabled attribute was set for select elements.
|
||||
</description>
|
||||
<param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
Use the defined class as the class which will be called when a resource is added to the
|
||||
ExtensionFilter handling. Using StreamingAddResource here helps with performance. If you want to add
|
||||
custom components and want to use the ExtensionFilter, you need to provide your custom implementation here.
|
||||
</description>
|
||||
<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
|
||||
<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
Virtual path in the URL which triggers loading of resources for the MyFaces extended components
|
||||
in the ExtensionFilter.
|
||||
</description>
|
||||
<param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
|
||||
<param-value>/faces/myFacesExtensionResource</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
Check if the extensions-filter has been properly configured.
|
||||
</description>
|
||||
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
Define partial state saving as true/false.
|
||||
</description>
|
||||
<param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
|
||||
<param-value>false</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Extensions Filter -->
|
||||
<filter>
|
||||
<filter-name>extensionsFilter</filter-name>
|
||||
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
|
||||
<init-param>
|
||||
<description>Set the size limit for uploaded files.
|
||||
Format: 10 - 10 bytes
|
||||
10k - 10 KB
|
||||
10m - 10 MB
|
||||
1g - 1 GB</description>
|
||||
<param-name>uploadMaxFileSize</param-name>
|
||||
<param-value>100m</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<description>Set the threshold size - files
|
||||
below this limit are stored in memory, files above
|
||||
this limit are stored on disk.
|
||||
|
||||
Format: 10 - 10 bytes
|
||||
10k - 10 KB
|
||||
10m - 10 MB
|
||||
1g - 1 GB</description>
|
||||
<param-name>uploadThresholdSize</param-name>
|
||||
<param-value>100k</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>extensionsFilter</filter-name>
|
||||
<url-pattern>*.jsf</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter-mapping>
|
||||
<filter-name>extensionsFilter</filter-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- Listener, to allow Jetty serving MyFaces apps -->
|
||||
<listener>
|
||||
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Faces Servlet -->
|
||||
<servlet>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<!-- Faces Servlet Mapping -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.jsf</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Welcome files -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
|
@ -0,0 +1,37 @@
|
|||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello World</title>
|
||||
</head>
|
||||
<body>
|
||||
<f:view>
|
||||
<h:form id="mainForm">
|
||||
<h:panelGrid columns="2">
|
||||
<h:outputLabel for="name" value="Please enter your name" />
|
||||
<h:inputText id="name" value="#{helloWorld.name}" required="true"/>
|
||||
<h:commandButton value="Press me" action="#{helloWorld.send}"/>
|
||||
<h:messages showDetail="true" showSummary="false"/>
|
||||
</h:panelGrid>
|
||||
</h:form>
|
||||
</f:view>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT 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 session="false"%>
|
||||
<%
|
||||
response.sendRedirect("helloWorld.jsf");
|
||||
%>
|
|
@ -0,0 +1,35 @@
|
|||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello World</title>
|
||||
</head>
|
||||
<body>
|
||||
<f:view>
|
||||
<h:form id="mainForm">
|
||||
<h2><h:outputText value="#{helloWorld.name}. We hope you enjoy SCA and JSF with Apache Tuscany and MyFaces"/></h2>
|
||||
<h:commandLink action="back">
|
||||
<h:outputText value="Home"/>
|
||||
</h:commandLink>
|
||||
</h:form>
|
||||
</f:view>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Name: Apache Tuscany SCA Quickstart Archetype
|
||||
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
|
||||
Bundle-Vendor: The Apache Software Foundation
|
||||
Bundle-Version: 2.0.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Bundle-Description: Apache Tuscany SCA Quickstart Archetype
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-quickstart-jsonp</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create a Tuscany SCA webapp project using the JSONP binding</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<requiredProperties>
|
||||
<requiredProperty key="includeTuscanyRuntime">
|
||||
<defaultValue>Y</defaultValue>
|
||||
</requiredProperty>
|
||||
</requiredProperties>
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>tuscany-quickstart</id>
|
||||
<sources>
|
||||
<source>src/main/java/HelloworldImpl.java</source>
|
||||
<source>src/main/java/HelloworldService.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource>src/main/webapp/hello.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.composite</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,154 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${version}</version>
|
||||
<name>quickstart-jsonp</name>
|
||||
|
||||
<dependencies>
|
||||
<!-- TUSCANY DEPENDENCIES -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
#if(${includeTuscanyRuntime} == "Y")
|
||||
<scope>compile</scope>
|
||||
#else
|
||||
<scope>provided</scope>
|
||||
#end
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-implementation-web-runtime</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
#if( $includeTuscanyRuntime == "Y")
|
||||
<scope>runtime</scope>
|
||||
#else
|
||||
<scope>provided</scope>
|
||||
#end
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-binding-jsonp-runtime</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
#if( $includeTuscanyRuntime == "Y")
|
||||
<scope>runtime</scope>
|
||||
#else
|
||||
<scope>provided</scope>
|
||||
#end
|
||||
</dependency>
|
||||
|
||||
<!-- JUNIT DEPENDENCY FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JETTY DEPENDENCIES FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-management</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
<jetty.version>6.1.18</jetty.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
public class HelloworldImpl implements HelloworldService {
|
||||
|
||||
public String sayHello(String name) {
|
||||
return "Hello " + name;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
import org.oasisopen.sca.annotation.Remotable;
|
||||
|
||||
@Remotable
|
||||
public interface HelloworldService {
|
||||
|
||||
String sayHello(String name);
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="HelloworldComponent">
|
||||
<implementation.java class="${package}.HelloworldImpl"/>
|
||||
<service name="HelloworldService">
|
||||
<tuscany:binding.jsonp/>
|
||||
</service>
|
||||
</component>
|
||||
|
||||
</composite>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<web-app version="2.4"
|
||||
xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
|
||||
|
||||
<display-name>${artifactId}</display-name>
|
||||
|
||||
#if($includeTuscanyRuntime == "Y")
|
||||
<filter>
|
||||
<filter-name>tuscany.${artifactId}</filter-name>
|
||||
<filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>tuscany.${artifactId}</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
#end
|
||||
<welcome-file-list id="WelcomeFileList">
|
||||
<welcome-file>hello.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
|
@ -0,0 +1,36 @@
|
|||
<%--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
|
||||
|
||||
<sca:reference name="service" type="${package}.HelloworldService" />
|
||||
|
||||
<html>
|
||||
<body >
|
||||
|
||||
<h2>${artifactId}</h2>
|
||||
|
||||
Calling HelloworldService sayHello("world") returns:
|
||||
|
||||
<p>
|
||||
|
||||
<%= service.sayHello("world") %>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Name: Apache Tuscany SCA Quickstart Stripes Archetype
|
||||
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
|
||||
Bundle-Vendor: The Apache Software Foundation
|
||||
Bundle-Version: 2.0.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Bundle-Description: Apache Tuscany SCA Quickstart Stripes Archetype
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart.stripes
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-quickstart-stripes</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create a simple Apache Tuscany SCA webapp project using the Stripes Web Framework</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.html</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>quickstart-stripes</id>
|
||||
<sources>
|
||||
<source>src/main/java/sample/stripes/action/BaseActionBean.java</source>
|
||||
<source>src/main/java/sample/stripes/action/HomeActionBean.java</source>
|
||||
<source>src/main/java/sample/sca/HelloworldService.java</source>
|
||||
<source>src/main/java/sample/sca/HelloworldServiceImpl.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource>src/main/resources/log4j.properties</resource>
|
||||
<resource>src/main/resources/StripesResources.properties</resource>
|
||||
<resource>src/main/webapp/index.html</resource>
|
||||
<resource>src/main/webapp/WEB-INF/jsp/home.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/jsp/layout.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/jsp/taglibs.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.composite</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${version}</version>
|
||||
#literal()<!-- TODO project name -->
|
||||
<name>quickstart-stripes</name>
|
||||
<description></description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Tuscany dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-stripes</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Stripes Framework dependencies -->
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.stripes</groupId>
|
||||
<artifactId>stripes</artifactId>
|
||||
<version>${stripes.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>taglibs</groupId>
|
||||
<artifactId>standard</artifactId>
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
<stripes.version>1.5.2</stripes.version>
|
||||
<jetty.version>6.1.4</jetty.version>
|
||||
</properties>
|
||||
#end
|
||||
|
||||
</project>
|
|
@ -0,0 +1,28 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.sca;
|
||||
|
||||
public interface HelloworldService {
|
||||
|
||||
String sayHello(String name);
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.sca;
|
||||
|
||||
|
||||
public class HelloworldServiceImpl implements HelloworldService {
|
||||
|
||||
public String sayHello(String name) {
|
||||
return "Hello " + name;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.stripes.action;
|
||||
|
||||
import net.sourceforge.stripes.action.ActionBean;
|
||||
import net.sourceforge.stripes.action.ActionBeanContext;
|
||||
|
||||
public class BaseActionBean implements ActionBean {
|
||||
private ActionBeanContext context;
|
||||
|
||||
public ActionBeanContext getContext() {
|
||||
return context;
|
||||
}
|
||||
public void setContext(ActionBeanContext context) {
|
||||
this.context = context;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package}.stripes.action;
|
||||
|
||||
import net.sourceforge.stripes.action.DefaultHandler;
|
||||
import net.sourceforge.stripes.action.ForwardResolution;
|
||||
import net.sourceforge.stripes.action.Resolution;
|
||||
import net.sourceforge.stripes.action.UrlBinding;
|
||||
|
||||
import org.oasisopen.sca.annotation.Reference;
|
||||
|
||||
import ${package}.sca.HelloworldService;
|
||||
|
||||
@UrlBinding("/Home.htm")
|
||||
public class HomeActionBean extends BaseActionBean {
|
||||
|
||||
@Reference
|
||||
HelloworldService service;
|
||||
|
||||
@DefaultHandler
|
||||
public Resolution view() {
|
||||
return new ForwardResolution("/WEB-INF/jsp/home.jsp");
|
||||
}
|
||||
|
||||
public String getHello() {
|
||||
return service.sayHello("world");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
|
||||
${symbol_pound} Resource strings used by the <stripes:errors> tag when there are no nested tags
|
||||
stripes.errors.header=<div style="color:${symbol_pound}b72222; font-weight: bold">Please fix the following errors:</div><ol>
|
||||
stripes.errors.beforeError=<li style="color: ${symbol_pound}b72222;">
|
||||
stripes.errors.afterError=</li>
|
||||
stripes.errors.footer=</ol>
|
||||
|
||||
${symbol_pound} Resource strings used by the <stripes:errors> tag when displaying errors for a
|
||||
${symbol_pound} specific field (e.g. <stripes:errors field="password"/>). If not supplied the
|
||||
${symbol_pound} values above will be used instead.
|
||||
stripes.fieldErrors.header=
|
||||
stripes.fieldErrors.beforeError=<span style="color: ${symbol_pound}b72222;">
|
||||
stripes.fieldErrors.afterError=</span><br />
|
||||
stripes.fieldErrors.footer=
|
||||
|
||||
${symbol_pound} Resource strings used by the stripes:messages tag
|
||||
stripes.messages.header=<ul class="messages">
|
||||
stripes.messages.beforeMessage=<li>
|
||||
stripes.messages.afterMessage=</li>
|
||||
stripes.messages.footer=</ul>
|
||||
|
||||
${symbol_pound} Validation error messages produced by Stripes' built-in converter classes. These
|
||||
${symbol_pound} are default error messages and can be overridden on per-field and per-form levels.
|
||||
${symbol_pound} Using the 'invalidNumber' error for a field 'age' of a form posting to
|
||||
${symbol_pound} '/user/Profile.action', the keys looked for (in order) would be:
|
||||
${symbol_pound} 1: /user/Profile.action.age.invalidNumber
|
||||
${symbol_pound} 2: /user/Profile.action.age.errorMessage
|
||||
${symbol_pound} 3: age.errorMessage
|
||||
${symbol_pound} 4: /user/Profile.action.invalidNumber
|
||||
${symbol_pound} 5: converter.number.invalidNumber
|
||||
converter.number.invalidNumber=The value ({1}) entered in field {0} must be a valid number
|
||||
converter.byte.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
|
||||
converter.short.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
|
||||
converter.integer.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
|
||||
converter.float.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
|
||||
converter.enum.notAnEnumeratedValue=The value "{1}" is not a valid value for field {0}
|
||||
converter.date.invalidDate=The value ({1}) entered in field {0} must be a valid date
|
||||
converter.email.invalidEmail=The value ({1}) entered is not a valid email address
|
||||
converter.creditCard.invalidCreditCard=The value ({1}) entered is not a valid credit card number
|
||||
|
||||
${symbol_pound} Validation error messages produced by Stripes' annotation based validations. These
|
||||
${symbol_pound} are default error messages and can be overridden on per-field and per-form levels.
|
||||
${symbol_pound} Using the 'valueNotPresent' required field error for a field 'username' of a form
|
||||
${symbol_pound} posting to '/user/Register.action', the keys looked for (in order) would be:
|
||||
${symbol_pound} 1: /user/Register.action.username.valueNotPresent
|
||||
${symbol_pound} 2: /user/Register.action.username.errorMessage
|
||||
${symbol_pound} 3: username.errorMessage
|
||||
${symbol_pound} 4: /user/Register.action.valueNotPresent
|
||||
${symbol_pound} 5: validation.required.valueNotPresent
|
||||
validation.required.valueNotPresent={0} is a required field
|
||||
validation.minlength.valueTooShort={0} must be at least {2} characters long
|
||||
validation.maxlength.valueTooLong={0} must be no more than {2} characters long
|
||||
validation.minvalue.valueBelowMinimum=The minimum allowed value for {0} is {2}
|
||||
validation.maxvalue.valueAboveMaximum=The maximum allowed value for {0} is {2}
|
||||
validation.mask.valueDoesNotMatch=<em>{1}</em> is not a valid {0}
|
||||
validation.expression.valueFailedExpression=The value supplied ({1}) for field {0} is invalid
|
||||
validation.file.postBodyTooBig=Total upload size of {3} KB exceeds the maximum size of {2} KB
|
|
@ -0,0 +1,51 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
${symbol_pound} log4j.properties
|
||||
|
||||
${symbol_pound} Set up a logger to the console
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n
|
||||
|
||||
${symbol_pound} Use this to only see log messages beyond a certain threshold in the console
|
||||
${symbol_pound}log4j.appender.stdout.Threshold=WARN
|
||||
|
||||
${symbol_pound} Set up a logger to a log file
|
||||
log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n
|
||||
log4j.appender.logfile.File=${symbol_dollar}{user.home}/stripesquick.log
|
||||
log4j.appender.logfile.DatePattern='.'yyyy-MM-dd
|
||||
|
||||
${symbol_pound} Use this to only see log messages beyond a certain threshold in the log file
|
||||
${symbol_pound}log4j.appender.logfile.Threshold=WARN
|
||||
|
||||
${symbol_pound} Logger settings
|
||||
log4j.rootLogger=INFO, stdout, logfile
|
||||
|
||||
${symbol_pound} Valid levels are TRACE, DEBUG, INFO, WARN, ERROR, FATAL
|
||||
${symbol_pound} Change to TRACE or DEBUG to see more log messages
|
||||
log4j.logger.net.sourceforge.stripes=WARN
|
||||
log4j.logger.org.stripesbook.quickstart=INFO
|
||||
log4j.logger.org.mortbay.log=INFO
|
||||
log4j.logger.org=WARN
|
||||
log4j.logger.com=WARN
|
||||
log4j.logger.net=WARN
|
|
@ -0,0 +1,29 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<%--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
--%>
|
||||
<%@ include file="/WEB-INF/jsp/taglibs.jsp" %>
|
||||
|
||||
<s:layout-render name="/WEB-INF/jsp/layout.jsp" title="Welcome">
|
||||
<s:layout-component name="body">
|
||||
<p>sayHello returns: ${symbol_dollar}{actionBean.hello}</p>
|
||||
<p>Congratulations, you've set up a Stripes SCA project!</p>
|
||||
</s:layout-component>
|
||||
</s:layout-render>
|
|
@ -0,0 +1,42 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<%--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
--%>
|
||||
<%@ include file="/WEB-INF/jsp/taglibs.jsp" %>
|
||||
|
||||
<s:layout-definition>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>${symbol_dollar}{title}</title>
|
||||
<link rel="stylesheet" type="text/css" href="${symbol_dollar}{contextPath}/css/style.css">
|
||||
<s:layout-component name="head">
|
||||
</s:layout-component>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<s:layout-component name="body">
|
||||
</s:layout-component>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</s:layout-definition>
|
|
@ -0,0 +1,32 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<%--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
--%>
|
||||
<%-- Stripes TLD --%>
|
||||
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
|
||||
<%@ taglib prefix="sdyn" uri="http://stripes.sourceforge.net/stripes-dynattr.tld" %>
|
||||
|
||||
<%-- JSTL TLDs --%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
|
||||
<%-- This is so that you can conveniently refer to the context path with ${symbol_dollar}{contextPath} --%>
|
||||
<c:set var="contextPath" value="${symbol_dollar}{pageContext.request.contextPath}"/>
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="${artifactId}WebComponent">
|
||||
<implementation.web web-uri=""/>
|
||||
<reference name="service" target="HelloworldComponent"/>
|
||||
</component>
|
||||
|
||||
<component name="HelloworldComponent">
|
||||
<implementation.java class="${package}.sca.HelloworldServiceImpl"/>
|
||||
</component>
|
||||
|
||||
</composite>
|
|
@ -0,0 +1,68 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
|
||||
<display-name>${artifactId}</display-name>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.apache.tuscany.sca.host.webapp.TuscanyContextListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<filter>
|
||||
<filter-name>StripesFilter</filter-name>
|
||||
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>ActionResolver.Packages</param-name>
|
||||
<param-value>${package}.stripes.action</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>Extension.Packages</param-name>
|
||||
<param-value>org.apache.tuscany.sca.stripes</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>DispatcherServlet</servlet-name>
|
||||
<servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>StripesFilter</filter-name>
|
||||
<servlet-name>DispatcherServlet</servlet-name>
|
||||
<dispatcher>REQUEST</dispatcher>
|
||||
<dispatcher>FORWARD</dispatcher>
|
||||
</filter-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>DispatcherServlet</servlet-name>
|
||||
<url-pattern>*.htm</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
|
@ -0,0 +1,27 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT 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 HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;url=Home.htm">
|
||||
</head>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Name: Apache Tuscany SCA Quickstart Archetype
|
||||
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
|
||||
Bundle-Vendor: The Apache Software Foundation
|
||||
Bundle-Version: 2.0.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
Bundle-Description: Apache Tuscany SCA Quickstart Archetype
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
|
50
sandbox/sebastien/java/embed/archetypes/quickstart/pom.xml
Normal file
50
sandbox/sebastien/java/embed/archetypes/quickstart/pom.xml
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>tuscany-quickstart</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Create a simple Apache Tuscany SCA webapp project</name>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype-descriptor name="myproject">
|
||||
<requiredProperties>
|
||||
<requiredProperty key="includeTuscanyRuntime">
|
||||
<defaultValue>Y</defaultValue>
|
||||
</requiredProperty>
|
||||
</requiredProperties>
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.composite</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<archetype>
|
||||
<id>tuscany-quickstart</id>
|
||||
<sources>
|
||||
<source>src/main/java/HelloworldImpl.java</source>
|
||||
<source>src/main/java/HelloworldService.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource>src/main/webapp/hello.jsp</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.composite</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
||||
</resources>
|
||||
</archetype>
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${version}</version>
|
||||
<name>quickstart</name>
|
||||
|
||||
<dependencies>
|
||||
<!-- TUSCANY DEPENDENCIES -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-sca-api</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
#if(${includeTuscanyRuntime} == "Y")
|
||||
<scope>compile</scope>
|
||||
#else
|
||||
<scope>provided</scope>
|
||||
#end
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>tuscany-implementation-web-runtime</artifactId>
|
||||
<version>${tuscany.version}</version>
|
||||
#if( $includeTuscanyRuntime == "Y")
|
||||
<scope>runtime</scope>
|
||||
#else
|
||||
<scope>provided</scope>
|
||||
#end
|
||||
</dependency>
|
||||
|
||||
<!-- JUNIT DEPENDENCY FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JETTY DEPENDENCIES FOR TESTING -->
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-management</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<finalName>${artifactId}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<optimise>true</optimise>
|
||||
<debug>true</debug>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<tuscany.version>2.0-SNAPSHOT</tuscany.version>
|
||||
<jetty.version>6.1.18</jetty.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
public class HelloworldImpl implements HelloworldService {
|
||||
|
||||
public String sayHello(String name) {
|
||||
return "Hello " + name;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package ${package};
|
||||
|
||||
public interface HelloworldService {
|
||||
|
||||
String sayHello(String name);
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
|
||||
targetNamespace="http://${package}"
|
||||
name="${artifactId}">
|
||||
|
||||
<component name="${artifactId}WebComponent">
|
||||
<implementation.web web-uri=""/>
|
||||
<reference name="service" target="HelloworldComponent"/>
|
||||
</component>
|
||||
|
||||
<component name="HelloworldComponent">
|
||||
<implementation.java class="${package}.HelloworldImpl"/>
|
||||
</component>
|
||||
|
||||
</composite>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
-->
|
||||
<web-app version="2.4"
|
||||
xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
|
||||
|
||||
<display-name>${artifactId}</display-name>
|
||||
|
||||
#if($includeTuscanyRuntime == "Y")
|
||||
<filter>
|
||||
<filter-name>tuscany.${artifactId}</filter-name>
|
||||
<filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>tuscany.${artifactId}</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
#end
|
||||
<welcome-file-list id="WelcomeFileList">
|
||||
<welcome-file>hello.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
|
@ -0,0 +1,36 @@
|
|||
<%--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
|
||||
|
||||
<sca:reference name="service" type="${package}.HelloworldService" />
|
||||
|
||||
<html>
|
||||
<body >
|
||||
|
||||
<h2>${artifactId}</h2>
|
||||
|
||||
Calling HelloworldService sayHello("world") returns:
|
||||
|
||||
<p>
|
||||
|
||||
<%= service.sayHello("world") %>
|
||||
|
||||
</body>
|
||||
</html>
|
140
sandbox/sebastien/java/embed/compliance-tests/assembly/pom.xml
Normal file
140
sandbox/sebastien/java/embed/compliance-tests/assembly/pom.xml
Normal file
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT 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-compliance-tests</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>tuscany-compliance-test-assembly</artifactId>
|
||||
<name>Apache Tuscany SCA Specification Compliance Tests Assembly</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<!-- This is only needed to get the module working in Eclipse which doesn't pick it up from the dependency plugin unpack -->
|
||||
<!-- The dependency plugin unpack is needed as presently the surefire plugin wont run tests in a dependency jar -->
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-assembly-test-runner</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca.shades</groupId>
|
||||
<artifactId>tuscany-base</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- This is need when running with Sun JDK which gets an unsupported operation exception creating an XMLStreamReader from a DOMSource
|
||||
when Tuscany is writing a property value -->
|
||||
<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>
|
||||
|
||||
<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-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<!-- Real otest/Tuscany problems -->
|
||||
<exclude>**/ASM_10002_TestCase.java</exclude><!-- see TUSCANY-3503 -->
|
||||
|
||||
<exclude>**/ASM_12006_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_12007_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_5016_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_6004_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_6007_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_12008_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_6014_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_8014_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_6008_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_6034_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_8017_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_8018_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
<exclude>**/ASM_10003_TestCase.java</exclude><!-- see TUSCANY-xxx -->
|
||||
|
||||
<!-- actually is working but the err msgs come out in a different order so the msg text test fails -->
|
||||
<exclude>**/ASM_13004_TestCase.java</exclude>
|
||||
|
||||
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-assembly-contributions</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${project.build.directory}/oasis-contributions</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-assembly-test-runner</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<excludes>commons-logging.properties,oasis-sca-tests.properties</excludes>
|
||||
<outputDirectory>${project.build.directory}/test-classes</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,236 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES 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.otest;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.tuscany.sca.monitor.ValidationException;
|
||||
import org.apache.tuscany.sca.node2.Node;
|
||||
import org.apache.tuscany.sca.node2.NodeFactory;
|
||||
|
||||
import client.RuntimeBridge;
|
||||
import client.TestConfiguration;
|
||||
|
||||
/**
|
||||
* An implementation of the Runtime Bridge for the Apache Tuscany SCA runtime (version 2.x)
|
||||
*
|
||||
*/
|
||||
public class TuscanyRuntimeBridge implements RuntimeBridge {
|
||||
|
||||
static final String CONTRIBUTION_LOCATION_PROPKEY = "OASIS_TESTENV_CONTRIBUTION_LOCATION";
|
||||
|
||||
protected NodeFactory launcher;
|
||||
protected Node node;
|
||||
protected Properties expectedErrorMessages;
|
||||
|
||||
TestConfiguration testConfiguration = null;
|
||||
|
||||
public TuscanyRuntimeBridge() {
|
||||
// read test error mapping
|
||||
expectedErrorMessages = new Properties();
|
||||
try {
|
||||
InputStream propertiesStream = this.getClass().getResourceAsStream("/tuscany-oasis-sca-tests-errors.properties");
|
||||
expectedErrorMessages.load(propertiesStream);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Unable to read oasis-sca-tests-errors.properties file");
|
||||
}
|
||||
}
|
||||
|
||||
public TestConfiguration getTestConfiguration() {
|
||||
return testConfiguration;
|
||||
}
|
||||
|
||||
public void setTestConfiguration(TestConfiguration testConfiguration) {
|
||||
this.testConfiguration = testConfiguration;
|
||||
}
|
||||
|
||||
public boolean startContribution(String contributionLocation, String[] contributionNames) throws Exception {
|
||||
try {
|
||||
// Tuscany specific code which starts the contribution(s) holding the test
|
||||
Properties ps = new Properties();
|
||||
ps.setProperty("defaultScheme", "vm");
|
||||
ps.setProperty("org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSBindingProviderFactory.defaultPort", "8080");
|
||||
launcher = NodeFactory.newInstance(ps);
|
||||
node = launcher.createNode("default");
|
||||
|
||||
// Contribution[] contributions = new Contribution[contributionNames.length];
|
||||
String[] contributionURIs = getContributionURIs(contributionLocation);
|
||||
// for (int i = 0; i < contributions.length; i++) {
|
||||
// contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]);
|
||||
// } // end for
|
||||
|
||||
for (int i=contributionURIs.length-1; i > -1; i--) {
|
||||
node.installContribution(contributionNames[i], contributionURIs[i], null, null, false);
|
||||
}
|
||||
|
||||
node.addToDomainLevelComposite(contributionNames[0], testConfiguration.getComposite());
|
||||
|
||||
// node = NodeFactory.createNode(testConfiguration.getComposite(), contributionURIs);
|
||||
// Start the node
|
||||
// node.start();
|
||||
|
||||
// For debugging
|
||||
// print out the composites that have been read in success cases
|
||||
// System.out.println(((NodeImpl)node).dumpDomainComposite());
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
} // end try
|
||||
|
||||
return true;
|
||||
} // end method startContribution
|
||||
|
||||
/**
|
||||
* Gets the location of the Contributions as URIs
|
||||
* @param contributionLocation - a location pattern URI, which contains one or more "%1"
|
||||
* substrings, which are substituted with the name of the contribution to get the URI of
|
||||
* the contribution
|
||||
* @return the contribution locations as an array of Strings
|
||||
*/
|
||||
protected String[] getContributionURIs(String contributionLocation) throws Exception {
|
||||
String[] locations;
|
||||
locations = testConfiguration.getContributionNames();
|
||||
|
||||
if (locations != null && contributionLocation != null) {
|
||||
|
||||
for (int i = 0; i < locations.length; i++) {
|
||||
String aLocation = contributionLocation.replaceAll("%1", locations[i]);
|
||||
// Looks like bugs in the oasis code that sometimes still uses jars for some
|
||||
if (aLocation.endsWith("_Java-1.0.zip") && !aLocation.endsWith("ASM_8005_Java-1.0.zip")) {
|
||||
aLocation = aLocation.substring(0, aLocation.length()-3) + "jar";
|
||||
}
|
||||
if (!(new File(aLocation)).exists()) {
|
||||
aLocation = aLocation.replace(".zip", ".jar");
|
||||
}
|
||||
locations[i] = aLocation;
|
||||
} // end for
|
||||
} else {
|
||||
if (locations == null) {
|
||||
// No contribution specified - throw an Exception
|
||||
throw new Exception("Unable to start SCA runtime - no contribution supplied - error");
|
||||
} else {
|
||||
// No contribution location supplied - throw an Exception
|
||||
throw new Exception("Unable to start SCA runtime - no contribution location supplied - error");
|
||||
} // end if
|
||||
} // end if
|
||||
|
||||
return locations;
|
||||
} // end getContributionURI
|
||||
|
||||
public void stopContribution() {
|
||||
if (node != null) {
|
||||
node.stop();
|
||||
} // end if
|
||||
if (launcher != null) {
|
||||
launcher.stop();
|
||||
} // end if
|
||||
} // end method stopContribution
|
||||
|
||||
public void checkError(String testName, Throwable ex) throws Throwable {
|
||||
|
||||
String expectedMessage = expectedErrorMessages.getProperty(testName);
|
||||
String receivedMessage = ex.getMessage();
|
||||
if (ex instanceof ValidationException && ex.getCause() == null) {
|
||||
receivedMessage = "org.apache.tuscany.sca.monitor.ValidationException: " + receivedMessage;
|
||||
}
|
||||
|
||||
if (expectedMessage == null){
|
||||
writeMissingMessage(testName, ex);
|
||||
fail("Null expected error message for test " + testName +
|
||||
"Please add message to oasis-sca-tests-errors.properties");
|
||||
} // end if
|
||||
|
||||
if (receivedMessage == null){
|
||||
ex.printStackTrace();
|
||||
fail("Null received error message for test " + testName);
|
||||
} // end if
|
||||
|
||||
if (expectedMessage.startsWith("*")) {
|
||||
// allow using * to ignore a message comparison
|
||||
return;
|
||||
}
|
||||
|
||||
// Deal with the case where the message has variable parts within it
|
||||
// marked with the characters ***. Here we tokenize the epected string
|
||||
// and make sure all the individual parts are present in the results string
|
||||
String expectedMessageParts[] = expectedMessage.split("\\*\\*\\*");
|
||||
|
||||
if (expectedMessageParts.length > 1){
|
||||
int foundParts = 0;
|
||||
for(int i = 0; i < expectedMessageParts.length; i++){
|
||||
if (receivedMessage.indexOf(expectedMessageParts[i]) > -1 ){
|
||||
foundParts++;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundParts == expectedMessageParts.length){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Deal with the case where the end of the message is variable (eg contains absolute filenames)
|
||||
// and where the only relevant part is the start of the message - in this case the expected
|
||||
// message only contains the stem section which is unchanging...
|
||||
if( receivedMessage.length() > expectedMessage.length() ) {
|
||||
// Truncate the received message to the length of the expected message
|
||||
receivedMessage = receivedMessage.substring(0, expectedMessage.length() );
|
||||
} // end if
|
||||
|
||||
if (!expectedMessage.equals(receivedMessage)) {
|
||||
writeIncorrectMessage(testName, expectedMessage, receivedMessage);
|
||||
}
|
||||
|
||||
assertEquals( expectedMessage, receivedMessage );
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
protected void writeMissingMessage(String testName, Throwable ex) {
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestMissingMsgs.txt", true));
|
||||
out.write(testName + "=*");
|
||||
out.newLine();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
protected void writeIncorrectMessage(String testName, String expected, String received) {
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestIncorrectMsgs.txt", true));
|
||||
out.write(testName); out.newLine();
|
||||
out.write(" " + expected); out.newLine();
|
||||
out.write(" " + received); out.newLine();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
} // end class TuscanyRuntimeBridge
|
|
@ -0,0 +1,30 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# OASIS SCA Assembly test properties
|
||||
# The implementation type to use for Assembly test suite
|
||||
# org.oasis.sca.tests.assembly.lang=BPEL
|
||||
org.oasis.sca.tests.assembly.lang=Java
|
||||
|
||||
# The class to use as the Runtime Bridge for the SCA runtime under test
|
||||
#org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyOSGiRuntimeBridge
|
||||
org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyRuntimeBridge
|
||||
|
||||
# The location of the contributions for the test suite
|
||||
# %1 represents the placement of the name of each contribution into the location URI
|
||||
org.oasis.sca.tests.assembly.contribution.location=target/oasis-contributions/%1.zip
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
ASM_4002=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = TestComponent1 Service = Service1
|
||||
ASM_4003=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1
|
||||
ASM_4004=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TestComponent1 Property = propertyName
|
||||
ASM_4007=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - propertyName
|
||||
ASM_4008=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = propertyName
|
||||
ASM_5004=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50022] Too many targets on reference: reference1
|
||||
ASM_5005=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5005Component1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = Test_ASM_5005Component1 Service = Service1
|
||||
ASM_5006=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Component type service not found for component service (missing @Remotable annotation?): Component = TestComponent1 Service = InvalidName
|
||||
ASM_5007=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5007Component1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = Test_ASM_5007Component1 Reference = Reference1
|
||||
ASM_5008=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50008] Component type reference not found for component reference: Component = TestComponent1 Reference = InvalidName
|
||||
ASM_5009=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1
|
||||
ASM_5010=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1
|
||||
ASM_5014=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50009] Component reference multiplicity incompatible with reference multiplicity: Component = TestComponent1 Reference = Reference1
|
||||
ASM_5023=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite11, Component: Composite11Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite4, Component: Composite4Component1] - [ASM50022] Too many targets on reference: reference1
|
||||
ASM_5024=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM50026] Composite {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component TestComponent1 Reference Reference1 must not specify endpoints using both target attribute and with a binding child element
|
||||
ASM_5027=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Duplicate component property name: Component = TestComponent1 Property = serviceName
|
||||
ASM_5028=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50031] Property not found for component property: Component = TestComponent1 Property = randomName
|
||||
ASM_5029=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50032] The property component TestComponent1 property complexType has many values but its "many" attribute is set to false
|
||||
ASM_5030=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_5030, Artifact: Test_ASM_5030.composite] - ASM50033: value attribute exists for the property element
|
||||
ASM_5035=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - complexType
|
||||
ASM_5036=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5036Component1] - [ASM_5036] The property component TEST_ASM_5036Component1 property complexType has XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType2 while its component type property has the XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType1
|
||||
ASM_5037=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5037Component1] - [ASM50031] Property not found for component property: Component = TEST_ASM_5037Component1 Property = bogusName
|
||||
ASM_5038=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5038Component1] - [ASM50027] The property serviceData1 on component TEST_ASM_5038Component1 has a value which does not match the simple type {http://www.w3.org/2001/XMLSchema}float with which it is associated
|
||||
ASM_5039=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5039Component1] - [ASM50038] The property complexType on component TEST_ASM_5039Component1 has a value which does not match the complex type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType1 with which it is associated. Validation reported cvc-complex-type.2.4.d: Invalid content was found starting with element 'test:thirdData'. No child element is expected at this point.
|
||||
ASM_5040=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5040Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite74] - [ASM50042] Composite reference promotes component reference with 1..1 multiplicity and nonOverridable flag set true: Composite = TestComposite74.composite Composite reference = Reference1 Component reference = Reference1
|
||||
ASM_6001=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_6001, Artifact: TestDuplicate1.composite] - [ASM_6001] More than one composite with the same name {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DuplicateComposite found in contribution
|
||||
ASM_6002=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = TestComponent1 Service = Service1
|
||||
ASM_6003=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17 Service = SpuriousComponent/SpuriousService
|
||||
ASM_6005=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1
|
||||
ASM_6006=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20] - [ASM60007] Promoted component reference not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20 Reference = Composite20Componentz/Reference1
|
||||
ASM_6008=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6008Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite22] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Operation operation2 not found on target
|
||||
ASM_6012=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6012TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TEST_ASM_6012TestComponent1 Property = propertyName
|
||||
ASM_6016=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite30, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1
|
||||
ASM_6020=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1
|
||||
ASM_6021=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6021TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31 Service = Not_A_URI_of_a_Component
|
||||
ASM_6022=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32, Component: TestComponent1] - [ASM60033] No targets for reference: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32 Reference = Reference1
|
||||
ASM_6023=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = simpleType
|
||||
ASM_6024=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030,JCI50004,JCI80001] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1
|
||||
ASM_6025=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1
|
||||
ASM_6028=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - InvalidProperty
|
||||
ASM_6029=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60041] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_6029 can only include another composite with the identical @local attribute value
|
||||
ASM_6030=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60042] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Invalid_composite_name is not a valid composite within the domain
|
||||
ASM_6031=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite39] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive
|
||||
ASM_6032=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite40] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive
|
||||
ASM_6033=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite41] - [ASM60011] Composite reference multiplicity incompatible with component reference multiplicity: Composite = TestComposite41.composite Composite reference = Reference1 Component reference = Reference1
|
||||
ASM_6036=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - No endpoints found in the domain that match the reference (@***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (@***)Endpoint: URI = TEST_ASM_6036Component1#service(ServiceZ) [Unresolved]
|
||||
ASM_6039=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - No endpoints found in the domain that match the reference (@***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (@***)Endpoint: URI = TEST_ASM_6039Component1#service-binding(Service1/harry) [Unresolved]
|
||||
ASM_8001=org.apache.tuscany.sca.interfacedef.OverloadedOperationException: [JCA20001] Cannot overload operation operation1 on org.oasisopen.sca.test.Service3 as it is a @Remotable interface
|
||||
ASM_8004=org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callback org.oasisopen.sca.test.Service6Callback must be remotable on remotable interface org.oasisopen.sca.test.Service6
|
||||
ASM_8005=org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callbackorg.oasisopen.sca.test.Service7Callback must not be remotable on local interface org.oasisopen.sca.test.Service7
|
||||
ASM_8006=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_8006, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_8006] - The interface.wsdl element has a forward interface with a callback declared in the WSDL {http://test.sca.oasisopen.org/}Service9Callback and a callback interface also declared using the callbackInterface attribute {http://test.sca.oasisopen.org/}Service8Callback but the callback interfaces are not equal.
|
||||
ASM_8007=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComponent2 Service = Service1
|
||||
ASM_8008=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [JCA30001,JCA30002,JCA30003,JCA90046] Component reference interface incompatible with implementation reference interface: Component = TestComponent1 Reference = Reference1
|
||||
ASM_8009=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8009Component1] - [JCA30001,JCA30002,JCA30003,JCA90046] Component reference interface incompatible with implementation reference interface: Component = TEST_ASM_8009Component1 Reference = Reference1
|
||||
ASM_8010=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8010Component2, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite63] - Interface of composite service Service1 must be subset of the interface declared by promoted component service. Callback operation not found on target
|
||||
ASM_8011=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite62] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Callback operation not found on target
|
||||
ASM_8012=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8012Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite64] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference.
|
||||
ASM_8017=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8017Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite72] - Interface of composite service Service1a must be subset of the interface declared by promoted component service. Callback interface doesn't match
|
||||
ASM_8018=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestClient Service = TestInvocation
|
||||
ASM_8019=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_8019, Artifact: Test_ASM_8019.composite] - The interface.wsdl interface {http://test.sca.oasisopen.org/}Service1 element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: false.
|
||||
ASM_9002=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Multiple bindings with the same name for a service: Service = Service1 Binding name = Fred
|
||||
ASM_9005=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_9005Component1] - [ASM90005] The SCA binding Service1 on component TEST_ASM_9005Component1 service Service1 should not have a URI and the URI is currently set to http://example/bar
|
||||
ASM_10001=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_10001, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10001***.zip!/META-INF/definitions.xml] - [ASM10001,POL30002] Duplicate intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Fred found in domain
|
||||
ASM_10003=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_10003, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10003***.zip!/META-INF/definitions.xml] - XMLSchema validation error occured in: Test_ASM_10003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":intent, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySet, "http://docs.oasis-open.org/ns/opencsa/sca/200912":bindingType, "http://docs.oasis-open.org/ns/opencsa/sca/200912":implementationType, "http://docs.oasis-open.org/ns/opencsa/sca/200912":externalAttachment, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
|
||||
ASM_12003=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Invalid interface when resolving
|
||||
ASM_12007=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/2009032}TestComposite5, Component: TestComposite5TestComponent1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComposite5TestComponent1 Service = Service1 Operations called operation2 are not compatible Operation argument types source = {http://www.w3.org/2001/XMLSchema}int target = {http://www.w3.org/2001/XMLSchema}string don't match for output types
|
||||
ASM_12008=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_12008TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/2009032}TestComposite5, Component: TestComposite5TestComponent1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComposite5TestComponent1 Service = Service1 Operations called operation2 are not compatible Operation argument types source = {http://www.w3.org/2001/XMLSchema}int target = {http://www.w3.org/2001/XMLSchema}string don't match for output types
|
||||
ASM_12011=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030,JCI50004,JCI80001] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1
|
||||
ASM_12012=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_12012, Artifact: META-INF/sca-contribution.xml] - XMLSchema validation error occured in: jar:file:***ASM_12012***.zip!/META-INF/sca-contribution.xml ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":deployable, "http://docs.oasis-open.org/ns/opencsa/sca/200912":importBase, "http://docs.oasis-open.org/ns/opencsa/sca/200912":exportBase, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected.
|
||||
ASM_13001=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13001, Artifact: Test_ASM_13001.composite] - XMLSchema validation error occured in: Test_ASM_13001.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'sevrice'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected.
|
||||
ASM_13002=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13002, Artifact: Test_ASM_13002.composite] - XMLSchema validation error occured in: Test_ASM_13002.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected.
|
||||
ASM_13003=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13003, Artifact: Test_ASM_13003.composite] - XMLSchema validation error occured in: Test_ASM_13003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'binding.ws'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":include, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":component, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wire, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
|
||||
ASM_13004=org.apache.tuscany.sca.monitor.ValidationException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestClient_0002, Component: TestClient_0002TestClient] - [ASM40011,ASM60034] No value configured on a mustSupply property
|
||||
ASM_13005=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13005, Artifact: Test_ASM_13005.composite] - XMLSchema validation error occured in: Test_ASM_13005.composite ,line = ***, column = ***, Message = cvc-elt.2: The value of {abstract} in the element declaration for 'implementation' must be false.
|
||||
ASM_13006=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13006, Artifact: Test_ASM_13006.composite] - XMLSchema validation error occured in: Test_ASM_13006.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'callback' is not allowed to appear in element 'interface.java'.
|
||||
ASM_13007=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13007, Artifact: Test_ASM_13007.composite] - XMLSchema validation error occured in: Test_ASM_13007.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'mulplicity' is not allowed to appear in element 'reference'.
|
||||
ASM_13008=org.apache.tuscany.sca.monitor.ValidationException: [Contribution: ASM_13008, Artifact: Test_ASM_13008.composite] - XMLSchema validation error occured in: Test_ASM_13008.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wireFormat, "http://docs.oasis-open.org/ns/opencsa/sca/200912":operationSelector, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment}' is expected.
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT 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-compliance-tests</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>tuscany-compliance-test-binding-jms</artifactId>
|
||||
<name>Apache Tuscany SCA Specification Compliance Tests Binding JMS</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<!-- This is only needed to get the module working in Eclipse which doesn't pick it up from the dependency plugin unpack -->
|
||||
<!-- The dependency plugin unpack is needed as presently the surefire plugin wont run tests in a dependency jar -->
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-binding-jms-test-runner</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca.shades</groupId>
|
||||
<artifactId>tuscany-base</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca.shades</groupId>
|
||||
<artifactId>tuscany-jms</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-core</artifactId>
|
||||
<version>5.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- This is need when running with Sun JDK which gets an unsupported operation exception creating an XMLStreamReader from a DOMSource
|
||||
when Tuscany is writing a property value -->
|
||||
<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>
|
||||
|
||||
<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-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<!-- exclude>**/POJO_8011_TestCase.java</exclude -->
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-binding-jms-contributions</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${project.build.directory}/oasis-contributions</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-binding-jms-test-runner</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<excludes>commons-logging.properties,oasis-sca-tests.properties,tuscany-oasis-sca-tests-errors.properties</excludes>
|
||||
<outputDirectory>${project.build.directory}/test-classes</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,220 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES 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.otest;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.tuscany.sca.node.Contribution;
|
||||
import org.apache.tuscany.sca.node.Node;
|
||||
import org.apache.tuscany.sca.node.NodeFactory;
|
||||
|
||||
import testClient.TestException_Exception;
|
||||
import client.RuntimeBridge;
|
||||
|
||||
/**
|
||||
* An implementation of the Runtime Bridge for the Apache Tuscany SCA runtime (version 2.x)
|
||||
*
|
||||
*/
|
||||
public class TuscanyRuntimeBridge implements RuntimeBridge {
|
||||
|
||||
static final String CONTRIBUTION_LOCATION_PROPKEY = "OASIS_TESTENV_CONTRIBUTION_LOCATION";
|
||||
|
||||
protected NodeFactory launcher;
|
||||
protected Node node;
|
||||
protected Properties expectedErrorMessages;
|
||||
|
||||
public TuscanyRuntimeBridge() {
|
||||
// read test error mapping
|
||||
expectedErrorMessages = new Properties();
|
||||
try {
|
||||
InputStream propertiesStream = this.getClass().getResourceAsStream("/tuscany-oasis-sca-tests-errors.properties");
|
||||
expectedErrorMessages.load(propertiesStream);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Unable to read oasis-sca-tests-errors.properties file");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception {
|
||||
try {
|
||||
// Tuscany specific code which starts the contribution(s) holding the test
|
||||
Properties ps = new Properties();
|
||||
ps.setProperty("defaultScheme", "vm");
|
||||
ps.setProperty("org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSBindingProviderFactory.defaultPort", "8080");
|
||||
launcher = NodeFactory.newInstance(ps);
|
||||
|
||||
Contribution[] contributions = new Contribution[contributionNames.length];
|
||||
String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames);
|
||||
for (int i = 0; i < contributions.length; i++) {
|
||||
contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]);
|
||||
} // end for
|
||||
|
||||
node = launcher.createNode(compositeName, contributions);
|
||||
// Start the node
|
||||
node.start();
|
||||
|
||||
// For debugging
|
||||
// print out the composites that have been read in success cases
|
||||
// System.out.println(((NodeImpl)node).dumpDomainComposite());
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
} // end try
|
||||
|
||||
return true;
|
||||
} // end method startContribution
|
||||
|
||||
/**
|
||||
* Gets the location of the Contributions as URIs
|
||||
* @param contributionLocation - a location pattern URI, which contains one or more "%1"
|
||||
* substrings, which are substituted with the name of the contribution to get the URI of
|
||||
* the contribution
|
||||
* @return the contribution locations as an array of Strings
|
||||
*/
|
||||
protected String[] getContributionURIs(String contributionLocation, String[] contributionNames) throws Exception {
|
||||
String[] locations = new String[contributionNames.length];
|
||||
|
||||
if (locations != null && contributionLocation != null) {
|
||||
|
||||
for (int i = 0; i < locations.length; i++) {
|
||||
String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]);
|
||||
|
||||
locations[i] = aLocation;
|
||||
} // end for
|
||||
} else {
|
||||
if (locations == null) {
|
||||
// No contribution specified - throw an Exception
|
||||
throw new Exception("Unable to start SCA runtime - no contribution supplied - error");
|
||||
} else {
|
||||
// No contribution location supplied - throw an Exception
|
||||
throw new Exception("Unable to start SCA runtime - no contribution location supplied - error");
|
||||
} // end if
|
||||
} // end if
|
||||
|
||||
return locations;
|
||||
} // end getContributionURI
|
||||
|
||||
public void stopContribution() {
|
||||
if (node != null) {
|
||||
node.stop();
|
||||
} // end if
|
||||
if (launcher != null) {
|
||||
launcher.destroy();
|
||||
} // end if
|
||||
} // end method stopContribution
|
||||
|
||||
public void checkError(String testName, Throwable ex) throws Throwable {
|
||||
|
||||
String expectedMessage = expectedErrorMessages.getProperty(testName);
|
||||
String receivedMessage = getErrorMessage(ex);//ex.getMessage();
|
||||
|
||||
if (expectedMessage == null){
|
||||
writeMissingMessage(testName, ex);
|
||||
fail("Null expected error message for test " + testName +
|
||||
"Please add message to oasis-sca-tests-errors.properties");
|
||||
} // end if
|
||||
|
||||
if (receivedMessage == null){
|
||||
ex.printStackTrace();
|
||||
fail("Null received error message for test " + testName);
|
||||
} // end if
|
||||
|
||||
if (expectedMessage.startsWith("*")) {
|
||||
// allow using * to ignore a message comparison
|
||||
return;
|
||||
}
|
||||
|
||||
// Deal with the case where the message has variable parts within it
|
||||
// marked with the characters ***. Here we tokenize the expected string
|
||||
// and make sure all the individual parts are present in the results string
|
||||
String expectedMessageParts[] = expectedMessage.split("\\*\\*\\*");
|
||||
|
||||
if (expectedMessageParts.length > 1){
|
||||
int foundParts = 0;
|
||||
for(int i = 0; i < expectedMessageParts.length; i++){
|
||||
if (receivedMessage.indexOf(expectedMessageParts[i]) > -1 ){
|
||||
foundParts++;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundParts == expectedMessageParts.length){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Deal with the case where the end of the message is variable (eg contains absolute filenames)
|
||||
// and where the only relevant part is the start of the message - in this case the expected
|
||||
// message only contains the stem section which is unchanging...
|
||||
if( receivedMessage.length() > expectedMessage.length() ) {
|
||||
// Truncate the received message to the length of the expected message
|
||||
receivedMessage = receivedMessage.substring(0, expectedMessage.length() );
|
||||
} // end if
|
||||
|
||||
if (!expectedMessage.equals(receivedMessage)) {
|
||||
writeIncorrectMessage(testName, expectedMessage, receivedMessage);
|
||||
}
|
||||
|
||||
assertEquals( expectedMessage, receivedMessage );
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
protected void writeMissingMessage(String testName, Throwable ex) {
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestMissingMsgs.txt", true));
|
||||
out.write(testName + "=*");
|
||||
out.newLine();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
protected void writeIncorrectMessage(String testName, String expected, String received) {
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestIncorrectMsgs.txt", true));
|
||||
out.write(testName); out.newLine();
|
||||
out.write(" " + expected); out.newLine();
|
||||
out.write(" " + received); out.newLine();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
protected String getErrorMessage(Throwable ex) {
|
||||
String errorMessage = null;
|
||||
|
||||
if (ex instanceof TestException_Exception) {
|
||||
TestException_Exception te = (TestException_Exception) ex;
|
||||
errorMessage = te.getFaultInfo().getMessage();
|
||||
} else {
|
||||
errorMessage = ex.getMessage();
|
||||
}
|
||||
|
||||
return errorMessage;
|
||||
}
|
||||
} // end class TuscanyRuntimeBridge
|
|
@ -0,0 +1,30 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# OASIS SCA Assembly test properties
|
||||
# The implementation type to use for Assembly test suite
|
||||
# org.oasis.sca.tests.assembly.lang=BPEL
|
||||
org.oasis.sca.tests.assembly.lang=Java
|
||||
|
||||
# The class to use as the Runtime Bridge for the SCA runtime under test
|
||||
#org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyOSGiRuntimeBridge
|
||||
org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyRuntimeBridge
|
||||
|
||||
# The location of the contributions for the test suite
|
||||
# %1 represents the placement of the name of each contribution into the location URI
|
||||
org.oasis.sca.tests.assembly.contribution.location=target/oasis-contributions/%1.zip
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
BJM_3001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3001, Artifact: Test_BJM_3001.composite] - URI must start with the scheme jms: for uri: http://test.sca.oasisopen.org/
|
||||
BJM_3002=Test service got an exception during execution: org.apache.tuscany.sca.binding.jms.JMSBindingException JMS Destination jndi:BJM_3002_Queue not found with create mode of "ifnotexist" while registering binding Reference1 invoker
|
||||
BJM_3003=No error expected
|
||||
BJM_3004=No error expected
|
||||
BJM_3005=No error expected
|
||||
BJM_3010=**testcase incomplete**
|
||||
BJM_3011=org.apache.tuscany.sca.binding.jms.JMSBindingException: Error starting JMSServiceBinding
|
||||
BJM_3012=**testcase incomplete**
|
||||
BJM_3013=org.apache.tuscany.sca.binding.jms.JMSBindingException: Error starting JMSServiceBinding
|
||||
BJM_3014=**testcase incomplete**
|
||||
BJM_3015=**testcase incomplete**
|
||||
BJM_3017=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3017, Artifact: Test_BJM_3017.composite] - XMLSchema validation error occured in: Test_BJM_3017.composite ,line = 36, column = 17, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'activationSpec'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":response, "http://docs.oasis-open.org/ns/opencsa/sca/200912":headers, "http://docs.oasis-open.org/ns/opencsa/sca/200912":messageSelection, "http://docs.oasis-open.org/ns/opencsa/sca/200912":resourceAdapter, "http://docs.oasis-open.org/ns/opencsa/sca/200912":operationProperties}' is expected.
|
||||
BJM_3018=**testcase incomplete**
|
||||
BJM_3019=**testcase incomplete**
|
||||
BJM_3020=**testcase incomplete**
|
||||
BJM_3021=**testcase incomplete**
|
||||
BJM_3022=**testcase incomplete**
|
||||
BJM_3023=**testcase incomplete**
|
||||
BJM_3024=**testcase incomplete**
|
||||
BJM_3025=**testcase incomplete**
|
||||
BJM_3026=**testcase incomplete**
|
||||
BJM_3029=**testcase incomplete**
|
||||
BJM_3034=**testcase incomplete**
|
||||
BJM_3037=**testcase incomplete**
|
||||
BJM_4011=*
|
||||
|
||||
|
119
sandbox/sebastien/java/embed/compliance-tests/binding-ws/pom.xml
Normal file
119
sandbox/sebastien/java/embed/compliance-tests/binding-ws/pom.xml
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT 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-compliance-tests</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>tuscany-compliance-test-binding-ws</artifactId>
|
||||
<name>Apache Tuscany SCA Specification Compliance Tests Binding WS</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<!-- This is only needed to get the module working in Eclipse which doesn't pick it up from the dependency plugin unpack -->
|
||||
<!-- The dependency plugin unpack is needed as presently the surefire plugin wont run tests in a dependency jar -->
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-binding-ws-test-runner</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tuscany.sca.shades</groupId>
|
||||
<artifactId>tuscany-base</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- This is need when running with Sun JDK which gets an unsupported operation exception creating an XMLStreamReader from a DOMSource
|
||||
when Tuscany is writing a property value -->
|
||||
<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>
|
||||
|
||||
<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-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-binding-ws-contributions</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${project.build.directory}/oasis-contributions</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.tuscany.sca</groupId>
|
||||
<artifactId>oasis-binding-ws-test-runner</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<excludes>commons-logging.properties,oasis-sca-tests.properties</excludes>
|
||||
<outputDirectory>${project.build.directory}/test-classes</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
*
|
||||
* Copyright(C) OASIS(R) 2005,2010. All Rights Reserved.
|
||||
* OASIS trademark, IPR and other policies apply.
|
||||
*
|
||||
-->
|
||||
<!--
|
||||
* This DTD forms part of the SCA Web Service Binding Test Suite.
|
||||
* It declares a number of XML Entities which are used in Entity References in some of the
|
||||
* composites that are artifacts used in the testcases.
|
||||
*
|
||||
* The values declared in the Entity References are intended to reflect SCA runtime specific
|
||||
* values for certain aspects of the composites at runtime - in particular addresses of some
|
||||
* services.
|
||||
*
|
||||
* It is permitted - indeed it is expected - that an SCA runtime provider will MODIFY the values
|
||||
* declared for the Entity References to match the values which would be expected when running the
|
||||
* SCA Web Service Binding test suite against a given SCA runtime. The values held in the this file are
|
||||
* examples, derived from running the test suite against the Apache Tuscany SCA runtime.
|
||||
-->
|
||||
<!-- Address of the Web service provided by component "BWS_2004Component2" in Test_BWS_2004 composite -->
|
||||
<!ENTITY ws_addr_2004 "http://localhost:8080/TEST_BWS_2004Component2/Service1">
|
||||
<!-- Address of the Web service provided by component "BWS_2006Component2" in Test_BWS_2006 composite -->
|
||||
<!ENTITY ws_addr_2006_A "http://localhost:8080/TEST_BWS_2006Component2/Service1">
|
||||
<!-- Address of the Web service provided by component "BWS_2006Component3" in Test_BWS_2006 composite -->
|
||||
<!ENTITY ws_addr_2006_B "http://localhost:8080/TEST_BWS_2006Component3/Service1">
|
||||
<!-- Address of the Web service provided by the client for a range of BWS testcases -->
|
||||
<!ENTITY ws_addr_client_1 "http://localhost:9081/JAXWS/Service1">
|
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES 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.otest;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.tuscany.sca.node.Contribution;
|
||||
import org.apache.tuscany.sca.node.ContributionLocationHelper;
|
||||
import org.apache.tuscany.sca.node.Node;
|
||||
import org.apache.tuscany.sca.node.NodeFactory;
|
||||
|
||||
import client.RuntimeBridge;
|
||||
import client.TestConfiguration;
|
||||
|
||||
/**
|
||||
* An implementation of the Runtime Bridge for the Apache Tuscany SCA runtime (version 2.x)
|
||||
*
|
||||
*/
|
||||
public class TuscanyRuntimeBridge implements RuntimeBridge {
|
||||
|
||||
static final String CONTRIBUTION_LOCATION_PROPKEY = "OASIS_TESTENV_CONTRIBUTION_LOCATION";
|
||||
|
||||
protected NodeFactory launcher;
|
||||
protected Node node;
|
||||
protected Properties expectedErrorMessages;
|
||||
|
||||
TestConfiguration testConfiguration = null;
|
||||
|
||||
public TuscanyRuntimeBridge() {
|
||||
// read test error mapping
|
||||
expectedErrorMessages = new Properties();
|
||||
try {
|
||||
InputStream propertiesStream = this.getClass().getResourceAsStream("/tuscany-oasis-sca-tests-errors.properties");
|
||||
expectedErrorMessages.load(propertiesStream);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Unable to read oasis-sca-tests-errors.properties file");
|
||||
}
|
||||
}
|
||||
|
||||
public TestConfiguration getTestConfiguration() {
|
||||
return testConfiguration;
|
||||
}
|
||||
|
||||
public void setTestConfiguration(TestConfiguration testConfiguration) {
|
||||
this.testConfiguration = testConfiguration;
|
||||
}
|
||||
|
||||
public boolean startContribution(String compositeName,
|
||||
String contributionLocation, String[] contributionNames)
|
||||
throws Exception {
|
||||
//TODO:
|
||||
return startContribution(contributionLocation, contributionNames);
|
||||
}
|
||||
|
||||
public boolean startContribution(String contributionLocation, String[] contributionNames) throws Exception {
|
||||
try {
|
||||
// Tuscany specific code which starts the contribution(s) holding the test
|
||||
Properties ps = new Properties();
|
||||
ps.setProperty("defaultScheme", "vm");
|
||||
ps.setProperty("org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSBindingProviderFactory.defaultPort", "8080");
|
||||
launcher = NodeFactory.newInstance(ps);
|
||||
|
||||
Contribution[] contributions = new Contribution[contributionNames.length];
|
||||
String[] contributionURIs = getContributionURIs(contributionLocation);
|
||||
for (int i = 0; i < contributions.length; i++) {
|
||||
contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]);
|
||||
} // end for
|
||||
|
||||
node = launcher.createNode(testConfiguration.getComposite(), contributions);
|
||||
// Start the node
|
||||
node.start();
|
||||
|
||||
// For debugging
|
||||
// print out the composites that have been read in success cases
|
||||
// System.out.println(((NodeImpl)node).dumpDomainComposite());
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
} // end try
|
||||
|
||||
return true;
|
||||
} // end method startContribution
|
||||
|
||||
/**
|
||||
* Gets the location of the Contributions as URIs
|
||||
* @param contributionLocation - a location pattern URI, which contains one or more "%1"
|
||||
* substrings, which are substituted with the name of the contribution to get the URI of
|
||||
* the contribution
|
||||
* @return the contribution locations as an array of Strings
|
||||
*/
|
||||
protected String[] getContributionURIs(String contributionLocation) throws Exception {
|
||||
String[] locations;
|
||||
locations = testConfiguration.getContributionNames();
|
||||
|
||||
if (locations != null && contributionLocation != null) {
|
||||
|
||||
for (int i = 0; i < locations.length; i++) {
|
||||
String aLocation = contributionLocation.replaceAll("%1", locations[i]);
|
||||
// Looks like bugs in the oasis code that sometimes still uses jars for some
|
||||
if (aLocation.endsWith("_POJO.zip") && !aLocation.endsWith("ASM_8005_Java-1.0.zip")) {
|
||||
aLocation = aLocation.substring(0, aLocation.length()-3) + "jar";
|
||||
}
|
||||
if (!(new File(aLocation)).exists()) {
|
||||
aLocation = aLocation.replace(".zip", ".jar");
|
||||
}
|
||||
locations[i] = aLocation;
|
||||
} // end for
|
||||
} else {
|
||||
if (locations == null) {
|
||||
// No contribution specified - throw an Exception
|
||||
throw new Exception("Unable to start SCA runtime - no contribution supplied - error");
|
||||
} else {
|
||||
// No contribution location supplied - throw an Exception
|
||||
throw new Exception("Unable to start SCA runtime - no contribution location supplied - error");
|
||||
} // end if
|
||||
} // end if
|
||||
|
||||
return locations;
|
||||
} // end getContributionURI
|
||||
|
||||
public void stopContribution() {
|
||||
if (node != null) {
|
||||
node.stop();
|
||||
} // end if
|
||||
if (launcher != null) {
|
||||
launcher.destroy();
|
||||
} // end if
|
||||
} // end method stopContribution
|
||||
|
||||
public String getContributionLocation(Class<?> testClass) {
|
||||
return ContributionLocationHelper.getContributionLocation(testConfiguration.getTestClass());
|
||||
} // end method getContributionLocation
|
||||
|
||||
public void checkError(String testName, Throwable ex) throws Throwable {
|
||||
|
||||
String expectedMessage = expectedErrorMessages.getProperty(testName);
|
||||
String receivedMessage = ex.getMessage();
|
||||
|
||||
if (expectedMessage == null){
|
||||
writeMissingMessage(testName, ex);
|
||||
fail("Null expected error message for test " + testName +
|
||||
"Please add message to oasis-sca-tests-errors.properties");
|
||||
} // end if
|
||||
|
||||
if (receivedMessage == null){
|
||||
ex.printStackTrace();
|
||||
fail("Null received error message for test " + testName);
|
||||
} // end if
|
||||
|
||||
if (expectedMessage.startsWith("*")) {
|
||||
// allow using * to ignore a message comparison
|
||||
return;
|
||||
}
|
||||
|
||||
// Deal with the case where the message has variable parts within it
|
||||
// marked with the characters ***. Here we tokenize the epected string
|
||||
// and make sure all the individual parts are present in the results string
|
||||
String expectedMessageParts[] = expectedMessage.split("\\*\\*\\*");
|
||||
|
||||
if (expectedMessageParts.length > 1){
|
||||
int foundParts = 0;
|
||||
for(int i = 0; i < expectedMessageParts.length; i++){
|
||||
if (receivedMessage.indexOf(expectedMessageParts[i]) > -1 ){
|
||||
foundParts++;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundParts == expectedMessageParts.length){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Deal with the case where the end of the message is variable (eg contains absolute filenames)
|
||||
// and where the only relevant part is the start of the message - in this case the expected
|
||||
// message only contains the stem section which is unchanging...
|
||||
if( receivedMessage.length() > expectedMessage.length() ) {
|
||||
// Truncate the received message to the length of the expected message
|
||||
receivedMessage = receivedMessage.substring(0, expectedMessage.length() );
|
||||
} // end if
|
||||
|
||||
if (!expectedMessage.equals(receivedMessage)) {
|
||||
writeIncorrectMessage(testName, expectedMessage, receivedMessage);
|
||||
}
|
||||
|
||||
assertEquals( expectedMessage, receivedMessage );
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
protected void writeMissingMessage(String testName, Throwable ex) {
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestMissingMsgs.txt", true));
|
||||
out.write(testName + "=*");
|
||||
out.newLine();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
protected void writeIncorrectMessage(String testName, String expected, String received) {
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestIncorrectMsgs.txt", true));
|
||||
out.write(testName); out.newLine();
|
||||
out.write(" " + expected); out.newLine();
|
||||
out.write(" " + received); out.newLine();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
} // end class TuscanyRuntimeBridge
|
|
@ -0,0 +1,30 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# OASIS SCA Assembly test properties
|
||||
# The implementation type to use for Assembly test suite
|
||||
# org.oasis.sca.tests.assembly.lang=BPEL
|
||||
org.oasis.sca.tests.assembly.lang=Java
|
||||
|
||||
# The class to use as the Runtime Bridge for the SCA runtime under test
|
||||
#org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyOSGiRuntimeBridge
|
||||
org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyRuntimeBridge
|
||||
|
||||
# The location of the contributions for the test suite
|
||||
# %1 represents the placement of the name of each contribution into the location URI
|
||||
org.oasis.sca.tests.assembly.contribution.location=target/oasis-contributions/%1.zip
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue