tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r426629 [1/4] - in /incubator/tuscany/java/sca/bindings/binding.axis2: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/binding/ src/main/java/o...
Date Fri, 28 Jul 2006 18:08:37 GMT
Author: jmarino
Date: Fri Jul 28 11:08:35 2006
New Revision: 426629

URL: http://svn.apache.org/viewvc?rev=426629&view=rev
Log:
commit Jervis' patch for TUSCANY-575

Added:
    incubator/tuscany/java/sca/bindings/binding.axis2/
    incubator/tuscany/java/sca/bindings/binding.axis2/.ruleset
    incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/WebServiceOperationMetaData.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/WebServicePortMetaData.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/META-INF/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/META-INF/LICENSE.txt   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/META-INF/NOTICE   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/META-INF/README.txt   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/tuscany/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/engine/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/engine/config/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/engine/config/axis2.xml   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/main/resources/system.fragment   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/Axis2ReferenceTestCase.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/Axis2ServiceTestCase.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/Greeter.java   (with props)
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/resources/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/resources/wsdl/
    incubator/tuscany/java/sca/bindings/binding.axis2/src/test/resources/wsdl/hello_world_doc_lit.wsdl   (with props)

Added: incubator/tuscany/java/sca/bindings/binding.axis2/.ruleset
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/.ruleset?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/.ruleset (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/.ruleset Fri Jul 28 11:08:35 2006
@@ -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/bindings/binding.axis2/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml Fri Jul 28 11:08:35 2006
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ -->
+<project>
+
+    <parent>
+        <groupId>org.apache.tuscany.bindings</groupId>
+        <artifactId>bindings</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>axis2</artifactId>
+    <name>Tuscany Axis2 Binding</name>
+    <description>Implementation of the SCA Web Services binding using Axis2.</description>
+
+    <dependencies>
+		  <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>core</artifactId>
+            <version>${sca.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>tuscany-sdo-impl</artifactId>
+            <version>${sca.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymockclassextension</artifactId>
+            <version>2.2</version>
+            <scope>test</scope>
+        </dependency>
+		  
+		  <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>test</artifactId>
+            <version>${sca.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+<!--
+        <dependency>
+            <groupId>org.apache.tuscany.containers</groupId>
+            <artifactId>spring</artifactId>
+            <version>${sca.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.containers</groupId>
+            <artifactId>groovy</artifactId>
+            <version>${sca.version}</version>
+            <scope>test</scope>
+        </dependency>
+-->
+        <!-- axis 2.0 -->
+        <dependency>
+            <groupId>axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+            <version>1.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ws-commons</groupId>
+            <artifactId>axiom-api</artifactId>
+            <version>1.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ws-commons</groupId>
+            <artifactId>axiom-impl</artifactId>
+            <version>1.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ws-commons</groupId>
+            <artifactId>neethi</artifactId>
+            <version>1.0.1</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ws.commons</groupId>
+            <artifactId>XmlSchema</artifactId>
+            <version>1.0.2</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.0</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.3</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+            <version>1.5.2</version>
+        </dependency>
+
+        <dependency>
+          <groupId>stax</groupId>
+          <artifactId>stax-api</artifactId>
+          <version>1.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>woodstox</groupId>
+            <artifactId>wstx-asl</artifactId>
+            <version>2.9.3</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- end of axis 2.0 -->
+			<dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+			</dependency>
+
+    </dependencies>
+    <!-- buildSource>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                <excludes>
+                <exclude>**/org/apache/tuscany/binding/axis/engine/config/AxisEngineConfigurationFactory.java</exclude>
+                <exclude>**/org/apache/tuscany/binding/axis/handler/WebServiceEntryPointBean.java</exclude>
+                </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+
+    </buildSource -->
+</project>

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,57 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.component.SCAObject;
+import org.apache.tuscany.spi.deployer.DeploymentContext;
+import org.apache.tuscany.spi.extension.BindingBuilderExtension;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.model.BoundServiceDefinition;
+
+/**
+ * Builds a {@link org.osoa.sca.annotations.Service} or {@link org.apache.tuscany.spi.component.Reference} configured
+ * with the Axis2 binding
+ *
+ * @version $Rev$ $Date$
+ */
+public class Axis2BindingBuilder extends BindingBuilderExtension<WebServiceBinding> {
+    public SCAObject build(CompositeComponent parent,
+                           BoundServiceDefinition<WebServiceBinding> boundServiceDefinition,
+                           DeploymentContext deploymentContext) {
+        WebServiceBinding wsBinding = boundServiceDefinition.getBinding();
+        //FIXME: Axis2Service needs an instance of ServletHost as parameter. How to get it?
+        return new Axis2Service(
+            boundServiceDefinition.getName(),
+            parent,
+            wireService,
+            wsBinding,
+            null);
+    }
+
+    public SCAObject build(CompositeComponent parent,
+                           BoundReferenceDefinition<WebServiceBinding> boundReferenceDefinition,
+                           DeploymentContext deploymentContext) {
+        WebServiceBinding wsBinding = boundReferenceDefinition.getBinding();
+        return new Axis2Reference(
+            boundReferenceDefinition.getName(),
+            parent,
+            wireService,
+            wsBinding);
+    }
+
+    protected Class<WebServiceBinding> getBindingType() {
+        return WebServiceBinding.class;
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,138 @@
+/**
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+
+import java.lang.reflect.Method;
+import java.util.List;
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.extension.ReferenceExtension;
+import org.apache.tuscany.spi.wire.TargetInvoker;
+import org.apache.tuscany.spi.wire.WireService;
+
+import commonj.sdo.helper.TypeHelper;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.OperationClient;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContextConstants;
+import org.apache.axis2.description.AxisService;
+import org.apache.tuscany.binding.axis2.util.SDODataBinding;
+import org.apache.tuscany.binding.axis2.util.TuscanyAxisConfigurator;
+import org.apache.tuscany.binding.axis2.util.WebServiceOperationMetaData;
+import org.apache.tuscany.binding.axis2.util.WebServicePortMetaData;
+
+
+/**
+ * Axis2Reference uses Axis2 to invoke a remote web service
+ */
+public class Axis2Reference<T> extends ReferenceExtension<T> {
+
+    private WebServicePortMetaData wsPortMetaData;
+    private ServiceClient serviceClient;
+
+    public Axis2Reference(String theName,
+                          CompositeComponent<?> parent,
+                          WireService wireService,
+                          WebServiceBinding wsBinding) {
+        super(theName, parent, wireService);
+        try {
+            Definition wsdlDefinition = wsBinding.getWSDLDefinition();
+            wsPortMetaData =
+                new WebServicePortMetaData(wsdlDefinition, wsBinding.getWSDLPort(), wsBinding.getURI(), false);
+            serviceClient = createServiceClient(wsdlDefinition, wsPortMetaData);
+        } catch (AxisFault e) {
+            //TODO
+        }
+    }
+
+    public TargetInvoker createTargetInvoker(String serviceName, Method operation) {
+        Axis2TargetInvoker invoker = null;
+        try {
+            //FIXME: SDODataBinding needs to pass in TypeHelper and classLoader as parameters.
+            //TypeHelper typeHelper = wsBinding.getTypeHelper();
+            //ClassLoader cl = wsBinding.getResourceLoader().getClassLoader();
+            TypeHelper typeHelper = null;
+            ClassLoader cl = null;
+            invoker = createOperationInvokers(serviceClient, operation, typeHelper, cl, wsPortMetaData);
+        } catch (AxisFault e) {
+            //TODO
+        }
+        return invoker;
+    }
+
+    /**
+     * Create an Axis2 ServiceClient
+     */
+    private ServiceClient createServiceClient(Definition wsdlDefinition,
+                                              WebServicePortMetaData wsPortMetaData) throws AxisFault {
+
+        TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator(null);
+        ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext();
+        QName serviceQName = wsPortMetaData.getServiceName();
+        String portName = wsPortMetaData.getPortName().getLocalPart();
+        AxisService axisService =
+            AxisService.createClientSideAxisService(wsdlDefinition, serviceQName, portName, new Options());
+        return new ServiceClient(configurationContext, axisService);
+    }
+
+    /**
+     * Create and configure an Axis2TargetInvoker for each operations
+     */
+    private Axis2TargetInvoker createOperationInvokers(ServiceClient serviceClient,
+                                                       Method m,
+                                                       TypeHelper typeHelper,
+                                                       ClassLoader cl,
+                                                       WebServicePortMetaData wsPortMetaData)
+        throws AxisFault {
+        SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory();
+        String portTypeNS = wsPortMetaData.getPortTypeName().getNamespaceURI();
+
+        String methodName = m.getName();
+
+        WebServiceOperationMetaData operationMetaData = wsPortMetaData.getOperationMetaData(methodName);
+        boolean isWrapped = operationMetaData.isDocLitWrapped();
+        List<?> sig = operationMetaData.getOperationSignature();
+
+        SDODataBinding dataBinding =
+            new SDODataBinding(cl, typeHelper, isWrapped, sig.size() > 0 ? (QName) sig.get(0) : null);
+
+        Options options = new Options();
+        options.setTo(new EndpointReference(wsPortMetaData.getEndpoint()));
+        options.setProperty(MessageContextConstants.CHUNKED, Boolean.FALSE);
+
+        String wsdlOperationName = operationMetaData.getBindingOperation().getOperation().getName();
+
+        String soapAction = wsPortMetaData.getOperationMetaData(wsdlOperationName).getSOAPAction();
+        if (soapAction != null && soapAction.length() > 1) {
+            options.setAction(soapAction);
+        }
+
+        QName wsdlOperationQName = new QName(portTypeNS, wsdlOperationName);
+        // Axis2 operationClients can not be shared so create a new one for each request
+        OperationClient operationClient = serviceClient.createClient(wsdlOperationQName);
+
+        return new Axis2TargetInvoker(wsdlOperationQName, options, dataBinding, soapFactory, operationClient);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Reference.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,287 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Set;
+import java.util.Vector;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.osoa.sca.annotations.Destroy;
+
+import org.apache.tuscany.spi.CoreRuntimeException;
+import org.apache.tuscany.spi.builder.BuilderConfigException;
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.extension.ServiceExtension;
+import org.apache.tuscany.spi.host.ServletHost;
+import org.apache.tuscany.spi.wire.WireService;
+
+import commonj.sdo.helper.TypeHelper;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.WSDL2AxisServiceBuilder;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.tuscany.binding.axis2.util.SDODataBinding;
+import org.apache.tuscany.binding.axis2.util.WebServiceOperationMetaData;
+import org.apache.tuscany.binding.axis2.util.WebServicePortMetaData;
+
+/**
+ * An implementation of a {@link ServiceExtension} configured with the Axis2 binding
+ *
+ * @version $Rev$ $Date$
+ */
+public class Axis2Service<T> extends ServiceExtension<T> {
+
+    private ServletHost tomcatHost;
+    private WebServiceBinding wsBinding;
+
+    public Axis2Service(String theName,
+                        CompositeComponent parent, WireService wireService,
+                        WebServiceBinding binding,
+                        ServletHost servletHost) {
+        super(theName, parent, wireService);
+        wsBinding = binding;
+        tomcatHost = servletHost;
+    }
+
+    public void start() {
+        super.start();
+        initServlet();
+    }
+
+    @Destroy
+    public void stop() throws CoreRuntimeException {
+        super.stop();
+    }
+
+    protected Method getMethod(Class<?> serviceInterface, String operationName) {
+        // Note: this doesn't support overloaded operations
+        Method[] methods = serviceInterface.getMethods();
+        for (Method m : methods) {
+            if (m.getName().equals(operationName)) {
+                return m;
+            }
+            // tolerate WSDL with capatalized operation name
+            StringBuilder sb = new StringBuilder(operationName);
+            sb.setCharAt(0, Character.toLowerCase(sb.charAt(0)));
+            if (m.getName().equals(sb.toString())) {
+                return m;
+            }
+        }
+        throw new BuilderConfigException(
+            "no operation named " + operationName + " found on service interface: " + serviceInterface.getName());
+    }
+
+    private void initServlet() {
+        AxisService axisService;
+        try {
+            axisService = createAxisService(wsBinding);
+        } catch (AxisFault e) {
+            throw new BuilderConfigException(e);
+        }
+        WebServiceEntryPointServlet servlet = new WebServiceEntryPointServlet(axisService);
+        ServletConfig sc = createDummyServletConfig();
+        try {
+            servlet.init(sc);
+        } catch (ServletException e) {
+            throw new BuilderConfigException(e);
+        }
+
+        String servletMapping = wsBinding.getWebAppName() + "/services/" + this.getName();
+        tomcatHost.registerMapping(servletMapping, servlet);
+    }
+
+    private AxisService createAxisService(WebServiceBinding wsBinding) throws AxisFault {
+        Definition definition = wsBinding.getWSDLDefinition();
+        WebServicePortMetaData wsdlPortInfo =
+            new WebServicePortMetaData(definition, wsBinding.getWSDLPort(), null, false);
+
+        // AxisServiceGroup serviceGroup = new AxisServiceGroup(axisConfig);
+        // serviceGroup.setServiceGroupName(wsdlPortInfo.getServiceName().getLocalPart());
+        // axisConfig.addServiceGroup(serviceGroup);
+
+        WSDL2AxisServiceBuilder builder =
+            new WSDL2AxisServiceBuilder(definition, wsdlPortInfo.getServiceName(), wsdlPortInfo.getPort().getName());
+        builder.setServerSide(true);
+        AxisService axisService = builder.populateService();
+
+        axisService.setName(this.getName());
+        // axisService.setParent(serviceGroup);
+        axisService.setServiceDescription("Tuscany configured AxisService for Service: '" + this.getName() + '\'');
+
+        //FIXME:
+        //TypeHelper typeHelper = wsBinding.getTypeHelper();
+        //ClassLoader cl = wsBinding.getResourceLoader().getClassLoader();
+        TypeHelper typeHelper = null;
+        ClassLoader cl = null;
+
+        Class<?> serviceInterface = this.getInterface();
+
+        PortType wsdlPortType = wsdlPortInfo.getPortType();
+        for (Object o : wsdlPortType.getOperations()) {
+            Operation wsdlOperation = (Operation) o;
+            String operationName = wsdlOperation.getName();
+            QName operationQN = new QName(definition.getTargetNamespace(), operationName);
+            Object entryPointProxy = this.getServiceInstance();
+
+            WebServiceOperationMetaData omd = wsdlPortInfo.getOperationMetaData(operationName);
+
+            Method operationMethod = getMethod(serviceInterface, operationName);
+            //outElementQName is not needed when calling fromOMElement method, and we can not get elementQName for
+            // oneway operation.
+            SDODataBinding dataBinding = new SDODataBinding(cl, typeHelper, omd.isDocLitWrapped(), null);
+            WebServiceEntryPointInOutSyncMessageReceiver msgrec =
+                new WebServiceEntryPointInOutSyncMessageReceiver(entryPointProxy, operationMethod,
+                    dataBinding, cl);
+
+            AxisOperation axisOp = axisService.getOperation(operationQN);
+            axisOp.setMessageExchangePattern(WSDLConstants.MEP_URI_IN_OUT);
+            axisOp.setMessageReceiver(msgrec);
+        }
+
+        return axisService;
+    }
+
+    private ServletConfig createDummyServletConfig() {
+        return new DummyServletConfig();
+    }
+
+    private class DummyServletConfig implements ServletConfig {
+
+        public String getServletName() {
+            return "TuscanyWSServlet";
+        }
+
+        public ServletContext getServletContext() {
+            return new DummyServletContext();
+        }
+
+        public String getInitParameter(String arg0) {
+            return null;
+        }
+
+        public Enumeration getInitParameterNames() {
+            return new Vector().elements();
+        }
+    }
+
+
+    private class DummyServletContext implements ServletContext {
+
+        public ServletContext getContext(String arg0) {
+            return null;
+        }
+
+        public int getMajorVersion() {
+            return 0;
+        }
+
+        public int getMinorVersion() {
+            return 0;
+        }
+
+        public String getMimeType(String arg0) {
+            return null;
+        }
+
+        public Set getResourcePaths(String arg0) {
+            return null;
+        }
+
+        public URL getResource(String arg0) throws MalformedURLException {
+            return null;
+        }
+
+        public InputStream getResourceAsStream(String arg0) {
+            return null;
+        }
+
+        public RequestDispatcher getRequestDispatcher(String arg0) {
+            return null;
+        }
+
+        public RequestDispatcher getNamedDispatcher(String arg0) {
+            return null;
+        }
+
+        public Servlet getServlet(String arg0) throws ServletException {
+            return null;
+        }
+
+        public Enumeration getServlets() {
+            return null;
+        }
+
+        public Enumeration getServletNames() {
+            return null;
+        }
+
+        public void log(String arg0) {
+        }
+
+        public void log(Exception arg0, String arg1) {
+        }
+
+        public void log(String arg0, Throwable arg1) {
+        }
+
+        public String getRealPath(String arg0) {
+            return null;
+        }
+
+        public String getServerInfo() {
+            return null;
+        }
+
+        public String getInitParameter(String arg0) {
+            return null;
+        }
+
+        public Enumeration getInitParameterNames() {
+            return null;
+        }
+
+        public Object getAttribute(String arg0) {
+            return null;
+        }
+
+        public Enumeration getAttributeNames() {
+            return null;
+        }
+
+        public void setAttribute(String arg0, Object arg1) {
+        }
+
+        public void removeAttribute(String arg0) {
+        }
+
+        public String getServletContextName() {
+            return null;
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2Service.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,149 @@
+/**
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+
+import java.lang.reflect.InvocationTargetException;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.spi.wire.InvocationRuntimeException;
+import org.apache.tuscany.spi.wire.Message;
+import org.apache.tuscany.spi.wire.TargetInvoker;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.OperationClient;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.tuscany.binding.axis2.util.SDODataBinding;
+
+/**
+ * Axis2TargetInvoker uses an Axis2 OperationClient to invoke a remote web service
+ */
+public class Axis2TargetInvoker implements TargetInvoker {
+
+    //private QName wsdlOperationName;
+    private Options options;
+    private SDODataBinding dataBinding;
+    private SOAPFactory soapFactory;
+    private OperationClient operationClient;
+
+    public Axis2TargetInvoker(QName wsdlOperationName, Options options, SDODataBinding dataBinding,
+                              SOAPFactory soapFactory,
+                              OperationClient operationClient) {
+        //this.wsdlOperationName = wsdlOperationName;
+        this.options = options;
+        this.dataBinding = dataBinding;
+        this.soapFactory = soapFactory;
+        this.operationClient = operationClient;
+    }
+
+    /**
+     * Invoke a WS operation
+     *
+     * @param payload
+     * @return
+     * @throws InvocationTargetException
+     */
+    public Object invokeTarget(final Object payload) throws InvocationTargetException {
+        try {
+            operationClient.setOptions(options);
+
+            SOAPEnvelope env = soapFactory.getDefaultEnvelope();
+
+            if (payload != null && payload.getClass().isArray() && ((Object[]) payload).length > 0) {
+                OMElement requestOM = dataBinding.toOMElement((Object[]) payload);
+                env.getBody().addChild(requestOM);
+            }
+
+            MessageContext requestMC = new MessageContext();
+            requestMC.setEnvelope(env);
+
+            operationClient.addMessageContext(requestMC);
+
+            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+            ClassLoader scl = this.getClass().getClassLoader();
+            try {
+                if (tccl != scl) {
+                    Thread.currentThread().setContextClassLoader(scl);
+                }
+
+                operationClient.execute(true);
+
+            } finally {
+                if (tccl != scl) {
+                    Thread.currentThread().setContextClassLoader(tccl);
+                }
+            }
+
+            MessageContext responseMC = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+            OMElement responseOM = responseMC.getEnvelope().getBody().getFirstElement();
+
+            Object[] os = null;
+            if (responseOM != null) {
+                os = dataBinding.fromOMElement(responseOM);
+            }
+
+            Object response;
+            if (os == null || os.length < 1) {
+                response = null;
+            } else {
+                response = os[0];
+            }
+
+            return response;
+
+        } catch (AxisFault e) {
+            throw new InvocationTargetException(e);
+        }
+
+    }
+
+    public Message invoke(Message msg) throws InvocationRuntimeException {
+        try {
+            Object resp = invokeTarget(msg.getBody());
+            msg.setBody(resp);
+        } catch (Throwable e) {
+            msg.setBody(e);
+        }
+        return msg;
+    }
+
+    public Axis2TargetInvoker clone() throws CloneNotSupportedException {
+        try {
+            return (Axis2TargetInvoker) super.clone();
+        } catch (CloneNotSupportedException e) {
+            // will not happen
+            return null;
+        }
+    }
+
+    public boolean isCacheable() {
+        return true;
+    }
+
+    public void setCacheable(boolean cacheable) {
+
+    }
+
+    public boolean isOptimizable() {
+        return false;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2TargetInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,86 @@
+/**
+ *
+ *  Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import org.apache.tuscany.spi.model.Binding;
+
+/**
+ * Represents a Celtix binding configuration in an assembly
+ *
+ * @version $Rev$ $Date$
+ */
+public class WebServiceBinding extends Binding {
+
+    private Definition definition;
+    private Port port;
+    private Service service;
+    //private String portURI;
+    private String uri;
+    private String webAppName;
+
+    public WebServiceBinding(Definition definition, Port port, String uri, String portURI, Service service) {
+        this.definition = definition;
+        this.port = port;
+        this.uri = uri;
+        //this.portURI = portURI;
+        this.service = service;
+    }
+
+    public Port getWSDLPort() {
+        return port;
+    }
+
+    public Service getWSDLService() {
+        return service;
+    }
+
+    public void setWSDLPort(Port value) {
+        port = value;
+    }
+
+    public Definition getWSDLDefinition() {
+        return definition;
+    }
+
+    public void setWSDLDefinition(Definition def) {
+        definition = def;
+    }
+
+    //    public void setPortURI(String uri) {
+    //        portURI = uri;
+    //    }
+
+    public String getURI() {
+        return uri;
+    }
+
+    public void setURI(String theUri) {
+        this.uri = theUri;
+    }
+
+    public void setWebAppName(String webAppName) {
+        this.webAppName = webAppName;
+    }
+
+    public String getWebAppName() {
+        return webAppName;
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,134 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+
+import java.util.Collection;
+import java.util.List;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
+import org.osoa.sca.annotations.Scope;
+
+import org.apache.tuscany.spi.annotation.Autowire;
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.deployer.DeploymentContext;
+import org.apache.tuscany.spi.extension.LoaderExtension;
+import org.apache.tuscany.spi.loader.LoaderException;
+import org.apache.tuscany.spi.loader.LoaderRegistry;
+import org.apache.tuscany.spi.services.wsdl.WSDLDefinitionRegistry;
+
+
+/**
+ * Parses a <code>WebServiceBinding</code> entry in an assembly XML file
+ *
+ * @version $Rev$ $Date$
+ */
+@Scope("MODULE")
+public class WebServiceBindingLoader extends LoaderExtension<WebServiceBinding> {
+    public static final QName BINDING_WS = new QName(XML_NAMESPACE_1_0, "binding.ws");
+
+    protected WSDLDefinitionRegistry wsdlRegistry;
+
+    public WebServiceBindingLoader(@Autowire LoaderRegistry registry,
+                                   @Autowire WSDLDefinitionRegistry wsdlRegistry) {
+        super(registry);
+        this.wsdlRegistry = wsdlRegistry;
+    }
+
+    public QName getXMLType() {
+        return BINDING_WS;
+    }
+
+    public WebServiceBinding load(CompositeComponent parent, XMLStreamReader reader,
+                                  DeploymentContext deploymentContext
+    ) throws XMLStreamException, LoaderException {
+        String uri = reader.getAttributeValue(null, "uri");
+        String portURI = reader.getAttributeValue(null, "port");
+        return createBinding(uri, portURI);
+    }
+
+    @SuppressWarnings("unchecked")
+    private WebServiceBinding createBinding(String port, String portURI) {
+        List<Definition> definitions = null;
+        // FIXME wsdlRegistry.getDefinitionsForNamespace(portNamespace,
+        // resourceLoader);
+        // Get the WSDL port namespace and name
+        if (port == null && portURI != null) {
+            int h = portURI.indexOf('#');
+            String portNamespace = portURI.substring(0, h);
+            String serviceName;
+            String portName;
+
+            String fragment = portURI.substring(h + 1);
+            if (fragment.startsWith("wsdl.endpoint(") && fragment.endsWith(")")) {
+                fragment = fragment.substring(14, fragment.length() - 1);
+                int slash = fragment.indexOf('/');
+                if (slash != -1) {
+                    serviceName = fragment.substring(0, slash);
+                    portName = fragment.substring(slash + 1);
+                } else {
+                    serviceName = null;
+                    portName = fragment;
+                }
+            } else {
+                serviceName = null;
+                portName = fragment;
+            }
+
+            // FIXME definitions is always null
+            if (definitions == null) {
+                throw new IllegalArgumentException("Cannot find WSDL definition for " + portNamespace);
+            }
+            Definition definition = null;
+            Port thePort = null;
+            Service service = null;
+            for (Definition def : definitions) {
+
+                // Find the port with the given name
+                for (Service serv : (Collection<Service>) def.getServices().values()) {
+                    QName sqn = serv.getQName();
+                    if (serviceName != null
+                        && !serviceName.equals(sqn.getLocalPart())) {
+                        continue;
+                    }
+
+                    Port p = serv.getPort(portName);
+                    if (p != null) {
+                        service = serv;
+                        definition = def;
+                        thePort = p;
+                        break;
+                    }
+                }
+            }
+            if (thePort == null) {
+                throw new IllegalArgumentException("Cannot find WSDL port " + portURI);
+
+            }
+            return new WebServiceBinding(definition, thePort, port, portURI, service);
+        }
+        // FIXME
+        return null;
+
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceBindingLoader.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,98 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2;
+
+
+import java.lang.reflect.Method;
+
+import org.apache.tuscany.spi.wire.InvocationRuntimeException;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.tuscany.binding.axis2.util.SDODataBinding;
+
+public class WebServiceEntryPointInOutSyncMessageReceiver extends AbstractInOutSyncMessageReceiver {
+
+    protected Method operationMethod;
+    protected SDODataBinding dataBinding;
+    protected ClassLoader classLoader;
+    private Object entryPointProxy;
+
+    public WebServiceEntryPointInOutSyncMessageReceiver(Object entryPointProxy,
+                                                        Method operationMethod,
+                                                        SDODataBinding dataBinding,
+                                                        ClassLoader classLoader) {
+        this.entryPointProxy = entryPointProxy;
+        this.operationMethod = operationMethod;
+        this.dataBinding = dataBinding;
+        this.classLoader = classLoader;
+    }
+
+    @Override
+    public void invokeBusinessLogic(MessageContext inMC, MessageContext outMC) throws AxisFault {
+        try {
+            OMElement requestOM = inMC.getEnvelope().getBody().getFirstElement();
+            Object[] request;
+            if (requestOM != null) {
+                request = dataBinding.fromOMElement(requestOM);
+            } else {
+                request = new Object[0];
+            }
+
+            Object response;
+            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+            try {
+                if (tccl != classLoader) {
+                    Thread.currentThread().setContextClassLoader(classLoader);
+                }
+
+                response = operationMethod.invoke(entryPointProxy, request);
+
+            } finally {
+                if (tccl != classLoader) {
+                    Thread.currentThread().setContextClassLoader(tccl);
+                }
+            }
+
+            SOAPEnvelope soapEnvelope = getSOAPFactory(inMC).getDefaultEnvelope();
+
+            OMElement responseOM;
+            if (response != null) {
+                responseOM = dataBinding.toOMElement(new Object[]{response});
+                soapEnvelope.getBody().addChild(responseOM);
+            }
+
+            outMC.setEnvelope(soapEnvelope);
+            outMC.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE);
+
+        } catch (InvocationRuntimeException e) {
+            // throw new InvocationRuntimeException(e);
+            Throwable t = e.getCause();
+            if (t instanceof Exception) {
+                throw AxisFault.makeFault((Exception) t);
+            }
+            throw e;
+        } catch (Exception e) {
+            throw AxisFault.makeFault(e);
+        }
+
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointInOutSyncMessageReceiver.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,110 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+
+package org.apache.tuscany.binding.axis2;
+
+
+import java.io.IOException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.transport.http.AxisServlet;
+
+/**
+ * @version $Rev: 383148 $ $Date: 2006-03-04 08:07:17 -0800 (Sat, 04 Mar 2006) $
+ */
+public class WebServiceEntryPointServlet extends AxisServlet {
+
+    private static final long serialVersionUID = 1L;
+
+    private AxisService axisService;
+
+    public WebServiceEntryPointServlet(AxisService axisService) {
+        this.axisService = axisService;
+    }
+
+    public void init(final ServletConfig config) throws ServletException {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        ClassLoader scl = this.getClass().getClassLoader();
+        try {
+            if (tccl != scl) {
+                Thread.currentThread().setContextClassLoader(scl);
+            }
+            try {
+                super.init(config);
+                configContext.getAxisConfiguration().addService(axisService);
+            } catch (Exception e) {
+                throw new ServletException(e);
+            }
+        } finally {
+            if (tccl != scl) {
+                Thread.currentThread().setContextClassLoader(tccl);
+            }
+        }
+    }
+
+    @Override
+    protected void doGet(final HttpServletRequest arg0, final HttpServletResponse arg1)
+        throws ServletException, IOException {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        ClassLoader scl = this.getClass().getClassLoader();
+        try {
+            if (tccl != scl) {
+                Thread.currentThread().setContextClassLoader(scl);
+            }
+
+            try {
+                super.doGet(arg0, arg1);
+            } catch (Exception e) {
+                e.printStackTrace();
+                throw new ServletException(e);
+            }
+
+        } finally {
+            if (tccl != scl) {
+                Thread.currentThread().setContextClassLoader(tccl);
+            }
+        }
+    }
+
+    @Override
+    protected void doPost(final HttpServletRequest arg0, final HttpServletResponse arg1)
+        throws ServletException, IOException {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        ClassLoader scl = this.getClass().getClassLoader();
+        try {
+            if (tccl != scl) {
+                Thread.currentThread().setContextClassLoader(scl);
+            }
+
+            try {
+                super.doPost(arg0, arg1);
+            } catch (Exception e) {
+                e.printStackTrace();
+                throw new ServletException(e);
+            }
+
+        } finally {
+            if (tccl != scl) {
+                Thread.currentThread().setContextClassLoader(tccl);
+            }
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/WebServiceEntryPointServlet.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,91 @@
+/**
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.tuscany.spi.wire.InvocationRuntimeException;
+
+import commonj.sdo.helper.TypeHelper;
+import org.apache.axiom.om.OMElement;
+
+/**
+ * DataBinding for converting between AXIOM OMElement and Java Objects
+ */
+public class SDODataBinding {
+
+    //private ClassLoader classLoader;
+    //private TypeHelper typeHelper;
+    //private boolean isWrapped;
+    //private QName outElementQName;
+
+    public SDODataBinding(ClassLoader classLoader, TypeHelper typeHelper, boolean isWrapped, QName outElementQName) {
+        //this.classLoader = classLoader;
+        //this.typeHelper = typeHelper;
+        //this.isWrapped = isWrapped;
+        //this.outElementQName = outElementQName;
+    }
+
+    public Object[] fromOMElement(OMElement omElement) {
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            omElement.serialize(baos);
+            baos.flush();
+            baos.close();
+
+            //FIXME: need to use SDOXMLHelper
+            //return SDOXMLHelper.toObjects(classLoader,typeHelper, baos.toByteArray(), isWrapped);
+            return null;
+
+        } catch (IOException e) {
+            throw new InvocationRuntimeException(e);
+        } catch (XMLStreamException e) {
+            throw new InvocationRuntimeException(e);
+        }
+    }
+
+    public OMElement toOMElement(Object[] os) {
+        //FIXME
+/*
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+            DataObject dataObject = SDOXMLHelper.toDataObject(classLoader, typeHelper, os, outElementQName, isWrapped);
+            XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper);
+            xmlHelper.save(dataObject, outElementQName.getNamespaceURI(), outElementQName.getLocalPart(), baos);
+            baos.close();
+
+            XMLStreamReader xsr = XMLInputFactory.newInstance().createXMLStreamReader(new ByteArrayInputStream(
+            baos.toByteArray()));
+            OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(), xsr);
+            OMElement omElement = builder.getDocumentElement();
+
+            return omElement;
+            return null;
+        } catch (IOException e) {
+            throw new ServiceRuntimeException(e);
+        } catch (XMLStreamException e) {
+            throw new ServiceRuntimeException(e);
+        } catch (FactoryConfigurationError e) {
+            throw new ServiceRuntimeException(e);
+        }*/
+        return null;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/SDODataBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java?rev=426629&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java (added)
+++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java Fri Jul 28 11:08:35 2006
@@ -0,0 +1,89 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  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.
+ */
+package org.apache.tuscany.binding.axis2.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.osoa.sca.ServiceRuntimeException;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.deployment.AxisConfigBuilder;
+import org.apache.axis2.deployment.DeploymentEngine;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisConfigurator;
+
+/**
+ * Helps configure Axis2 from a resource in binding.axis2 instead of Axis2.xml
+ * <p/>
+ * TODO: Review: should there be a single global Axis ConfigurationContext
+ */
+public class TuscanyAxisConfigurator implements AxisConfigurator {
+
+    protected AxisConfiguration axisConfiguration;
+
+    //FIXME: how to get component specific classloader
+    //protected final ResourceLoader resourceLoader;
+
+    /**
+     * @param axisConfiguration Starting axis configuration, null then use uninitialized configuration.
+     */
+    /*
+    public TuscanyAxisConfigurator(ResourceLoader resourceLoader, AxisConfiguration axisConfiguration) {
+        this.resourceLoader = resourceLoader != null ? resourceLoader :
+            new ResourceLoaderImpl(getClass().getClassLoader());
+        this.axisConfiguration = axisConfiguration == null ? new AxisConfiguration() : axisConfiguration;
+    }
+    */
+    public TuscanyAxisConfigurator(AxisConfiguration axisConfiguration) {
+        this.axisConfiguration = axisConfiguration == null ? new AxisConfiguration() : axisConfiguration;
+    }
+
+    public AxisConfiguration getAxisConfiguration() {
+        return axisConfiguration;
+    }
+
+    public ConfigurationContext getConfigurationContext() throws ServiceRuntimeException {
+        try {
+            //FIXME: use component specific classloader to load config file
+            //URL url = resourceLoader.getResource("org/apache/tuscany/binding/axis2/engine/config/axis2.xml");
+            URL url = this.getClass().getResource("/org/apache/tuscany/binding/axis2/engine/config/axis2.xml");
+
+            InputStream serviceInputStream = url.openStream();
+            AxisConfigBuilder axisConfigBuilder =
+                new AxisConfigBuilder(serviceInputStream, new DeploymentEngine(), axisConfiguration);
+            axisConfigBuilder.populateConfig();
+            serviceInputStream.close();
+            return ConfigurationContextFactory.createConfigurationContext(this);
+        } catch (IOException e) {
+            throw new ServiceRuntimeException(e);
+        }
+    }
+
+    public void loadServices() {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void engageGlobalModules() throws AxisFault {
+        // TODO Auto-generated method stub
+
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message