You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/10/04 03:11:35 UTC
svn commit: r581755 - in /incubator/tuscany/java/sca/demos: ./ xml-bigbank/
xml-bigbank/src/ xml-bigbank/src/main/ xml-bigbank/src/main/java/
xml-bigbank/src/main/java/bigbank/ xml-bigbank/src/main/resources/
xml-bigbank/src/main/resources/wsdl/
Author: rfeng
Date: Wed Oct 3 18:11:33 2007
New Revision: 581755
URL: http://svn.apache.org/viewvc?rev=581755&view=rev
Log:
Add a demo to showcase a plain XML integration story
Added:
incubator/tuscany/java/sca/demos/xml-bigbank/ (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset
incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER
incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE
incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE
incubator/tuscany/java/sca/demos/xml-bigbank/build.xml (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml (with props)
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/
incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
Modified:
incubator/tuscany/java/sca/demos/pom.xml
Modified: incubator/tuscany/java/sca/demos/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/pom.xml?rev=581755&r1=581754&r2=581755&view=diff
==============================================================================
--- incubator/tuscany/java/sca/demos/pom.xml (original)
+++ incubator/tuscany/java/sca/demos/pom.xml Wed Oct 3 18:11:33 2007
@@ -42,6 +42,7 @@
<module>bigbank-stockquote</module>
<module>mortgage-creditcheck</module>
<module>mortgage-loanapproval</module>
+ <module>xml-bigbank</module>
</modules>
</profile>
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 3 18:11:33 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+work
Added: incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset Wed Oct 3 18:11:33 2007
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ruleset name="pmd-eclipse">
+ <description>PMD Plugin preferences rule set</description>
+
+
+ <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
+ <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
+ <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/>
+<!--<rule ref="rulesets/basic.xml/EmptyCatchBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyIfStmt"/>-->
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/>
+<!--<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyTryBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>-->
+ <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/>
+ <rule ref="rulesets/basic.xml/JumbledIncrementer"/>
+<!--<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>-->
+ <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
+ <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
+<!--<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>-->
+
+<!--<rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>-->
+
+<!--<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>-->
+<!--<rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>-->
+<!--<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>-->
+
+<!--<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>-->
+<!--<rule ref="rulesets/codesize.xml/TooManyFields"/>-->
+
+<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
+<!--<rule ref="rulesets/controversial.xml/AtLeastOneConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/CallSuperInConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/DontImportSun"/>-->
+<!--<rule ref="rulesets/controversial.xml/NullAssignment"/>-->
+<!--<rule ref="rulesets/controversial.xml/OnlyOneReturn"/>-->
+<!--<rule ref="rulesets/controversial.xml/SingularField"/>-->
+<!--<rule ref="rulesets/controversial.xml/SuspiciousOctalEscape"/>-->
+<!--<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>-->
+<rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
+<!--<rule ref="rulesets/controversial.xml/UnusedModifier"/>-->
+
+<!--<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>-->
+<!--<rule ref="rulesets/coupling.xml/ExcessiveImports"/>-->
+<!--<rule ref="rulesets/coupling.xml/LooseCoupling"/>-->
+
+<!--<rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>-->
+<!--<rule ref="rulesets/design.xml/AccessorClassGeneration"/>-->
+<!--<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>-->
+<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
+<!--<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
+<!--<rule ref="rulesets/design.xml/BadComparison"/>-->
+<!--<rule ref="rulesets/design.xml/CloseConnection"/>-->
+<!--<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>-->
+<!--<rule ref="rulesets/design.xml/ConfusingTernary"/>-->
+<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
+<!--<rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>-->
+<!--<rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>-->
+<rule ref="rulesets/design.xml/IdempotentOperations"/>
+<!--<rule ref="rulesets/design.xml/ImmutableField"/>-->
+<!--<rule ref="rulesets/design.xml/InstantiationToGetClass"/>-->
+<!--<rule ref="rulesets/design.xml/MissingBreakInSwitch"/>-->
+<!--<rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>-->
+<!--<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>-->
+<!--<rule ref="rulesets/design.xml/NonStaticInitializer"/>-->
+<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
+<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
+<rule ref="rulesets/design.xml/SimplifyConditional"/>
+<!--<rule ref="rulesets/design.xml/SwitchDensity"/>-->
+<!--<rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>-->
+<!--<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>-->
+<!--<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>-->
+<!--<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>-->
+<!--<rule ref="rulesets/design.xml/UseSingleton"/>-->
+
+<!--<rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/>-->
+<!--<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>-->
+
+<!--<rule ref="rulesets/imports.xml/DuplicateImports"/>-->
+<!--<rule ref="rulesets/imports.xml/DontImportJavaLang"/>-->
+<!--<rule ref="rulesets/imports.xml/UnusedImports"/>-->
+<!--<rule ref="rulesets/imports.xml/ImportFromSamePackage"/>-->
+
+<!--<rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/>-->
+<!--<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>-->
+
+<!--<rule ref="rulesets/junit.xml/JUnitStaticSuite"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitSpelling"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitAssertionsShouldIncludeMessage"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/>-->
+<!--<rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/>-->
+<!--<rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>-->
+
+ <!--<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LogBlockWithoutIf"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/SystemPrintln"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/ProperLogger"/>-->
+
+ <!--<rule ref="rulesets/naming.xml/ShortVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/LongVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/ShortMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/VariableNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/ClassNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/AbstractNaming"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidDollarSigns"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>-->
+ <!--<rule ref="rulesets/naming.xml/NoPackage"/>-->
+ <!--<rule ref="rulesets/naming.xml/PackageCase"/>-->
+
+ <!--<rule ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>-->
+
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>-->
+
+ <!--<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringInstantiation"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringToString"/>-->
+ <!--<rule ref="rulesets/strings.xml/AvoidConcatenatingNonLiteralsInStringBuffer"/>-->
+ <!--<rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>-->
+
+ <!--<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>-->
+ <!--<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>-->
+
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
+ <!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>-->
+
+</ruleset>
Added: incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER Wed Oct 3 18:11:33 2007
@@ -0,0 +1,8 @@
+Apache Tuscany is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the ASF.
+
Added: incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE Wed Oct 3 18:11:33 2007
@@ -0,0 +1,205 @@
+
+ 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.
+
+
+
Added: incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE Wed Oct 3 18:11:33 2007
@@ -0,0 +1,6 @@
+${pom.name}
+Copyright (c) 2005 - 2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
Added: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/build.xml?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/build.xml (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/build.xml Wed Oct 3 18:11:33 2007
@@ -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.
+-->
+<project name="xml-bigbank" default="compile">
+ <property name="test.class" value="bigbank.BigBankClient" />
+ <property name="test.jar" value="demo-xml-bigbank.jar" />
+
+ <target name="init">
+ <mkdir dir="target/classes" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5">
+ <classpath>
+ <pathelement location="../../lib/tuscany-sca-manifest.jar" />
+ </classpath>
+ </javac>
+ <copy todir="target/classes">
+ <fileset dir="src/main/resources" />
+ </copy>
+ <jar destfile="target/${test.jar}" basedir="target/classes">
+ <manifest>
+ <attribute name="Main-Class" value="${test.class}" />
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="run-classes">
+ <java classname="${test.class}" fork="true">
+ <classpath>
+ <pathelement path="target/classes" />
+ <pathelement location="../../lib/tuscany-sca-manifest.jar" />
+ </classpath>
+ </java>
+ </target>
+
+ <target name="run">
+ <java classname="${test.class}" fork="true">
+ <classpath>
+ <pathelement path="target/${test.jar}" />
+ <pathelement location="../../lib/tuscany-sca-manifest.jar" />
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="target" />
+ </delete>
+ </target>
+</project>
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml Wed Oct 3 18:11:33 2007
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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-demos</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>demo-xml-bigbank</artifactId>
+ <packaging>jar</packaging>
+ <name>Apache Tuscany SCA XML BigBank Demo</name>
+ <description>Apache Tuscany SCA XML BigBank Demo</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-feed</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>rome</groupId>
+ <artifactId>rome</artifactId>
+ <version>0.9</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-saxon</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-xquery</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+
+
+</project>
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import java.io.IOException;
+
+import javax.xml.stream.XMLStreamReader;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface AccountData {
+ XMLStreamReader getAccounts() throws IOException;
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Service(AccountData.class)
+public class AccountDataImpl implements AccountData {
+ private XMLInputFactory factory = XMLInputFactory.newInstance();
+
+ public XMLStreamReader getAccounts() throws IOException {
+ URL doc = getClass().getResource("/accounts.xml");
+ XMLStreamReader reader = null;
+ try {
+ reader = factory.createXMLStreamReader(doc.openStream());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return reader;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java Wed Oct 3 18:11:33 2007
@@ -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.
+ */
+package bigbank;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * This client program to invoke the Mortgage LoanApproval service
+ */
+public class BigBankClient {
+
+ public static void main(String[] args) throws Exception {
+
+ SCADomain domain = SCADomain.newInstance("BigBank.composite");
+ CustomerAsset ds = domain.getService(CustomerAsset.class, "CustomerAsset");
+
+ System.out.println("EUR: " + ds.getTotalValue("EUR"));
+ }
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class BigBankServer {
+ public static void main(String[] args) throws Exception {
+
+ System.out.println("Starting the BigBank Service...");
+
+ SCADomain domain = SCADomain.newInstance("http://localhost", "/", "BigBank.composite");
+
+ System.out.println("Press Enter to Exit...");
+ System.in.read();
+
+ domain.close();
+ System.out.println("Bye");
+ }
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import org.osoa.sca.annotations.Remotable;
+
+import com.sun.syndication.feed.atom.Feed;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface CurrencyExchange {
+ Feed getRates();
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java Wed Oct 3 18:11:33 2007
@@ -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 bigbank;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface CustomerAsset {
+ double getTotalValue(String currency);
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import java.io.StringReader;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathFactory;
+
+import org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node;
+import org.osoa.sca.ServiceRuntimeException;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+import org.w3c.dom.Node;
+
+import com.sun.syndication.feed.atom.Entry;
+import com.sun.syndication.feed.atom.Feed;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Service(CustomerAsset.class)
+public class CustomerAssetImpl implements CustomerAsset {
+ private XMLInputFactory factory = XMLInputFactory.newInstance();
+
+ @Reference(required = false)
+ protected CurrencyExchange exchangeRate;
+
+ @Reference
+ protected StockQuote stockQuote;
+
+ @Reference(required = false)
+ protected AccountData accountData;
+
+ @Reference
+ protected StockValue stockValue;
+
+ public double getTotalValue(String currency) {
+ try {
+ System.out.println("Retrieving exchange rate...");
+ Feed feed = exchangeRate.getRates();
+ Entry entry = (Entry)feed.getEntries().get(0);
+ String rateTable = entry.getSummary().getValue();
+ // System.out.println(rateTable);
+ XMLStreamReader rates = factory.createXMLStreamReader(new StringReader(rateTable));
+ XMLStreamReader2Node t = new XMLStreamReader2Node();
+ Node node = t.transform(rates, null);
+ XPath path = XPathFactory.newInstance().newXPath();
+ XPathExpression exp = path.compile("/TABLE/TR[TD[1]='" + currency.toUpperCase() + "']/TD[2]");
+ Node rateNode = (Node)exp.evaluate(node, XPathConstants.NODE);
+ double rate = Double.valueOf(rateNode.getTextContent().trim());
+ System.out.println("Exchange rate: USD 1.0=" + currency + " " + rate);
+
+ System.out.println("Loading account data...");
+ XMLStreamReader accounts = accountData.getAccounts();
+
+ System.out.println("Getting stock quote...");
+ String ticker =
+ "<q:GetQuotes xmlns:q=\"http://swanandmokashi.com\"><q:QuoteTicker>IBM,GOOG,MSFT</q:QuoteTicker></q:GetQuotes>";
+ XMLStreamReader request = factory.createXMLStreamReader(new StringReader(ticker));
+
+ XMLStreamReader quotes = stockQuote.GetStockQuotes(request);
+
+ System.out.println("Calculating total value...");
+ double value = stockValue.calculate(quotes, accounts);
+
+ System.out.println("Total Value=USD " + value);
+
+ return value * rate;
+ } catch (Exception e) {
+ throw new ServiceRuntimeException(e);
+ }
+ }
+
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import javax.xml.stream.XMLStreamReader;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface StockQuote {
+ public XMLStreamReader GetStockQuotes(XMLStreamReader input);
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java Wed Oct 3 18:11:33 2007
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bigbank;
+
+import javax.xml.stream.XMLStreamReader;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface StockValue {
+ double calculate(XMLStreamReader quotes, XMLStreamReader accounts);
+}
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite Wed Oct 3 18:11:33 2007
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://bigbank" name="BigBank">
+
+ <component name="CustomerAsset">
+ <implementation.java class="bigbank.CustomerAssetImpl" />
+ <reference name="accountData" target="AccountData" />
+ <reference name="stockValue" target="StockValue" />
+
+ <reference name="exchangeRate">
+ <tuscany:binding.rss
+ uri="http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S" />
+ </reference>
+ </component>
+
+ <component name="AccountData">
+ <implementation.java class="bigbank.AccountDataImpl" />
+ </component>
+
+ <component name="StockValue">
+ <tuscany:implementation.xquery location="stock.xq" />
+ <!--
+ <property name="currency">USD</property>
+ -->
+ </component>
+
+ <reference name="StockQuoteReference" promote="CustomerAsset/stockQuote">
+ <binding.ws wsdlElement="http://swanandmokashi.com#wsdl.port(StockQuotes/StockQuotesSoap)" />
+ </reference>
+
+</composite>
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml Wed Oct 3 18:11:33 2007
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<customer id="123" xmlns="http://example.com/customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <firstName>John</firstName>
+ <lastName>Smith</lastName>
+ <accounts>
+ <checking id="C01" balance="1000.0"></checking>
+ <saving id="S01" balance="20000.0"></saving>
+ <stock symbol="IBM" quantity="500" />
+ <stock symbol="MSFT" quantity="200" />
+ </accounts>
+</customer>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd Wed Oct 3 18:11:33 2007
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://exmaple.com/customer"
+ targetNamespace="http://exmaple.com/customer" elementFormDefault="qualified">
+ <element name="customer" type="tns:Customer" />
+ <complexType name="Customer">
+ <sequence>
+ <element name="id" type="string"></element>
+ <element name="firstName" type="string"></element>
+ <element name="lastName" type="string"></element>
+ <element name="accounts" type="string"></element>
+ </sequence>
+ </complexType>
+ <complexType name="Accounts">
+ <choice>
+ <element name="checking" type="tns:Account"></element>
+ <element name="saving" type="tns:Account"></element>
+ <element name="stock" type="tns:Stock"></element>
+ </choice>
+ </complexType>
+ <complexType name="Account">
+ <attribute name="id" type="string"></attribute>
+ <attribute name="balance" type="float"></attribute>
+ </complexType>
+ <complexType name="Stock">
+ <attribute name="symbol" type="string"></attribute>
+ <attribute name="quantity" type="int"></attribute>
+ </complexType>
+</schema>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml Wed Oct 3 18:11:33 2007
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<GetQuotesResponse xmlns="http://swanandmokashi.com">
+ <GetQuotesResult>
+ <Quote>
+ <CompanyName>INTL BUSINESS MAC</CompanyName>
+ <StockTicker>IBM</StockTicker>
+ <StockQuote>116.40</StockQuote>
+ <LastUpdated>10/3/2007 4:01pm</LastUpdated>
+ <Change>-1.96</Change>
+ <OpenPrice>117.65</OpenPrice>
+ <DayHighPrice>117.84</DayHighPrice>
+ <DayLowPrice>116.28</DayLowPrice>
+ <Volume>7892471</Volume>
+ <MarketCap>158.4B</MarketCap>
+ <YearRange>81.56 - 119.60</YearRange>
+ <ExDividendDate>Aug 8</ExDividendDate>
+ <DividendYield>1.18</DividendYield>
+ <DividendPerShare>1.40</DividendPerShare>
+ <PercentChange>-1.66%</PercentChange>
+ </Quote>
+ <Quote>
+ <CompanyName>GOOGLE</CompanyName>
+ <StockTicker>GOOG</StockTicker>
+ <StockQuote>584.0199</StockQuote>
+ <LastUpdated>10/3/2007 4:00pm</LastUpdated>
+ <Change>-0.3701</Change>
+ <OpenPrice>586.25</OpenPrice>
+ <DayHighPrice>588.99</DayHighPrice>
+ <DayLowPrice>580.36</DayLowPrice>
+ <Volume>3869172</Volume>
+ <MarketCap>182.3B</MarketCap>
+ <YearRange>398.19 - 596.81</YearRange>
+ <ExDividendDate>N/A</ExDividendDate>
+ <DividendYield>N/A</DividendYield>
+ <DividendPerShare>0.00</DividendPerShare>
+ <PercentChange>-0.06%</PercentChange>
+ </Quote>
+ <Quote>
+ <CompanyName>MICROSOFT CP</CompanyName>
+ <StockTicker>MSFT</StockTicker>
+ <StockQuote>29.4525</StockQuote>
+ <LastUpdated>10/3/2007 4:00pm</LastUpdated>
+ <Change>-0.2475</Change>
+ <OpenPrice>29.57</OpenPrice>
+ <DayHighPrice>29.85</DayHighPrice>
+ <DayLowPrice>29.29</DayLowPrice>
+ <Volume>37324944</Volume>
+ <MarketCap>276.1B</MarketCap>
+ <YearRange>26.60 - 31.84</YearRange>
+ <ExDividendDate>Aug 14</ExDividendDate>
+ <DividendYield>1.35</DividendYield>
+ <DividendPerShare>0.40</DividendPerShare>
+ <PercentChange>-0.83%</PercentChange>
+ </Quote>
+ </GetQuotesResult>
+</GetQuotesResponse>
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq Wed Oct 3 18:11:33 2007
@@ -0,0 +1,52 @@
+(:
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+:)
+declare namespace q="http://swanandmokashi.com";
+declare namespace c="http://example.com/customer";
+declare namespace stock="scaservice:java/bigbank.StockValue";
+(: declare namespace currency="scaproperty:java/java.lang.String"; :)
+
+declare function stock:calculate($quoteDoc, $accountDoc) {
+ let $checking :=
+ trace(
+ sum(
+ for $a in $accountDoc/c:customer/c:accounts/c:checking
+ return $a/@balance
+ ), "Checking Balance")
+
+ let $saving :=
+ trace(
+ sum(
+ for $a in $accountDoc/c:customer/c:accounts/c:saving
+ return $a/@balance
+ ), "Saving Blance")
+
+ let $value :=
+ trace(
+ sum(
+ for $quote in $quoteDoc/q:GetQuotesResponse/q:GetQuotesResult/q:Quote,
+ $account in $accountDoc/c:customer/c:accounts/c:stock
+ where string($quote/q:StockTicker) = string($account/@symbol)
+ return
+ trace(number($quote/q:StockQuote),"Stock Price") * trace(number($account/@quantity), "Quantity")
+ ), "Stock Value")
+ return trace($checking + $saving + $value, "Total Value")
+};
+
+
+
Added: incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl?rev=581755&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl (added)
+++ incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl Wed Oct 3 18:11:33 2007
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://swanandmokashi.com" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://swanandmokashi.com"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://swanandmokashi.com">
+ <s:element name="GetQuotes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="QuoteTicker" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuotesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetQuotesResult" type="tns:ArrayOfQuote" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfQuote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Quote" type="tns:Quote" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Quote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="CompanyName" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="StockTicker" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="StockQuote" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="LastUpdated" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Change" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="OpenPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="DayHighPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="DayLowPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Volume" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="MarketCap" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="YearRange" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="ExDividendDate" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="DividendYield" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="DividendPerShare" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="PercentChange" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="ArrayOfQuote" nillable="true" type="tns:ArrayOfQuote" />
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="GetQuotesSoapIn">
+ <wsdl:part name="parameters" element="tns:GetQuotes" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesSoapOut">
+ <wsdl:part name="parameters" element="tns:GetQuotesResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpGetIn">
+ <wsdl:part name="QuoteTicker" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpGetOut">
+ <wsdl:part name="Body" element="tns:ArrayOfQuote" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpPostIn">
+ <wsdl:part name="QuoteTicker" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpPostOut">
+ <wsdl:part name="Body" element="tns:ArrayOfQuote" />
+ </wsdl:message>
+ <wsdl:portType name="StockQuotesSoap">
+ <wsdl:operation name="GetStockQuotes">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Retrieves the latest(20 minutes delay) stock quote of a stock ticker. To get multiple quotes enter
+ Ticker symbols seperated by ,(eg. MSFT,YHOO,GE) or space (eg. MSFT YHOO GE). <BR>Gives the company
+ name ,ticker,Stock Quote, Change,Open price ,Day's range(high and low),Volume, the Market Cap and the
+ Year range of the stock price.<BR><B>Powered by Yahoo!'s stock Quotes service.Not for
+ commerical use.</b>
+ </documentation>
+ <wsdl:input name="GetQuotes" message="tns:GetQuotesSoapIn" />
+ <wsdl:output name="GetQuotes" message="tns:GetQuotesSoapOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="StockQuotesSoap" type="tns:StockQuotesSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="GetStockQuotes">
+ <soap:operation soapAction="http://swanandmokashi.com/GetQuotes" style="document" />
+ <wsdl:input name="GetQuotes">
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="GetQuotes">
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+
+ <wsdl:service name="StockQuotes">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
+ <wsdl:port name="StockQuotesSoap" binding="tns:StockQuotesSoap">
+ <soap:address location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </wsdl:port>
+
+
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org
Re: A demo application to showcase our XML integration story
Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
>
>>
>> - I think we should try to remove all Java code from the demo and try
>> to implement CustomerAsset (or AccountService) as a BPEL process or
>> an XQuery function.
>>
>
> Ant was proposing to have a java script component :-). I'm open.
>
I am proposing BPEL and/or XQuery here was the focus of XML-Bigbank is
XML programming models, but It would be nice to have a variation of that
demo with a Web 2.0 + scripting focus, with Javascript in the browser, a
popular server-side scripting language - note that I didn't say
Javascript again :) - and data/script integration in the various scripts.
>> and a question:
>>
>> - What would it take to return Account summary complex documents from
>> the AccountService instead of just a number? Can we do this without
>> having to generate any code?
>
> We could try to return the AccountReport (w/ a list account summaries).
+1 this is what the original Bigbank app was doing.
> If we don't want to code-gen, then we could use DOM, AXIOM or even
> XMLStreamReader. Or we could use XQuery or XSLT to produce HTML.
>
> I'm wondering if code-gen is always a bad thing. On one hand, it
> complicates the story a bit,
If it complicates the story it's a bad thing, and why would I need a
Java compiler to compile my XML app?
> but on the other hand, it demonstrates that application developers
> have the freedom of choices if they prefer strong-typed representation
> of XML infoset.
Yes application developers have the freedom to pick their poison :) but
we can use the Java version of Bigbank to show strongly (Java) type
representation of XML. Once we change that demo back to return Account
summary objects we can show SDO, JaxB etc.
>
>> (I'd like to do change the Java Bigbank demo to return account
>> summaries as well, like the original Bigbank scenario described in
>> the original spec docs)
>>
>> --
>> Jean-Sebastien
>>
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: A demo application to showcase our XML integration story
Posted by Raymond Feng <en...@gmail.com>.
Thank all of you for the feedback.
More comments inline.
Thanks,
Raymond
----- Original Message -----
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Monday, October 08, 2007 12:28 PM
Subject: Re: A demo application to showcase our XML integration story
> Raymond Feng wrote:
>> Hi,
>>
>> I put together a demo application to showcase our XML integration story.
>> The business scenario is derived from the bigbank demo and the main
>> function is to calculate the total value (using a selected currency) of a
>> customer who has checking/saving/stock accounts.
>>
>> At this moment, I add three different sources to provide XML data.
>>
>> 1) A live feed to retrieve the exchange rate (binding.feed) and use XPath
>> to exact the rate for a given currency. I have to use Rome API to convert
>> the feed as our feed binding produces Feed objects.
>>
>> 2) The account data for a customer is loaded from a XML file. (We can use
>> implementation.data once Sebastien's proposal is implemented).
>>
>> 3) A live Web Service invocation to get the quotes for a list of symbols.
>> Only XMLStreamReader is used as the input and output. (binding.ws)
>>
>> 4) The calculation of the total value is implemented using XQuery to join
>> the XML data from 2 and 3. (implementation.xquery)
>>
>> The demo application is checked in under r581755. I hope we can use it as
>> a test-bed to further drive our XML integration story. Please feel free
>> to chime in with your ideas, for example, add implementation.data or
>> implementation.das, or implementation.bpel.
>>
>> Thanks,
>> Raymond
>>
> A few comments:
>
> - This looks pretty good!
>
> - CustomerAsset looks like the AccountService from the Java Bigbank demo,
> if it's the same thing then it should be named AccountService to avoid any
> confusion and make the comparison easier.
+1. I renamed it to AccountService.
>
> - I think we should try to remove all Java code from the demo and try to
> implement CustomerAsset (or AccountService) as a BPEL process or an XQuery
> function.
>
Ant was proposing to have a java script component :-). I'm open.
> and a question:
>
> - What would it take to return Account summary complex documents from the
> AccountService instead of just a number? Can we do this without having to
> generate any code?
We could try to return the AccountReport (w/ a list account summaries). If
we don't want to code-gen, then we could use DOM, AXIOM or even
XMLStreamReader. Or we could use XQuery or XSLT to produce HTML.
I'm wondering if code-gen is always a bad thing. On one hand, it complicates
the story a bit, but on the other hand, it demonstrates that application
developers have the freedom of choices if they prefer strong-typed
representation of XML infoset.
> (I'd like to do change the Java Bigbank demo to return account summaries
> as well, like the original Bigbank scenario described in the original spec
> docs)
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: A demo application to showcase our XML integration story
Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
>
> I put together a demo application to showcase our XML integration
> story. The business scenario is derived from the bigbank demo and the
> main function is to calculate the total value (using a selected
> currency) of a customer who has checking/saving/stock accounts.
>
> At this moment, I add three different sources to provide XML data.
>
> 1) A live feed to retrieve the exchange rate (binding.feed) and use
> XPath to exact the rate for a given currency. I have to use Rome API
> to convert the feed as our feed binding produces Feed objects.
>
> 2) The account data for a customer is loaded from a XML file. (We can
> use implementation.data once Sebastien's proposal is implemented).
>
> 3) A live Web Service invocation to get the quotes for a list of
> symbols. Only XMLStreamReader is used as the input and output.
> (binding.ws)
>
> 4) The calculation of the total value is implemented using XQuery to
> join the XML data from 2 and 3. (implementation.xquery)
>
> The demo application is checked in under r581755. I hope we can use it
> as a test-bed to further drive our XML integration story. Please feel
> free to chime in with your ideas, for example, add implementation.data
> or implementation.das, or implementation.bpel.
>
> Thanks,
> Raymond
>
A few comments:
- This looks pretty good!
- CustomerAsset looks like the AccountService from the Java Bigbank
demo, if it's the same thing then it should be named AccountService to
avoid any confusion and make the comparison easier.
- I think we should try to remove all Java code from the demo and try to
implement CustomerAsset (or AccountService) as a BPEL process or an
XQuery function.
and a question:
- What would it take to return Account summary complex documents from
the AccountService instead of just a number? Can we do this without
having to generate any code?
(I'd like to do change the Java Bigbank demo to return account summaries
as well, like the original Bigbank scenario described in the original
spec docs)
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: A demo application to showcase our XML integration story
Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
>
>>
>> I'd quite like to see some transformation going on , i.e. something
>> like an
>> implementation.xslt. Isn't Saxon also an XSLT processor so can we
>> already do
>> this?
>>
>
> The XSLT is already in the JDK (javax.xml.transform or TrAX). Apache
> Xalan is one of the implementations. It would be nice to support
> <implementation.xslt>.
>
> There could be something mappings between XSLT and SCA. The
> implementation.xslt could have a fixed operation to transform the XML
> inforset such as:
>
> Node transform(Node ...);
>
> We can also map XSLT functions to be SCA services. Top-level
> <xsl:param> might be used as SCA properties. Injecting of SCA
> references will be interesting too.
>
We already have XQuery support. Can't we do the same kind of
transformation (and more readable) with XQuery?
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: A demo application to showcase our XML integration story
Posted by Raymond Feng <en...@gmail.com>.
Comments inline.
Thanks,
Raymond
----- Original Message -----
From: "Simon Laws" <si...@googlemail.com>
To: <tu...@ws.apache.org>
Sent: Friday, October 05, 2007 2:39 AM
Subject: Re: A demo application to showcase our XML integration story
> On 10/4/07, Raymond Feng <en...@gmail.com> wrote:
>>
>> Hi,
>>
>> I put together a demo application to showcase our XML integration story.
>> The
>> business scenario is derived from the bigbank demo and the main function
>> is
>> to calculate the total value (using a selected currency) of a customer
>> who
>> has checking/saving/stock accounts.
>>
>> At this moment, I add three different sources to provide XML data.
>>
>> 1) A live feed to retrieve the exchange rate (binding.feed) and use XPath
>> to
>> exact the rate for a given currency. I have to use Rome API to convert
>> the
>> feed as our feed binding produces Feed objects.
>>
>> 2) The account data for a customer is loaded from a XML file. (We can use
>> implementation.data once Sebastien's proposal is implemented).
>>
>> 3) A live Web Service invocation to get the quotes for a list of symbols.
>> Only XMLStreamReader is used as the input and output. (binding.ws)
>>
>> 4) The calculation of the total value is implemented using XQuery to join
>> the XML data from 2 and 3. (implementation.xquery)
>>
>> The demo application is checked in under r581755. I hope we can use it as
>> a
>> test-bed to further drive our XML integration story. Please feel free to
>> chime in with your ideas, for example, add implementation.data or
>> implementation.das, or implementation.bpel.
>>
>> Thanks,
>> Raymond
>>
[snip]
>
> I'd quite like to see some transformation going on , i.e. something like
> an
> implementation.xslt. Isn't Saxon also an XSLT processor so can we already
> do
> this?
>
The XSLT is already in the JDK (javax.xml.transform or TrAX). Apache Xalan
is one of the implementations. It would be nice to support
<implementation.xslt>.
There could be something mappings between XSLT and SCA. The
implementation.xslt could have a fixed operation to transform the XML
inforset such as:
Node transform(Node ...);
We can also map XSLT functions to be SCA services. Top-level <xsl:param>
might be used as SCA properties. Injecting of SCA references will be
interesting too.
> We could, for example,
>
> - convert the resulting "totals" message into a different format
> - produce a formatted statement or some SVG to graph the various totals.
> - Produce and XForm for this xml application
>
> etc.
>
> Simon
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: A demo application to showcase our XML integration story
Posted by Simon Laws <si...@googlemail.com>.
On 10/4/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> I put together a demo application to showcase our XML integration story.
> The
> business scenario is derived from the bigbank demo and the main function
> is
> to calculate the total value (using a selected currency) of a customer who
> has checking/saving/stock accounts.
>
> At this moment, I add three different sources to provide XML data.
>
> 1) A live feed to retrieve the exchange rate (binding.feed) and use XPath
> to
> exact the rate for a given currency. I have to use Rome API to convert the
> feed as our feed binding produces Feed objects.
>
> 2) The account data for a customer is loaded from a XML file. (We can use
> implementation.data once Sebastien's proposal is implemented).
>
> 3) A live Web Service invocation to get the quotes for a list of symbols.
> Only XMLStreamReader is used as the input and output. (binding.ws)
>
> 4) The calculation of the total value is implemented using XQuery to join
> the XML data from 2 and 3. (implementation.xquery)
>
> The demo application is checked in under r581755. I hope we can use it as
> a
> test-bed to further drive our XML integration story. Please feel free to
> chime in with your ideas, for example, add implementation.data or
> implementation.das, or implementation.bpel.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: <rf...@apache.org>
> To: <tu...@ws.apache.org>
> Sent: Wednesday, October 03, 2007 6:11 PM
> Subject: svn commit: r581755 - in /incubator/tuscany/java/sca/demos: ./
> xml-bigbank/ xml-bigbank/src/ xml-bigbank/src/main/
> xml-bigbank/src/main/java/ xml-bigbank/src/main/java/bigbank/
> xml-bigbank/src/main/resources/ xml-bigbank/src/main/resources/wsdl/
>
>
> > Author: rfeng
> > Date: Wed Oct 3 18:11:33 2007
> > New Revision: 581755
> >
> > URL: http://svn.apache.org/viewvc?rev=581755&view=rev
> > Log:
> > Add a demo to showcase a plain XML integration story
> >
> > Added:
> > incubator/tuscany/java/sca/demos/xml-bigbank/ (with props)
> > incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset
> > incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER
> > incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE
> > incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE
> > incubator/tuscany/java/sca/demos/xml-bigbank/build.xml (with props)
> > incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml (with props)
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> > (with props)
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> > (with props)
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> > (with props)
> >
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/
> >
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> > Modified:
> > incubator/tuscany/java/sca/demos/pom.xml
> >
> > Modified: incubator/tuscany/java/sca/demos/pom.xml
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/pom.xml?rev=581755&r1=581754&r2=581755&view=diff
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/pom.xml (original)
> > +++ incubator/tuscany/java/sca/demos/pom.xml Wed Oct 3 18:11:33 2007
> > @@ -42,6 +42,7 @@
> > <module>bigbank-stockquote</module>
> > <module>mortgage-creditcheck</module>
> > <module>mortgage-loanapproval</module>
> > + <module>xml-bigbank</module>
> > </modules>
> > </profile>
> >
> >
> > Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/
> >
> ------------------------------------------------------------------------------
> > --- svn:ignore (added)
> > +++ svn:ignore Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,14 @@
> > +target
> > +*.iws
> > +*.ipr
> > +*.iml
> > +.project
> > +.classpath
> > +maven.log
> > +velocity.log*
> > +junit*.properties
> > +surefire*.properties
> > +.settings
> > +.deployables
> > +.wtpmodules
> > +work
> >
> > Added: incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset?rev=581755&view=auto
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset (added)
> > +++ incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset Wed Oct 3
> > 18:11:33 2007
> > @@ -0,0 +1,172 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<ruleset name="pmd-eclipse">
> > + <description>PMD Plugin preferences rule set</description>
> > +
> > +
> > + <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
> > + <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
> > + <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/>
> > +<!--<rule ref="rulesets/basic.xml/EmptyCatchBlock"/>-->
> > +<!--<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>-->
> > +<!--<rule ref="rulesets/basic.xml/EmptyIfStmt"/>-->
> > + <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/>
> > +<!--<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>-->
> > +<!--<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>-->
> > +<!--<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>-->
> > +<!--<rule ref="rulesets/basic.xml/EmptyTryBlock"/>-->
> > +<!--<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>-->
> > + <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/>
> > + <rule ref="rulesets/basic.xml/JumbledIncrementer"/>
> > +<!--<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>-->
> > + <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
> > + <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
> > + <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
> > + <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
> > + <rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
> > +<!--<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>-->
> > +
> > +<!--<rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>-->
> > +<!--<rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>-->
> > +<!--<rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>-->
> > +<!--<rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>-->
> > +
> > +<!--<rule
> ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>-->
> > +<!--<rule
> > ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>-->
> > +<!--<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>-->
> > +
> > +<!--<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>-->
> > +<!--<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>-->
> > +<!--<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>-->
> > +<!--<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>-->
> > +<!--<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>-->
> > +<!--<rule ref="rulesets/codesize.xml/TooManyFields"/>-->
> > +
> > +<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
> > +<!--<rule ref="rulesets/controversial.xml/AtLeastOneConstructor"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/CallSuperInConstructor"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/DontImportSun"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/NullAssignment"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/OnlyOneReturn"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/SingularField"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/SuspiciousOctalEscape"/>-->
> > +<!--<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>-->
> > +<rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
> > +<!--<rule ref="rulesets/controversial.xml/UnusedModifier"/>-->
> > +
> > +<!--<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>-->
> > +<!--<rule ref="rulesets/coupling.xml/ExcessiveImports"/>-->
> > +<!--<rule ref="rulesets/coupling.xml/LooseCoupling"/>-->
> > +
> > +<!--<rule
> > ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>-->
> > +<!--<rule ref="rulesets/design.xml/AccessorClassGeneration"/>-->
> > +<!--<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>-->
> > +<!--<rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/>-->
> > +<!--<rule
> > ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>-->
> > +<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
> > +<!--<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>-->
> > +<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
> > +<!--<rule ref="rulesets/design.xml/BadComparison"/>-->
> > +<!--<rule ref="rulesets/design.xml/CloseConnection"/>-->
> > +<!--<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>-->
> > +<!--<rule ref="rulesets/design.xml/ConfusingTernary"/>-->
> > +<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
> > +<!--<rule
> ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>-->
> > +<!--<rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>-->
> > +<rule ref="rulesets/design.xml/IdempotentOperations"/>
> > +<!--<rule ref="rulesets/design.xml/ImmutableField"/>-->
> > +<!--<rule ref="rulesets/design.xml/InstantiationToGetClass"/>-->
> > +<!--<rule ref="rulesets/design.xml/MissingBreakInSwitch"/>-->
> > +<!--<rule
> >
> ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>-->
> > +<!--<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>-->
> > +<!--<rule ref="rulesets/design.xml/NonStaticInitializer"/>-->
> > +<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
> > +<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
> > +<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
> > +<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
> > +<rule ref="rulesets/design.xml/SimplifyConditional"/>
> > +<!--<rule ref="rulesets/design.xml/SwitchDensity"/>-->
> > +<!--<rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>-->
> > +<!--<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>-->
> > +<!--<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>-->
> > +<!--<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>-->
> > +<!--<rule ref="rulesets/design.xml/UseSingleton"/>-->
> > +
> > +<!--<rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>-->
> > +<!--<rule
> > ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>-->
> > +<!--<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/>-->
> > +<!--<rule
> > ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/>-->
> > +<!--<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/>-->
> > +<!--<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>-->
> > +
> > +<!--<rule ref="rulesets/imports.xml/DuplicateImports"/>-->
> > +<!--<rule ref="rulesets/imports.xml/DontImportJavaLang"/>-->
> > +<!--<rule ref="rulesets/imports.xml/UnusedImports"/>-->
> > +<!--<rule ref="rulesets/imports.xml/ImportFromSamePackage"/>-->
> > +
> > +<!--<rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/>-->
> > +<!--<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>-->
> > +
> > +<!--<rule ref="rulesets/junit.xml/JUnitStaticSuite"/>-->
> > +<!--<rule ref="rulesets/junit.xml/JUnitSpelling"/>-->
> > +<!--<rule
> > ref="rulesets/junit.xml/JUnitAssertionsShouldIncludeMessage"/>-->
> > +<!--<rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/>-->
> > +<!--<rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/>-->
> > +<!--<rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/>-->
> > +<!--<rule
> > ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/>-->
> > +<!--<rule
> ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>-->
> > +
> > + <!--<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>-->
> > + <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
> > + <!--<rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/>-->
> > + <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
> > + <!--<rule ref="rulesets/logging-java.xml/LogBlockWithoutIf"/>-->
> > + <!--<rule ref="rulesets/logging-java.xml/SystemPrintln"/>-->
> > + <!--<rule
> > ref="rulesets/logging-jakarta-commons.xml
> /UseCorrectExceptionLogging"/>-->
> > + <!--<rule ref="rulesets/logging-jakarta-commons.xml
> /ProperLogger"/>-->
> > +
> > + <!--<rule ref="rulesets/naming.xml/ShortVariable"/>-->
> > + <!--<rule ref="rulesets/naming.xml/LongVariable"/>-->
> > + <!--<rule ref="rulesets/naming.xml/ShortMethodName"/>-->
> > + <!--<rule ref="rulesets/naming.xml/VariableNamingConventions"/>-->
> > + <!--<rule ref="rulesets/naming.xml/MethodNamingConventions"/>-->
> > + <!--<rule ref="rulesets/naming.xml/ClassNamingConventions"/>-->
> > + <!--<rule ref="rulesets/naming.xml/AbstractNaming"/>-->
> > + <!--<rule ref="rulesets/naming.xml/AvoidDollarSigns"/>-->
> > + <!--<rule
> > ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/>-->
> > + <!--<rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>-->
> > + <!--<rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>-->
> > + <!--<rule
> ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>-->
> > + <!--<rule
> > ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>-->
> > + <!--<rule
> > ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>-->
> > + <!--<rule ref="rulesets/naming.xml/NoPackage"/>-->
> > + <!--<rule ref="rulesets/naming.xml/PackageCase"/>-->
> > +
> > + <!--<rule
> > ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/>-->
> > + <!--<rule
> > ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/>-->
> > + <!--<rule
> > ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/>-->
> > + <!--<rule
> > ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>-->
> > + <!--<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>-->
> > + <!--<rule
> > ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>-->
> > +
> > + <!--<rule
> > ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>-->
> > + <!--<rule
> > ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>-->
> > + <!--<rule
> > ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>-->
> > + <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>-->
> > + <!--<rule
> > ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>-->
> > + <!--<rule
> >
> ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>-->
> > +
> > + <!--<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>-->
> > + <!--<rule ref="rulesets/strings.xml/StringInstantiation"/>-->
> > + <!--<rule ref="rulesets/strings.xml/StringToString"/>-->
> > + <!--<rule
> >
> ref="rulesets/strings.xml/AvoidConcatenatingNonLiteralsInStringBuffer"/>-->
> > + <!--<rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>-->
> > +
> > + <!--<rule
> ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>-->
> > + <!--<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>-->
> > +
> > + <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
> > + <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
> > + <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
> > + <!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>-->
> > +
> > +</ruleset>
> >
> > Added: incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER?rev=581755&view=auto
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER (added)
> > +++ incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER Wed Oct 3
> > 18:11:33 2007
> > @@ -0,0 +1,8 @@
> > +Apache Tuscany is an effort undergoing incubation at The Apache
> Software
> > +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation
> is
> > +required of all newly accepted projects until a further review
> indicates
> > that
> > +the infrastructure, communications, and decision making process have
> > stabilized
> > +in a manner consistent with other successful ASF projects. While
> > incubation
> > +status is not necessarily a reflection of the completeness or stability
> > of the
> > +code, it does indicate that the project has yet to be fully endorsed by
> > the ASF.
> > +
> >
> > Added: incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE?rev=581755&view=auto
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE (added)
> > +++ incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE Wed Oct 3
> > 18:11:33 2007
> > @@ -0,0 +1,205 @@
> > +
> > + 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.
> > +
> > +
> > +
> >
> > Added: incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE?rev=581755&view=auto
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE (added)
> > +++ incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE Wed Oct 3
> > 18:11:33 2007
> > @@ -0,0 +1,6 @@
> > +${pom.name}
> > +Copyright (c) 2005 - 2007 The Apache Software Foundation
> > +
> > +This product includes software developed by
> > +The Apache Software Foundation (http://www.apache.org/).
> > +
> >
> > Added: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/build.xml?rev=581755&view=auto
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/xml-bigbank/build.xml (added)
> > +++ incubator/tuscany/java/sca/demos/xml-bigbank/build.xml Wed Oct 3
> > 18:11:33 2007
> > @@ -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.
> > +-->
> > +<project name="xml-bigbank" default="compile">
> > + <property name="test.class" value="bigbank.BigBankClient" />
> > + <property name="test.jar" value="demo-xml-bigbank.jar" />
> > +
> > + <target name="init">
> > + <mkdir dir="target/classes" />
> > + </target>
> > +
> > + <target name="compile" depends="init">
> > + <javac srcdir="src/main/java" destdir="target/classes" debug="on"
> > source="1.5" target="1.5">
> > + <classpath>
> > + <pathelement location="../../lib/tuscany-sca-manifest.jar" />
> > + </classpath>
> > + </javac>
> > + <copy todir="target/classes">
> > + <fileset dir="src/main/resources" />
> > + </copy>
> > + <jar destfile="target/${test.jar}" basedir="target/classes">
> > + <manifest>
> > + <attribute name="Main-Class" value="${test.class}" />
> > + </manifest>
> > + </jar>
> > + </target>
> > +
> > + <target name="run-classes">
> > + <java classname="${test.class}" fork="true">
> > + <classpath>
> > + <pathelement path="target/classes" />
> > + <pathelement location="../../lib/tuscany-sca-manifest.jar" />
> > + </classpath>
> > + </java>
> > + </target>
> > +
> > + <target name="run">
> > + <java classname="${test.class}" fork="true">
> > + <classpath>
> > + <pathelement path="target/${test.jar}" />
> > + <pathelement location="../../lib/tuscany-sca-manifest.jar" />
> > + </classpath>
> > + </java>
> > + </target>
> > +
> > + <target name="clean">
> > + <delete quiet="true" includeemptydirs="true">
> > + <fileset dir="target" />
> > + </delete>
> > + </target>
> > +</project>
> >
> > Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml?rev=581755&view=auto
> >
> ==============================================================================
> > --- incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml (added)
> > +++ incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml Wed Oct 3
> > 18:11:33 2007
> > @@ -0,0 +1,103 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<!--
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT 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-demos</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <relativePath>../pom.xml</relativePath>
> > + </parent>
> > + <artifactId>demo-xml-bigbank</artifactId>
> > + <packaging>jar</packaging>
> > + <name>Apache Tuscany SCA XML BigBank Demo</name>
> > + <description>Apache Tuscany SCA XML BigBank Demo</description>
> > +
> > + <dependencies>
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> > + <artifactId>tuscany-host-embedded</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> >
> + <artifactId>tuscany-implementation-java-runtime</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> > + <artifactId>tuscany-binding-ws-axis2</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> > + <artifactId>tuscany-binding-feed</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>rome</groupId>
> > + <artifactId>rome</artifactId>
> > + <version>0.9</version>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> > + <artifactId>tuscany-databinding-saxon</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > +
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> > + <artifactId>tuscany-implementation-xquery</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.tuscany.sca</groupId>
> > + <artifactId>tuscany-host-tomcat</artifactId>
> > + <version>1.1-incubating-SNAPSHOT</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>junit</groupId>
> > + <artifactId>junit</artifactId>
> > + <version>4.2</version>
> > + <scope>test</scope>
> > + </dependency>
> > +
> > + </dependencies>
> > +
> > + <build>
> > + <finalName>${artifactId}</finalName>
> > + </build>
> > +
> > +
> > +</project>
> >
> > Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,31 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import java.io.IOException;
> > +
> > +import javax.xml.stream.XMLStreamReader;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +public interface AccountData {
> > + XMLStreamReader getAccounts() throws IOException;
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,48 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import java.io.IOException;
> > +import java.net.URL;
> > +
> > +import javax.xml.stream.XMLInputFactory;
> > +import javax.xml.stream.XMLStreamReader;
> > +
> > +import org.osoa.sca.annotations.Service;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +@Service(AccountData.class)
> > +public class AccountDataImpl implements AccountData {
> > + private XMLInputFactory factory = XMLInputFactory.newInstance();
> > +
> > + public XMLStreamReader getAccounts() throws IOException {
> > + URL doc = getClass().getResource("/accounts.xml");
> > + XMLStreamReader reader = null;
> > + try {
> > + reader = factory.createXMLStreamReader(doc.openStream());
> > + } catch (Exception e) {
> > + e.printStackTrace();
> > + }
> > + return reader;
> > + }
> > +
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> > Wed Oct 3 18:11:33 2007
> > @@ -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.
> > + */
> > +package bigbank;
> > +
> > +import org.apache.tuscany.sca.host.embedded.SCADomain;
> > +
> > +/**
> > + * This client program to invoke the Mortgage LoanApproval service
> > + */
> > +public class BigBankClient {
> > +
> > + public static void main(String[] args) throws Exception {
> > +
> > + SCADomain domain = SCADomain.newInstance("BigBank.composite");
> > + CustomerAsset ds = domain.getService(CustomerAsset.class,
> > "CustomerAsset");
> > +
> > + System.out.println("EUR: " + ds.getTotalValue("EUR"));
> > + }
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,40 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import org.apache.tuscany.sca.host.embedded.SCADomain;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +public class BigBankServer {
> > + public static void main(String[] args) throws Exception {
> > +
> > + System.out.println("Starting the BigBank Service...");
> > +
> > + SCADomain domain = SCADomain.newInstance("http://localhost",
> "/",
> > "BigBank.composite");
> > +
> > + System.out.println("Press Enter to Exit...");
> > + System.in.read();
> > +
> > + domain.close();
> > + System.out.println("Bye");
> > + }
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,32 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import org.osoa.sca.annotations.Remotable;
> > +
> > +import com.sun.syndication.feed.atom.Feed;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +@Remotable
> > +public interface CurrencyExchange {
> > + Feed getRates();
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> > Wed Oct 3 18:11:33 2007
> > @@ -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 bigbank;
> > +
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +public interface CustomerAsset {
> > + double getTotalValue(String currency);
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,96 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import java.io.StringReader;
> > +
> > +import javax.xml.stream.XMLInputFactory;
> > +import javax.xml.stream.XMLStreamReader;
> > +import javax.xml.xpath.XPath;
> > +import javax.xml.xpath.XPathConstants;
> > +import javax.xml.xpath.XPathExpression;
> > +import javax.xml.xpath.XPathFactory;
> > +
> > +import org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node;
> > +import org.osoa.sca.ServiceRuntimeException;
> > +import org.osoa.sca.annotations.Reference;
> > +import org.osoa.sca.annotations.Service;
> > +import org.w3c.dom.Node;
> > +
> > +import com.sun.syndication.feed.atom.Entry;
> > +import com.sun.syndication.feed.atom.Feed;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +@Service(CustomerAsset.class)
> > +public class CustomerAssetImpl implements CustomerAsset {
> > + private XMLInputFactory factory = XMLInputFactory.newInstance();
> > +
> > + @Reference(required = false)
> > + protected CurrencyExchange exchangeRate;
> > +
> > + @Reference
> > + protected StockQuote stockQuote;
> > +
> > + @Reference(required = false)
> > + protected AccountData accountData;
> > +
> > + @Reference
> > + protected StockValue stockValue;
> > +
> > + public double getTotalValue(String currency) {
> > + try {
> > + System.out.println("Retrieving exchange rate...");
> > + Feed feed = exchangeRate.getRates();
> > + Entry entry = (Entry)feed.getEntries().get(0);
> > + String rateTable = entry.getSummary().getValue();
> > + // System.out.println(rateTable);
> > + XMLStreamReader rates = factory.createXMLStreamReader(new
> > StringReader(rateTable));
> > + XMLStreamReader2Node t = new XMLStreamReader2Node();
> > + Node node = t.transform(rates, null);
> > + XPath path = XPathFactory.newInstance().newXPath();
> > + XPathExpression exp = path.compile("/TABLE/TR[TD[1]='" +
> > currency.toUpperCase() + "']/TD[2]");
> > + Node rateNode = (Node)exp.evaluate(node,
> > XPathConstants.NODE);
> > + double rate =
> > Double.valueOf(rateNode.getTextContent().trim());
> > + System.out.println("Exchange rate: USD 1.0=" + currency + "
> "
> > + rate);
> > +
> > + System.out.println("Loading account data...");
> > + XMLStreamReader accounts = accountData.getAccounts();
> > +
> > + System.out.println("Getting stock quote...");
> > + String ticker =
> > + "<q:GetQuotes
> > xmlns:q=\"http://swanandmokashi.com\
> "><q:QuoteTicker>IBM,GOOG,MSFT</q:QuoteTicker></q:GetQuotes>";
> > + XMLStreamReader request = factory.createXMLStreamReader(new
> > StringReader(ticker));
> > +
> > + XMLStreamReader quotes = stockQuote.GetStockQuotes
> (request);
> > +
> > + System.out.println("Calculating total value...");
> > + double value = stockValue.calculate(quotes, accounts);
> > +
> > + System.out.println("Total Value=USD " + value);
> > +
> > + return value * rate;
> > + } catch (Exception e) {
> > + throw new ServiceRuntimeException(e);
> > + }
> > + }
> > +
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,32 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import javax.xml.stream.XMLStreamReader;
> > +
> > +import org.osoa.sca.annotations.Remotable;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +@Remotable
> > +public interface StockQuote {
> > + public XMLStreamReader GetStockQuotes(XMLStreamReader input);
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,32 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package bigbank;
> > +
> > +import javax.xml.stream.XMLStreamReader;
> > +
> > +import org.osoa.sca.annotations.Remotable;
> > +
> > +/**
> > + * @version $Rev$ $Date$
> > + */
> > +@Remotable
> > +public interface StockValue {
> > + double calculate(XMLStreamReader quotes, XMLStreamReader accounts);
> > +}
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,49 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<!--
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > +-->
> > +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> > xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
> > + targetNamespace="http://bigbank" name="BigBank">
> > +
> > + <component name="CustomerAsset">
> > + <implementation.java class="bigbank.CustomerAssetImpl" />
> > + <reference name="accountData" target="AccountData" />
> > + <reference name="stockValue" target="StockValue" />
> > +
> > + <reference name="exchangeRate">
> > + <tuscany:binding.rss
> > +
> > uri="
> http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S
> "
> > />
> > + </reference>
> > + </component>
> > +
> > + <component name="AccountData">
> > + <implementation.java class="bigbank.AccountDataImpl" />
> > + </component>
> > +
> > + <component name="StockValue">
> > + <tuscany:implementation.xquery location="stock.xq" />
> > + <!--
> > + <property name="currency">USD</property>
> > + -->
> > + </component>
> > +
> > + <reference name="StockQuoteReference"
> > promote="CustomerAsset/stockQuote">
> > + <binding.ws
> > wsdlElement="
> http://swanandmokashi.com#wsdl.port(StockQuotes/StockQuotesSoap)"
> > />
> > + </reference>
> > +
> > +</composite>
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,11 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<customer id="123" xmlns="http://example.com/customer"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > + <firstName>John</firstName>
> > + <lastName>Smith</lastName>
> > + <accounts>
> > + <checking id="C01" balance="1000.0"></checking>
> > + <saving id="S01" balance="20000.0"></saving>
> > + <stock symbol="IBM" quantity="500" />
> > + <stock symbol="MSFT" quantity="200" />
> > + </accounts>
> > +</customer>
> > \ No newline at end of file
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,28 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<schema xmlns="http://www.w3.org/2001/XMLSchema"
> > xmlns:tns="http://exmaple.com/customer"
> > + targetNamespace="http://exmaple.com/customer"
> > elementFormDefault="qualified">
> > + <element name="customer" type="tns:Customer" />
> > + <complexType name="Customer">
> > + <sequence>
> > + <element name="id" type="string"></element>
> > + <element name="firstName" type="string"></element>
> > + <element name="lastName" type="string"></element>
> > + <element name="accounts" type="string"></element>
> > + </sequence>
> > + </complexType>
> > + <complexType name="Accounts">
> > + <choice>
> > + <element name="checking" type="tns:Account"></element>
> > + <element name="saving" type="tns:Account"></element>
> > + <element name="stock" type="tns:Stock"></element>
> > + </choice>
> > + </complexType>
> > + <complexType name="Account">
> > + <attribute name="id" type="string"></attribute>
> > + <attribute name="balance" type="float"></attribute>
> > + </complexType>
> > + <complexType name="Stock">
> > + <attribute name="symbol" type="string"></attribute>
> > + <attribute name="quantity" type="int"></attribute>
> > + </complexType>
> > +</schema>
> > \ No newline at end of file
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,56 @@
> > +<?xml version='1.0' encoding='UTF-8'?>
> > +<GetQuotesResponse xmlns="http://swanandmokashi.com">
> > + <GetQuotesResult>
> > + <Quote>
> > + <CompanyName>INTL BUSINESS MAC</CompanyName>
> > + <StockTicker>IBM</StockTicker>
> > + <StockQuote>116.40</StockQuote>
> > + <LastUpdated>10/3/2007 4:01pm</LastUpdated>
> > + <Change>-1.96</Change>
> > + <OpenPrice>117.65</OpenPrice>
> > + <DayHighPrice>117.84</DayHighPrice>
> > + <DayLowPrice>116.28</DayLowPrice>
> > + <Volume>7892471</Volume>
> > + <MarketCap>158.4B</MarketCap>
> > + <YearRange>81.56 - 119.60</YearRange>
> > + <ExDividendDate>Aug 8</ExDividendDate>
> > + <DividendYield>1.18</DividendYield>
> > + <DividendPerShare>1.40</DividendPerShare>
> > + <PercentChange>-1.66%</PercentChange>
> > + </Quote>
> > + <Quote>
> > + <CompanyName>GOOGLE</CompanyName>
> > + <StockTicker>GOOG</StockTicker>
> > + <StockQuote>584.0199</StockQuote>
> > + <LastUpdated>10/3/2007 4:00pm</LastUpdated>
> > + <Change>-0.3701</Change>
> > + <OpenPrice>586.25</OpenPrice>
> > + <DayHighPrice>588.99</DayHighPrice>
> > + <DayLowPrice>580.36</DayLowPrice>
> > + <Volume>3869172</Volume>
> > + <MarketCap>182.3B</MarketCap>
> > + <YearRange>398.19 - 596.81</YearRange>
> > + <ExDividendDate>N/A</ExDividendDate>
> > + <DividendYield>N/A</DividendYield>
> > + <DividendPerShare>0.00</DividendPerShare>
> > + <PercentChange>-0.06%</PercentChange>
> > + </Quote>
> > + <Quote>
> > + <CompanyName>MICROSOFT CP</CompanyName>
> > + <StockTicker>MSFT</StockTicker>
> > + <StockQuote>29.4525</StockQuote>
> > + <LastUpdated>10/3/2007 4:00pm</LastUpdated>
> > + <Change>-0.2475</Change>
> > + <OpenPrice>29.57</OpenPrice>
> > + <DayHighPrice>29.85</DayHighPrice>
> > + <DayLowPrice>29.29</DayLowPrice>
> > + <Volume>37324944</Volume>
> > + <MarketCap>276.1B</MarketCap>
> > + <YearRange>26.60 - 31.84</YearRange>
> > + <ExDividendDate>Aug 14</ExDividendDate>
> > + <DividendYield>1.35</DividendYield>
> > + <DividendPerShare>0.40</DividendPerShare>
> > + <PercentChange>-0.83%</PercentChange>
> > + </Quote>
> > + </GetQuotesResult>
> > +</GetQuotesResponse>
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> >
> ------------------------------------------------------------------------------
> > svn:eol-style = native
> >
> > Propchange:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> >
> ------------------------------------------------------------------------------
> > svn:keywords = Rev Date
> >
> > Added:
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> > (added)
> > +++
> > incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,52 @@
> > +(:
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > +:)
> > +declare namespace q="http://swanandmokashi.com";
> > +declare namespace c="http://example.com/customer";
> > +declare namespace stock="scaservice:java/bigbank.StockValue";
> > +(: declare namespace currency="scaproperty:java/java.lang.String"; :)
> > +
> > +declare function stock:calculate($quoteDoc, $accountDoc) {
> > + let $checking :=
> > + trace(
> > + sum(
> > + for $a in $accountDoc/c:customer/c:accounts/c:checking
> > + return $a/@balance
> > + ), "Checking Balance")
> > +
> > + let $saving :=
> > + trace(
> > + sum(
> > + for $a in $accountDoc/c:customer/c:accounts/c:saving
> > + return $a/@balance
> > + ), "Saving Blance")
> > +
> > + let $value :=
> > + trace(
> > + sum(
> > + for $quote in
> > $quoteDoc/q:GetQuotesResponse/q:GetQuotesResult/q:Quote,
> > + $account in $accountDoc/c:customer/c:accounts/c:stock
> > + where string($quote/q:StockTicker) = string($account/@symbol)
> > + return
> > + trace(number($quote/q:StockQuote),"Stock Price") *
> > trace(number($account/@quantity), "Quantity")
> > + ), "Stock Value")
> > + return trace($checking + $saving + $value, "Total Value")
> > +};
> > +
> > +
> > +
> >
> > Added:
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> > URL:
> >
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl?rev=581755&view=auto
> >
> ==============================================================================
> > ---
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> > (added)
> > +++
> >
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> > Wed Oct 3 18:11:33 2007
> > @@ -0,0 +1,105 @@
> > +<?xml version="1.0" encoding="utf-8"?>
> > +<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > + xmlns:s="http://www.w3.org/2001/XMLSchema"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > + xmlns:tns="http://swanandmokashi.com"
> > xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> > + xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > targetNamespace="http://swanandmokashi.com"
> > + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> > + <wsdl:types>
> > + <s:schema elementFormDefault="qualified"
> > targetNamespace="http://swanandmokashi.com">
> > + <s:element name="GetQuotes">
> > + <s:complexType>
> > + <s:sequence>
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="QuoteTicker" type="s:string" />
> > + </s:sequence>
> > + </s:complexType>
> > + </s:element>
> > + <s:element name="GetQuotesResponse">
> > + <s:complexType>
> > + <s:sequence>
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="GetQuotesResult" type="tns:ArrayOfQuote" />
> > + </s:sequence>
> > + </s:complexType>
> > + </s:element>
> > + <s:complexType name="ArrayOfQuote">
> > + <s:sequence>
> > + <s:element minOccurs="0" maxOccurs="unbounded"
> > name="Quote" type="tns:Quote" />
> > + </s:sequence>
> > + </s:complexType>
> > + <s:complexType name="Quote">
> > + <s:sequence>
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="CompanyName" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="StockTicker" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="StockQuote" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="LastUpdated" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> name="Change"
> > type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="OpenPrice" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="DayHighPrice" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="DayLowPrice" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> name="Volume"
> > type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="MarketCap" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="YearRange" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="ExDividendDate" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="DividendYield" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="DividendPerShare" type="s:string" />
> > + <s:element minOccurs="0" maxOccurs="1"
> > name="PercentChange" type="s:string" />
> > + </s:sequence>
> > + </s:complexType>
> > + <s:element name="ArrayOfQuote" nillable="true"
> > type="tns:ArrayOfQuote" />
> > + </s:schema>
> > + </wsdl:types>
> > + <wsdl:message name="GetQuotesSoapIn">
> > + <wsdl:part name="parameters" element="tns:GetQuotes" />
> > + </wsdl:message>
> > + <wsdl:message name="GetQuotesSoapOut">
> > + <wsdl:part name="parameters" element="tns:GetQuotesResponse" />
> > + </wsdl:message>
> > + <wsdl:message name="GetQuotesHttpGetIn">
> > + <wsdl:part name="QuoteTicker" type="s:string" />
> > + </wsdl:message>
> > + <wsdl:message name="GetQuotesHttpGetOut">
> > + <wsdl:part name="Body" element="tns:ArrayOfQuote" />
> > + </wsdl:message>
> > + <wsdl:message name="GetQuotesHttpPostIn">
> > + <wsdl:part name="QuoteTicker" type="s:string" />
> > + </wsdl:message>
> > + <wsdl:message name="GetQuotesHttpPostOut">
> > + <wsdl:part name="Body" element="tns:ArrayOfQuote" />
> > + </wsdl:message>
> > + <wsdl:portType name="StockQuotesSoap">
> > + <wsdl:operation name="GetStockQuotes">
> > + <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
> > + Retrieves the latest(20 minutes delay) stock quote of a
> > stock ticker. To get multiple quotes enter
> > + Ticker symbols seperated by ,(eg. MSFT,YHOO,GE) or
> space
> > (eg. MSFT YHOO GE). <BR>Gives the company
> > + name ,ticker,Stock Quote, Change,Open price ,Day's
> > range(high and low),Volume, the Market Cap and the
> > + Year range of the stock
> price.<BR><B>Powered
> > by Yahoo!'s stock Quotes service.Not for
> > + commerical use.</b>
> > + </documentation>
> > + <wsdl:input name="GetQuotes" message="tns:GetQuotesSoapIn"
> />
> > + <wsdl:output name="GetQuotes"
> message="tns:GetQuotesSoapOut"
> > />
> > + </wsdl:operation>
> > + </wsdl:portType>
> > +
> > +
> > + <wsdl:binding name="StockQuotesSoap" type="tns:StockQuotesSoap">
> > + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> > style="document" />
> > + <wsdl:operation name="GetStockQuotes">
> > + <soap:operation
> > soapAction="http://swanandmokashi.com/GetQuotes" style="document" />
> > + <wsdl:input name="GetQuotes">
> > + <soap:body use="literal" />
> > + </wsdl:input>
> > + <wsdl:output name="GetQuotes">
> > + <soap:body use="literal" />
> > + </wsdl:output>
> > + </wsdl:operation>
> > + </wsdl:binding>
> > +
> > +
> > + <wsdl:service name="StockQuotes">
> > + <documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
> > + <wsdl:port name="StockQuotesSoap"
> binding="tns:StockQuotesSoap">
> > + <soap:address
> > location="
> http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx"
> > />
> > + </wsdl:port>
> > +
> > +
> > + </wsdl:service>
> > +</wsdl:definitions>
> > \ No newline at end of file
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-commits-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
I'd quite like to see some transformation going on , i.e. something like an
implementation.xslt. Isn't Saxon also an XSLT processor so can we already do
this?
We could, for example,
- convert the resulting "totals" message into a different format
- produce a formatted statement or some SVG to graph the various totals.
- Produce and XForm for this xml application
etc.
Simon
Re: A demo application to showcase our XML integration story
Posted by ant elder <an...@gmail.com>.
On 10/4/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> I put together a demo application to showcase our XML integration story.
> The
> business scenario is derived from the bigbank demo and the main function
> is
> to calculate the total value (using a selected currency) of a customer who
> has checking/saving/stock accounts.
>
> At this moment, I add three different sources to provide XML data.
>
> 1) A live feed to retrieve the exchange rate (binding.feed) and use XPath
> to
> exact the rate for a given currency. I have to use Rome API to convert the
> feed as our feed binding produces Feed objects.
>
> 2) The account data for a customer is loaded from a XML file. (We can use
> implementation.data once Sebastien's proposal is implemented).
>
> 3) A live Web Service invocation to get the quotes for a list of symbols.
> Only XMLStreamReader is used as the input and output. (binding.ws)
>
> 4) The calculation of the total value is implemented using XQuery to join
> the XML data from 2 and 3. (implementation.xquery)
>
> The demo application is checked in under r581755. I hope we can use it as
> a
> test-bed to further drive our XML integration story. Please feel free to
> chime in with your ideas, for example, add implementation.data or
> implementation.das, or implementation.bpel.
>
> Thanks,
> Raymond
That looks really good. The XML integration story is something I've always
thought could be a great demonstration of Tuscany's value...and of the value
of things like Tuscany's support for dynamic/script languages.
I'd really like to be able to replace the CustomerAssetImpl Java class used
in that demo with a dynamic language component, say Ruby or JavaScript, for
example, like this with JavaScript/E4X which seems much more concise and
readable to me than the Java code:
function getTotalValue(currency) {
java.lang.System.out.println("Retrieving exchange rate...");
feed = exchangeRate.getRates();
entry = feed.getEntries().get(0);
rateTable = new XML(entry.getSummary().getValue());
rate = rateTable.TR.(TD[0]==currency).TD[1]
accounts = accountData.getAccounts();
quotes = stockQuote.GetStockQuotes(
<q:GetQuotes xmlns:q="http://swanandmokashi.com">
<q:QuoteTicker>IBM,GOOG,MSFT</q:QuoteTicker>
</q:GetQuotes>
);
value = stockValue.calculate(quotes, accounts);
java.lang.System.out.println("Total Value=USD " + value);
return value;
}
And even that could probably be simplified if we could get
exchangeRate.getRates() to return e4x xml.
Unfortunately none of that JavaScript code is working in Tuscany any more :(
Similar things did used to work but we're lost the the E4X databinding and
support for xml references in script components that we used to have. It
would be a fair bit of work to get all that going again so before i (or
anyone else who wants to help) does that - is there much interested in
supporting stuff like this?
...ant
A demo application to showcase our XML integration story
Posted by Raymond Feng <en...@gmail.com>.
Hi,
I put together a demo application to showcase our XML integration story. The
business scenario is derived from the bigbank demo and the main function is
to calculate the total value (using a selected currency) of a customer who
has checking/saving/stock accounts.
At this moment, I add three different sources to provide XML data.
1) A live feed to retrieve the exchange rate (binding.feed) and use XPath to
exact the rate for a given currency. I have to use Rome API to convert the
feed as our feed binding produces Feed objects.
2) The account data for a customer is loaded from a XML file. (We can use
implementation.data once Sebastien's proposal is implemented).
3) A live Web Service invocation to get the quotes for a list of symbols.
Only XMLStreamReader is used as the input and output. (binding.ws)
4) The calculation of the total value is implemented using XQuery to join
the XML data from 2 and 3. (implementation.xquery)
The demo application is checked in under r581755. I hope we can use it as a
test-bed to further drive our XML integration story. Please feel free to
chime in with your ideas, for example, add implementation.data or
implementation.das, or implementation.bpel.
Thanks,
Raymond
----- Original Message -----
From: <rf...@apache.org>
To: <tu...@ws.apache.org>
Sent: Wednesday, October 03, 2007 6:11 PM
Subject: svn commit: r581755 - in /incubator/tuscany/java/sca/demos: ./
xml-bigbank/ xml-bigbank/src/ xml-bigbank/src/main/
xml-bigbank/src/main/java/ xml-bigbank/src/main/java/bigbank/
xml-bigbank/src/main/resources/ xml-bigbank/src/main/resources/wsdl/
> Author: rfeng
> Date: Wed Oct 3 18:11:33 2007
> New Revision: 581755
>
> URL: http://svn.apache.org/viewvc?rev=581755&view=rev
> Log:
> Add a demo to showcase a plain XML integration story
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/ (with props)
> incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset
> incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER
> incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE
> incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE
> incubator/tuscany/java/sca/demos/xml-bigbank/build.xml (with props)
> incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml (with props)
> incubator/tuscany/java/sca/demos/xml-bigbank/src/
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> (with props)
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> (with props)
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/
>
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> Modified:
> incubator/tuscany/java/sca/demos/pom.xml
>
> Modified: incubator/tuscany/java/sca/demos/pom.xml
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/pom.xml?rev=581755&r1=581754&r2=581755&view=diff
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/pom.xml (original)
> +++ incubator/tuscany/java/sca/demos/pom.xml Wed Oct 3 18:11:33 2007
> @@ -42,6 +42,7 @@
> <module>bigbank-stockquote</module>
> <module>mortgage-creditcheck</module>
> <module>mortgage-loanapproval</module>
> + <module>xml-bigbank</module>
> </modules>
> </profile>
>
>
> Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/
> ------------------------------------------------------------------------------
> --- svn:ignore (added)
> +++ svn:ignore Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,14 @@
> +target
> +*.iws
> +*.ipr
> +*.iml
> +.project
> +.classpath
> +maven.log
> +velocity.log*
> +junit*.properties
> +surefire*.properties
> +.settings
> +.deployables
> +.wtpmodules
> +work
>
> Added: incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset?rev=581755&view=auto
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset (added)
> +++ incubator/tuscany/java/sca/demos/xml-bigbank/.ruleset Wed Oct 3
> 18:11:33 2007
> @@ -0,0 +1,172 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<ruleset name="pmd-eclipse">
> + <description>PMD Plugin preferences rule set</description>
> +
> +
> + <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
> + <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
> + <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/>
> +<!--<rule ref="rulesets/basic.xml/EmptyCatchBlock"/>-->
> +<!--<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>-->
> +<!--<rule ref="rulesets/basic.xml/EmptyIfStmt"/>-->
> + <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/>
> +<!--<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>-->
> +<!--<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>-->
> +<!--<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>-->
> +<!--<rule ref="rulesets/basic.xml/EmptyTryBlock"/>-->
> +<!--<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>-->
> + <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/>
> + <rule ref="rulesets/basic.xml/JumbledIncrementer"/>
> +<!--<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>-->
> + <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
> + <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
> + <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
> + <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
> + <rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
> +<!--<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>-->
> +
> +<!--<rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>-->
> +<!--<rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>-->
> +<!--<rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>-->
> +<!--<rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>-->
> +
> +<!--<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>-->
> +<!--<rule
> ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>-->
> +<!--<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>-->
> +
> +<!--<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>-->
> +<!--<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>-->
> +<!--<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>-->
> +<!--<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>-->
> +<!--<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>-->
> +<!--<rule ref="rulesets/codesize.xml/TooManyFields"/>-->
> +
> +<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
> +<!--<rule ref="rulesets/controversial.xml/AtLeastOneConstructor"/>-->
> +<!--<rule ref="rulesets/controversial.xml/CallSuperInConstructor"/>-->
> +<!--<rule ref="rulesets/controversial.xml/DontImportSun"/>-->
> +<!--<rule ref="rulesets/controversial.xml/NullAssignment"/>-->
> +<!--<rule ref="rulesets/controversial.xml/OnlyOneReturn"/>-->
> +<!--<rule ref="rulesets/controversial.xml/SingularField"/>-->
> +<!--<rule ref="rulesets/controversial.xml/SuspiciousOctalEscape"/>-->
> +<!--<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>-->
> +<rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
> +<!--<rule ref="rulesets/controversial.xml/UnusedModifier"/>-->
> +
> +<!--<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>-->
> +<!--<rule ref="rulesets/coupling.xml/ExcessiveImports"/>-->
> +<!--<rule ref="rulesets/coupling.xml/LooseCoupling"/>-->
> +
> +<!--<rule
> ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>-->
> +<!--<rule ref="rulesets/design.xml/AccessorClassGeneration"/>-->
> +<!--<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>-->
> +<!--<rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/>-->
> +<!--<rule
> ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>-->
> +<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
> +<!--<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>-->
> +<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
> +<!--<rule ref="rulesets/design.xml/BadComparison"/>-->
> +<!--<rule ref="rulesets/design.xml/CloseConnection"/>-->
> +<!--<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>-->
> +<!--<rule ref="rulesets/design.xml/ConfusingTernary"/>-->
> +<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
> +<!--<rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>-->
> +<!--<rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>-->
> +<rule ref="rulesets/design.xml/IdempotentOperations"/>
> +<!--<rule ref="rulesets/design.xml/ImmutableField"/>-->
> +<!--<rule ref="rulesets/design.xml/InstantiationToGetClass"/>-->
> +<!--<rule ref="rulesets/design.xml/MissingBreakInSwitch"/>-->
> +<!--<rule
> ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>-->
> +<!--<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>-->
> +<!--<rule ref="rulesets/design.xml/NonStaticInitializer"/>-->
> +<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
> +<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
> +<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
> +<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
> +<rule ref="rulesets/design.xml/SimplifyConditional"/>
> +<!--<rule ref="rulesets/design.xml/SwitchDensity"/>-->
> +<!--<rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>-->
> +<!--<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>-->
> +<!--<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>-->
> +<!--<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>-->
> +<!--<rule ref="rulesets/design.xml/UseSingleton"/>-->
> +
> +<!--<rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>-->
> +<!--<rule
> ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>-->
> +<!--<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/>-->
> +<!--<rule
> ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/>-->
> +<!--<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/>-->
> +<!--<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>-->
> +
> +<!--<rule ref="rulesets/imports.xml/DuplicateImports"/>-->
> +<!--<rule ref="rulesets/imports.xml/DontImportJavaLang"/>-->
> +<!--<rule ref="rulesets/imports.xml/UnusedImports"/>-->
> +<!--<rule ref="rulesets/imports.xml/ImportFromSamePackage"/>-->
> +
> +<!--<rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/>-->
> +<!--<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>-->
> +
> +<!--<rule ref="rulesets/junit.xml/JUnitStaticSuite"/>-->
> +<!--<rule ref="rulesets/junit.xml/JUnitSpelling"/>-->
> +<!--<rule
> ref="rulesets/junit.xml/JUnitAssertionsShouldIncludeMessage"/>-->
> +<!--<rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/>-->
> +<!--<rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/>-->
> +<!--<rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/>-->
> +<!--<rule
> ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/>-->
> +<!--<rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>-->
> +
> + <!--<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>-->
> + <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
> + <!--<rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/>-->
> + <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
> + <!--<rule ref="rulesets/logging-java.xml/LogBlockWithoutIf"/>-->
> + <!--<rule ref="rulesets/logging-java.xml/SystemPrintln"/>-->
> + <!--<rule
> ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>-->
> + <!--<rule ref="rulesets/logging-jakarta-commons.xml/ProperLogger"/>-->
> +
> + <!--<rule ref="rulesets/naming.xml/ShortVariable"/>-->
> + <!--<rule ref="rulesets/naming.xml/LongVariable"/>-->
> + <!--<rule ref="rulesets/naming.xml/ShortMethodName"/>-->
> + <!--<rule ref="rulesets/naming.xml/VariableNamingConventions"/>-->
> + <!--<rule ref="rulesets/naming.xml/MethodNamingConventions"/>-->
> + <!--<rule ref="rulesets/naming.xml/ClassNamingConventions"/>-->
> + <!--<rule ref="rulesets/naming.xml/AbstractNaming"/>-->
> + <!--<rule ref="rulesets/naming.xml/AvoidDollarSigns"/>-->
> + <!--<rule
> ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/>-->
> + <!--<rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>-->
> + <!--<rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>-->
> + <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>-->
> + <!--<rule
> ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>-->
> + <!--<rule
> ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>-->
> + <!--<rule ref="rulesets/naming.xml/NoPackage"/>-->
> + <!--<rule ref="rulesets/naming.xml/PackageCase"/>-->
> +
> + <!--<rule
> ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/>-->
> + <!--<rule
> ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/>-->
> + <!--<rule
> ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/>-->
> + <!--<rule
> ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>-->
> + <!--<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>-->
> + <!--<rule
> ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>-->
> +
> + <!--<rule
> ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>-->
> + <!--<rule
> ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>-->
> + <!--<rule
> ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>-->
> + <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>-->
> + <!--<rule
> ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>-->
> + <!--<rule
> ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>-->
> +
> + <!--<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>-->
> + <!--<rule ref="rulesets/strings.xml/StringInstantiation"/>-->
> + <!--<rule ref="rulesets/strings.xml/StringToString"/>-->
> + <!--<rule
> ref="rulesets/strings.xml/AvoidConcatenatingNonLiteralsInStringBuffer"/>-->
> + <!--<rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>-->
> +
> + <!--<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>-->
> + <!--<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>-->
> +
> + <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
> + <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
> + <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
> + <!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>-->
> +
> +</ruleset>
>
> Added: incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER?rev=581755&view=auto
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER (added)
> +++ incubator/tuscany/java/sca/demos/xml-bigbank/DISCLAIMER Wed Oct 3
> 18:11:33 2007
> @@ -0,0 +1,8 @@
> +Apache Tuscany is an effort undergoing incubation at The Apache Software
> +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
> +required of all newly accepted projects until a further review indicates
> that
> +the infrastructure, communications, and decision making process have
> stabilized
> +in a manner consistent with other successful ASF projects. While
> incubation
> +status is not necessarily a reflection of the completeness or stability
> of the
> +code, it does indicate that the project has yet to be fully endorsed by
> the ASF.
> +
>
> Added: incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE?rev=581755&view=auto
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE (added)
> +++ incubator/tuscany/java/sca/demos/xml-bigbank/LICENSE Wed Oct 3
> 18:11:33 2007
> @@ -0,0 +1,205 @@
> +
> + 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.
> +
> +
> +
>
> Added: incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE?rev=581755&view=auto
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE (added)
> +++ incubator/tuscany/java/sca/demos/xml-bigbank/NOTICE Wed Oct 3
> 18:11:33 2007
> @@ -0,0 +1,6 @@
> +${pom.name}
> +Copyright (c) 2005 - 2007 The Apache Software Foundation
> +
> +This product includes software developed by
> +The Apache Software Foundation (http://www.apache.org/).
> +
>
> Added: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/build.xml?rev=581755&view=auto
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/xml-bigbank/build.xml (added)
> +++ incubator/tuscany/java/sca/demos/xml-bigbank/build.xml Wed Oct 3
> 18:11:33 2007
> @@ -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.
> +-->
> +<project name="xml-bigbank" default="compile">
> + <property name="test.class" value="bigbank.BigBankClient" />
> + <property name="test.jar" value="demo-xml-bigbank.jar" />
> +
> + <target name="init">
> + <mkdir dir="target/classes" />
> + </target>
> +
> + <target name="compile" depends="init">
> + <javac srcdir="src/main/java" destdir="target/classes" debug="on"
> source="1.5" target="1.5">
> + <classpath>
> + <pathelement location="../../lib/tuscany-sca-manifest.jar" />
> + </classpath>
> + </javac>
> + <copy todir="target/classes">
> + <fileset dir="src/main/resources" />
> + </copy>
> + <jar destfile="target/${test.jar}" basedir="target/classes">
> + <manifest>
> + <attribute name="Main-Class" value="${test.class}" />
> + </manifest>
> + </jar>
> + </target>
> +
> + <target name="run-classes">
> + <java classname="${test.class}" fork="true">
> + <classpath>
> + <pathelement path="target/classes" />
> + <pathelement location="../../lib/tuscany-sca-manifest.jar" />
> + </classpath>
> + </java>
> + </target>
> +
> + <target name="run">
> + <java classname="${test.class}" fork="true">
> + <classpath>
> + <pathelement path="target/${test.jar}" />
> + <pathelement location="../../lib/tuscany-sca-manifest.jar" />
> + </classpath>
> + </java>
> + </target>
> +
> + <target name="clean">
> + <delete quiet="true" includeemptydirs="true">
> + <fileset dir="target" />
> + </delete>
> + </target>
> +</project>
>
> Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/build.xml
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml?rev=581755&view=auto
> ==============================================================================
> --- incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml (added)
> +++ incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml Wed Oct 3
> 18:11:33 2007
> @@ -0,0 +1,103 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT 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-demos</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <relativePath>../pom.xml</relativePath>
> + </parent>
> + <artifactId>demo-xml-bigbank</artifactId>
> + <packaging>jar</packaging>
> + <name>Apache Tuscany SCA XML BigBank Demo</name>
> + <description>Apache Tuscany SCA XML BigBank Demo</description>
> +
> + <dependencies>
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-host-embedded</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + </dependency>
> +
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-implementation-java-runtime</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <scope>runtime</scope>
> + </dependency>
> +
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-binding-ws-axis2</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <scope>runtime</scope>
> + </dependency>
> +
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-binding-feed</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <scope>runtime</scope>
> + </dependency>
> +
> + <dependency>
> + <groupId>rome</groupId>
> + <artifactId>rome</artifactId>
> + <version>0.9</version>
> + </dependency>
> +
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-databinding-saxon</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <scope>runtime</scope>
> + </dependency>
> +
> +
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-implementation-xquery</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <scope>runtime</scope>
> + </dependency>
> +
> + <dependency>
> + <groupId>org.apache.tuscany.sca</groupId>
> + <artifactId>tuscany-host-tomcat</artifactId>
> + <version>1.1-incubating-SNAPSHOT</version>
> + <scope>runtime</scope>
> + </dependency>
> +
> + <dependency>
> + <groupId>junit</groupId>
> + <artifactId>junit</artifactId>
> + <version>4.2</version>
> + <scope>test</scope>
> + </dependency>
> +
> + </dependencies>
> +
> + <build>
> + <finalName>${artifactId}</finalName>
> + </build>
> +
> +
> +</project>
>
> Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange: incubator/tuscany/java/sca/demos/xml-bigbank/pom.xml
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,31 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import java.io.IOException;
> +
> +import javax.xml.stream.XMLStreamReader;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +public interface AccountData {
> + XMLStreamReader getAccounts() throws IOException;
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountData.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,48 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import java.io.IOException;
> +import java.net.URL;
> +
> +import javax.xml.stream.XMLInputFactory;
> +import javax.xml.stream.XMLStreamReader;
> +
> +import org.osoa.sca.annotations.Service;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +@Service(AccountData.class)
> +public class AccountDataImpl implements AccountData {
> + private XMLInputFactory factory = XMLInputFactory.newInstance();
> +
> + public XMLStreamReader getAccounts() throws IOException {
> + URL doc = getClass().getResource("/accounts.xml");
> + XMLStreamReader reader = null;
> + try {
> + reader = factory.createXMLStreamReader(doc.openStream());
> + } catch (Exception e) {
> + e.printStackTrace();
> + }
> + return reader;
> + }
> +
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> Wed Oct 3 18:11:33 2007
> @@ -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.
> + */
> +package bigbank;
> +
> +import org.apache.tuscany.sca.host.embedded.SCADomain;
> +
> +/**
> + * This client program to invoke the Mortgage LoanApproval service
> + */
> +public class BigBankClient {
> +
> + public static void main(String[] args) throws Exception {
> +
> + SCADomain domain = SCADomain.newInstance("BigBank.composite");
> + CustomerAsset ds = domain.getService(CustomerAsset.class,
> "CustomerAsset");
> +
> + System.out.println("EUR: " + ds.getTotalValue("EUR"));
> + }
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,40 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import org.apache.tuscany.sca.host.embedded.SCADomain;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +public class BigBankServer {
> + public static void main(String[] args) throws Exception {
> +
> + System.out.println("Starting the BigBank Service...");
> +
> + SCADomain domain = SCADomain.newInstance("http://localhost", "/",
> "BigBank.composite");
> +
> + System.out.println("Press Enter to Exit...");
> + System.in.read();
> +
> + domain.close();
> + System.out.println("Bye");
> + }
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,32 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import org.osoa.sca.annotations.Remotable;
> +
> +import com.sun.syndication.feed.atom.Feed;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +@Remotable
> +public interface CurrencyExchange {
> + Feed getRates();
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> Wed Oct 3 18:11:33 2007
> @@ -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 bigbank;
> +
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +public interface CustomerAsset {
> + double getTotalValue(String currency);
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAsset.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,96 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import java.io.StringReader;
> +
> +import javax.xml.stream.XMLInputFactory;
> +import javax.xml.stream.XMLStreamReader;
> +import javax.xml.xpath.XPath;
> +import javax.xml.xpath.XPathConstants;
> +import javax.xml.xpath.XPathExpression;
> +import javax.xml.xpath.XPathFactory;
> +
> +import org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node;
> +import org.osoa.sca.ServiceRuntimeException;
> +import org.osoa.sca.annotations.Reference;
> +import org.osoa.sca.annotations.Service;
> +import org.w3c.dom.Node;
> +
> +import com.sun.syndication.feed.atom.Entry;
> +import com.sun.syndication.feed.atom.Feed;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +@Service(CustomerAsset.class)
> +public class CustomerAssetImpl implements CustomerAsset {
> + private XMLInputFactory factory = XMLInputFactory.newInstance();
> +
> + @Reference(required = false)
> + protected CurrencyExchange exchangeRate;
> +
> + @Reference
> + protected StockQuote stockQuote;
> +
> + @Reference(required = false)
> + protected AccountData accountData;
> +
> + @Reference
> + protected StockValue stockValue;
> +
> + public double getTotalValue(String currency) {
> + try {
> + System.out.println("Retrieving exchange rate...");
> + Feed feed = exchangeRate.getRates();
> + Entry entry = (Entry)feed.getEntries().get(0);
> + String rateTable = entry.getSummary().getValue();
> + // System.out.println(rateTable);
> + XMLStreamReader rates = factory.createXMLStreamReader(new
> StringReader(rateTable));
> + XMLStreamReader2Node t = new XMLStreamReader2Node();
> + Node node = t.transform(rates, null);
> + XPath path = XPathFactory.newInstance().newXPath();
> + XPathExpression exp = path.compile("/TABLE/TR[TD[1]='" +
> currency.toUpperCase() + "']/TD[2]");
> + Node rateNode = (Node)exp.evaluate(node,
> XPathConstants.NODE);
> + double rate =
> Double.valueOf(rateNode.getTextContent().trim());
> + System.out.println("Exchange rate: USD 1.0=" + currency + " "
> + rate);
> +
> + System.out.println("Loading account data...");
> + XMLStreamReader accounts = accountData.getAccounts();
> +
> + System.out.println("Getting stock quote...");
> + String ticker =
> + "<q:GetQuotes
> xmlns:q=\"http://swanandmokashi.com\"><q:QuoteTicker>IBM,GOOG,MSFT</q:QuoteTicker></q:GetQuotes>";
> + XMLStreamReader request = factory.createXMLStreamReader(new
> StringReader(ticker));
> +
> + XMLStreamReader quotes = stockQuote.GetStockQuotes(request);
> +
> + System.out.println("Calculating total value...");
> + double value = stockValue.calculate(quotes, accounts);
> +
> + System.out.println("Total Value=USD " + value);
> +
> + return value * rate;
> + } catch (Exception e) {
> + throw new ServiceRuntimeException(e);
> + }
> + }
> +
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/CustomerAssetImpl.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,32 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import javax.xml.stream.XMLStreamReader;
> +
> +import org.osoa.sca.annotations.Remotable;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +@Remotable
> +public interface StockQuote {
> + public XMLStreamReader GetStockQuotes(XMLStreamReader input);
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,32 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package bigbank;
> +
> +import javax.xml.stream.XMLStreamReader;
> +
> +import org.osoa.sca.annotations.Remotable;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +@Remotable
> +public interface StockValue {
> + double calculate(XMLStreamReader quotes, XMLStreamReader accounts);
> +}
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/java/bigbank/StockValue.java
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/BigBank.composite
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,49 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> +-->
> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
> + targetNamespace="http://bigbank" name="BigBank">
> +
> + <component name="CustomerAsset">
> + <implementation.java class="bigbank.CustomerAssetImpl" />
> + <reference name="accountData" target="AccountData" />
> + <reference name="stockValue" target="StockValue" />
> +
> + <reference name="exchangeRate">
> + <tuscany:binding.rss
> +
> uri="http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S"
> />
> + </reference>
> + </component>
> +
> + <component name="AccountData">
> + <implementation.java class="bigbank.AccountDataImpl" />
> + </component>
> +
> + <component name="StockValue">
> + <tuscany:implementation.xquery location="stock.xq" />
> + <!--
> + <property name="currency">USD</property>
> + -->
> + </component>
> +
> + <reference name="StockQuoteReference"
> promote="CustomerAsset/stockQuote">
> + <binding.ws
> wsdlElement="http://swanandmokashi.com#wsdl.port(StockQuotes/StockQuotesSoap)"
> />
> + </reference>
> +
> +</composite>
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,11 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<customer id="123" xmlns="http://example.com/customer"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> + <firstName>John</firstName>
> + <lastName>Smith</lastName>
> + <accounts>
> + <checking id="C01" balance="1000.0"></checking>
> + <saving id="S01" balance="20000.0"></saving>
> + <stock symbol="IBM" quantity="500" />
> + <stock symbol="MSFT" quantity="200" />
> + </accounts>
> +</customer>
> \ No newline at end of file
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/accounts.xml
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,28 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<schema xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:tns="http://exmaple.com/customer"
> + targetNamespace="http://exmaple.com/customer"
> elementFormDefault="qualified">
> + <element name="customer" type="tns:Customer" />
> + <complexType name="Customer">
> + <sequence>
> + <element name="id" type="string"></element>
> + <element name="firstName" type="string"></element>
> + <element name="lastName" type="string"></element>
> + <element name="accounts" type="string"></element>
> + </sequence>
> + </complexType>
> + <complexType name="Accounts">
> + <choice>
> + <element name="checking" type="tns:Account"></element>
> + <element name="saving" type="tns:Account"></element>
> + <element name="stock" type="tns:Stock"></element>
> + </choice>
> + </complexType>
> + <complexType name="Account">
> + <attribute name="id" type="string"></attribute>
> + <attribute name="balance" type="float"></attribute>
> + </complexType>
> + <complexType name="Stock">
> + <attribute name="symbol" type="string"></attribute>
> + <attribute name="quantity" type="int"></attribute>
> + </complexType>
> +</schema>
> \ No newline at end of file
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/customer.xsd
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,56 @@
> +<?xml version='1.0' encoding='UTF-8'?>
> +<GetQuotesResponse xmlns="http://swanandmokashi.com">
> + <GetQuotesResult>
> + <Quote>
> + <CompanyName>INTL BUSINESS MAC</CompanyName>
> + <StockTicker>IBM</StockTicker>
> + <StockQuote>116.40</StockQuote>
> + <LastUpdated>10/3/2007 4:01pm</LastUpdated>
> + <Change>-1.96</Change>
> + <OpenPrice>117.65</OpenPrice>
> + <DayHighPrice>117.84</DayHighPrice>
> + <DayLowPrice>116.28</DayLowPrice>
> + <Volume>7892471</Volume>
> + <MarketCap>158.4B</MarketCap>
> + <YearRange>81.56 - 119.60</YearRange>
> + <ExDividendDate>Aug 8</ExDividendDate>
> + <DividendYield>1.18</DividendYield>
> + <DividendPerShare>1.40</DividendPerShare>
> + <PercentChange>-1.66%</PercentChange>
> + </Quote>
> + <Quote>
> + <CompanyName>GOOGLE</CompanyName>
> + <StockTicker>GOOG</StockTicker>
> + <StockQuote>584.0199</StockQuote>
> + <LastUpdated>10/3/2007 4:00pm</LastUpdated>
> + <Change>-0.3701</Change>
> + <OpenPrice>586.25</OpenPrice>
> + <DayHighPrice>588.99</DayHighPrice>
> + <DayLowPrice>580.36</DayLowPrice>
> + <Volume>3869172</Volume>
> + <MarketCap>182.3B</MarketCap>
> + <YearRange>398.19 - 596.81</YearRange>
> + <ExDividendDate>N/A</ExDividendDate>
> + <DividendYield>N/A</DividendYield>
> + <DividendPerShare>0.00</DividendPerShare>
> + <PercentChange>-0.06%</PercentChange>
> + </Quote>
> + <Quote>
> + <CompanyName>MICROSOFT CP</CompanyName>
> + <StockTicker>MSFT</StockTicker>
> + <StockQuote>29.4525</StockQuote>
> + <LastUpdated>10/3/2007 4:00pm</LastUpdated>
> + <Change>-0.2475</Change>
> + <OpenPrice>29.57</OpenPrice>
> + <DayHighPrice>29.85</DayHighPrice>
> + <DayLowPrice>29.29</DayLowPrice>
> + <Volume>37324944</Volume>
> + <MarketCap>276.1B</MarketCap>
> + <YearRange>26.60 - 31.84</YearRange>
> + <ExDividendDate>Aug 14</ExDividendDate>
> + <DividendYield>1.35</DividendYield>
> + <DividendPerShare>0.40</DividendPerShare>
> + <PercentChange>-0.83%</PercentChange>
> + </Quote>
> + </GetQuotesResult>
> +</GetQuotesResponse>
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/quotes.xml
> ------------------------------------------------------------------------------
> svn:keywords = Rev Date
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/stock.xq
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,52 @@
> +(:
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> +:)
> +declare namespace q="http://swanandmokashi.com";
> +declare namespace c="http://example.com/customer";
> +declare namespace stock="scaservice:java/bigbank.StockValue";
> +(: declare namespace currency="scaproperty:java/java.lang.String"; :)
> +
> +declare function stock:calculate($quoteDoc, $accountDoc) {
> + let $checking :=
> + trace(
> + sum(
> + for $a in $accountDoc/c:customer/c:accounts/c:checking
> + return $a/@balance
> + ), "Checking Balance")
> +
> + let $saving :=
> + trace(
> + sum(
> + for $a in $accountDoc/c:customer/c:accounts/c:saving
> + return $a/@balance
> + ), "Saving Blance")
> +
> + let $value :=
> + trace(
> + sum(
> + for $quote in
> $quoteDoc/q:GetQuotesResponse/q:GetQuotesResult/q:Quote,
> + $account in $accountDoc/c:customer/c:accounts/c:stock
> + where string($quote/q:StockTicker) = string($account/@symbol)
> + return
> + trace(number($quote/q:StockQuote),"Stock Price") *
> trace(number($account/@quantity), "Quantity")
> + ), "Stock Value")
> + return trace($checking + $saving + $value, "Total Value")
> +};
> +
> +
> +
>
> Added:
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> URL:
> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl?rev=581755&view=auto
> ==============================================================================
> ---
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> (added)
> +++
> incubator/tuscany/java/sca/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl
> Wed Oct 3 18:11:33 2007
> @@ -0,0 +1,105 @@
> +<?xml version="1.0" encoding="utf-8"?>
> +<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> + xmlns:s="http://www.w3.org/2001/XMLSchema"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> + xmlns:tns="http://swanandmokashi.com"
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> + xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> targetNamespace="http://swanandmokashi.com"
> + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> + <wsdl:types>
> + <s:schema elementFormDefault="qualified"
> targetNamespace="http://swanandmokashi.com">
> + <s:element name="GetQuotes">
> + <s:complexType>
> + <s:sequence>
> + <s:element minOccurs="0" maxOccurs="1"
> name="QuoteTicker" type="s:string" />
> + </s:sequence>
> + </s:complexType>
> + </s:element>
> + <s:element name="GetQuotesResponse">
> + <s:complexType>
> + <s:sequence>
> + <s:element minOccurs="0" maxOccurs="1"
> name="GetQuotesResult" type="tns:ArrayOfQuote" />
> + </s:sequence>
> + </s:complexType>
> + </s:element>
> + <s:complexType name="ArrayOfQuote">
> + <s:sequence>
> + <s:element minOccurs="0" maxOccurs="unbounded"
> name="Quote" type="tns:Quote" />
> + </s:sequence>
> + </s:complexType>
> + <s:complexType name="Quote">
> + <s:sequence>
> + <s:element minOccurs="0" maxOccurs="1"
> name="CompanyName" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="StockTicker" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="StockQuote" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="LastUpdated" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1" name="Change"
> type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="OpenPrice" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="DayHighPrice" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="DayLowPrice" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1" name="Volume"
> type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="MarketCap" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="YearRange" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="ExDividendDate" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="DividendYield" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="DividendPerShare" type="s:string" />
> + <s:element minOccurs="0" maxOccurs="1"
> name="PercentChange" type="s:string" />
> + </s:sequence>
> + </s:complexType>
> + <s:element name="ArrayOfQuote" nillable="true"
> type="tns:ArrayOfQuote" />
> + </s:schema>
> + </wsdl:types>
> + <wsdl:message name="GetQuotesSoapIn">
> + <wsdl:part name="parameters" element="tns:GetQuotes" />
> + </wsdl:message>
> + <wsdl:message name="GetQuotesSoapOut">
> + <wsdl:part name="parameters" element="tns:GetQuotesResponse" />
> + </wsdl:message>
> + <wsdl:message name="GetQuotesHttpGetIn">
> + <wsdl:part name="QuoteTicker" type="s:string" />
> + </wsdl:message>
> + <wsdl:message name="GetQuotesHttpGetOut">
> + <wsdl:part name="Body" element="tns:ArrayOfQuote" />
> + </wsdl:message>
> + <wsdl:message name="GetQuotesHttpPostIn">
> + <wsdl:part name="QuoteTicker" type="s:string" />
> + </wsdl:message>
> + <wsdl:message name="GetQuotesHttpPostOut">
> + <wsdl:part name="Body" element="tns:ArrayOfQuote" />
> + </wsdl:message>
> + <wsdl:portType name="StockQuotesSoap">
> + <wsdl:operation name="GetStockQuotes">
> + <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
> + Retrieves the latest(20 minutes delay) stock quote of a
> stock ticker. To get multiple quotes enter
> + Ticker symbols seperated by ,(eg. MSFT,YHOO,GE) or space
> (eg. MSFT YHOO GE). <BR>Gives the company
> + name ,ticker,Stock Quote, Change,Open price ,Day's
> range(high and low),Volume, the Market Cap and the
> + Year range of the stock price.<BR><B>Powered
> by Yahoo!'s stock Quotes service.Not for
> + commerical use.</b>
> + </documentation>
> + <wsdl:input name="GetQuotes" message="tns:GetQuotesSoapIn" />
> + <wsdl:output name="GetQuotes" message="tns:GetQuotesSoapOut"
> />
> + </wsdl:operation>
> + </wsdl:portType>
> +
> +
> + <wsdl:binding name="StockQuotesSoap" type="tns:StockQuotesSoap">
> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document" />
> + <wsdl:operation name="GetStockQuotes">
> + <soap:operation
> soapAction="http://swanandmokashi.com/GetQuotes" style="document" />
> + <wsdl:input name="GetQuotes">
> + <soap:body use="literal" />
> + </wsdl:input>
> + <wsdl:output name="GetQuotes">
> + <soap:body use="literal" />
> + </wsdl:output>
> + </wsdl:operation>
> + </wsdl:binding>
> +
> +
> + <wsdl:service name="StockQuotes">
> + <documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
> + <wsdl:port name="StockQuotesSoap" binding="tns:StockQuotesSoap">
> + <soap:address
> location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx"
> />
> + </wsdl:port>
> +
> +
> + </wsdl:service>
> +</wsdl:definitions>
> \ No newline at end of file
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-commits-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org