You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ri...@apache.org on 2006/03/02 05:25:34 UTC

svn commit: r382293 [1/3] - in /incubator/tuscany/java/sca/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/org/apache...

Author: rineholt
Date: Wed Mar  1 20:25:29 2006
New Revision: 382293

URL: http://svn.apache.org/viewcvs?rev=382293&view=rev
Log:
Axis 2.0 Webservice binding contributed by Ant Elder and Rick Rineholt
NOT PART OF MAIN STREAM BUILD YET.
Still working on adjusting with some recent runtime enhancements.
Should build if you build from binding.axis2 .  May need to manually add some jars from Axis 2.0 .94 milestone
Both Entry and Exports have been tested and ran succesfully with Axis version client server examples.
Work in progress but basics are present.

Added:
    incubator/tuscany/java/sca/binding.axis2/
    incubator/tuscany/java/sca/binding.axis2/LICENSE.txt
    incubator/tuscany/java/sca/binding.axis2/pom.xml
    incubator/tuscany/java/sca/binding.axis2/src/
    incubator/tuscany/java/sca/binding.axis2/src/main/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceAssemblyFactory.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceBinding.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceAssemblyFactoryImpl.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceBindingImpl.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceConfigurationBuilder.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceWireBuilder.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/WebServiceEntryPointConfigurationBuilder.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/ExternalWebServiceRuntimeConfiguration.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/WebServiceEntryPointRuntimeConfiguration.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceClient.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceTargetInvoker.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceEntryPointInOutSyncMessageReceiver.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceEntryPointServlet.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceOperationMetaData.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServicePortMetaData.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/loader/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/loader/WebServiceSCDLModelLoader.java
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/
    incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/AxiomHelper.java
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/tuscany/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/engine/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/engine/config/
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/org/apache/tuscany/binding/axis2/engine/config/axis2.xml
    incubator/tuscany/java/sca/binding.axis2/src/main/resources/system.fragment
    incubator/tuscany/java/sca/binding.axis2/src/test/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/WebServiceAssemblyLoaderTestCase.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/
    incubator/tuscany/java/sca/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/AxiomHelperTestCase.java
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.wsdl
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/sca.module
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/mediator/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/mediator/tests/
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/mediator/tests/DocLit.wsdl
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/mediator/tests/DocLitWrapped.wsdl
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/mediator/tests/RpcLit.wsdl
    incubator/tuscany/java/sca/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/mediator/tests/sca.module

Added: incubator/tuscany/java/sca/binding.axis2/LICENSE.txt
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/LICENSE.txt?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/LICENSE.txt (added)
+++ incubator/tuscany/java/sca/binding.axis2/LICENSE.txt Wed Mar  1 20:25:29 2006
@@ -0,0 +1,202 @@
+
+                                 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/binding.axis2/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/pom.xml?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/pom.xml (added)
+++ incubator/tuscany/java/sca/binding.axis2/pom.xml Wed Mar  1 20:25:29 2006
@@ -0,0 +1,120 @@
+<?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</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>tuscany-binding-axis2</artifactId>
+    <name>Tuscany Axis Binding</name>
+    <description>Implementation of the SCA Web Services binding using Axis.</description>
+    <version>SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>tuscany-core</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- axis 2.0 -->
+        <dependency>
+            <groupId>axis2</groupId>
+            <artifactId>axis2-core</artifactId>
+            <version>0.94</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ws-commons</groupId>
+            <artifactId>ws-policy</artifactId>
+            <version>SNAPSHOT</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>axis</groupId>
+            <artifactId>axis-wsdl4j</artifactId>
+            <version>1.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</artifactId>
+            <version>asl-2.8.1</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.12</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- end of axis 2.0 -->
+
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>5.0.18</version>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+    <!-- build>
+        <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>
+
+    </build -->
+</project>

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceAssemblyFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceAssemblyFactory.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceAssemblyFactory.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceAssemblyFactory.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,31 @@
+/**
+ *
+ *  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.assembly;
+
+import org.apache.tuscany.model.assembly.AssemblyFactory;
+
+/**
+ * The <b>Factory</b> for the model.
+ */
+public interface WebServiceAssemblyFactory extends AssemblyFactory {
+
+    /**
+     * Returns a new WebServiceBinding.
+     */
+    WebServiceBinding createWebServiceBinding();
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceBinding.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceBinding.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceBinding.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/WebServiceBinding.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,51 @@
+/**
+ *
+ *  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.assembly;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+
+import org.apache.tuscany.model.assembly.Binding;
+
+/**
+ * Represents a Web service binding.
+ */
+public interface WebServiceBinding extends Binding {
+
+    /**
+     * Returns the WSDL port defining this binding.
+     */
+    Port getWSDLPort();
+    
+    /**
+     * Returns the WSDL definition containing the WSDL port.
+     * @return
+     */
+    Definition getWSDLDefinition();
+
+    /**
+     * Sets the WSDL port defining this binding.
+     */
+    void setWSDLPort(Port value);
+
+    /**
+     * Sets the WSDL definition containing the WSDL port.
+     * @param definition
+     */
+    void setWSDLDefinition(Definition definition);
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceAssemblyFactoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceAssemblyFactoryImpl.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceAssemblyFactoryImpl.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceAssemblyFactoryImpl.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,42 @@
+/**
+ *
+ *  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.assembly.impl;
+
+import org.apache.tuscany.binding.axis2.assembly.WebServiceAssemblyFactory;
+import org.apache.tuscany.binding.axis2.assembly.WebServiceBinding;
+import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl;
+
+/**
+ * An implementation of the model <b>Factory</b>.
+ */
+public class WebServiceAssemblyFactoryImpl extends AssemblyFactoryImpl implements WebServiceAssemblyFactory {
+
+    /**
+     * Creates an instance of the factory.
+     */
+    public WebServiceAssemblyFactoryImpl() {
+        super();
+    }
+
+    /**
+     * @see org.apache.tuscany.binding.axis2.assembly.WebServiceAssemblyFactory#createWebServiceBinding()
+     */
+    public WebServiceBinding createWebServiceBinding() {
+        return new WebServiceBindingImpl();
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceBindingImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceBindingImpl.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceBindingImpl.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/assembly/impl/WebServiceBindingImpl.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,116 @@
+/**
+ *
+ *  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.assembly.impl;
+
+import java.util.Collection;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+
+import org.apache.tuscany.binding.axis2.assembly.WebServiceBinding;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.impl.BindingImpl;
+
+/**
+ * An implementation of WebServiceBinding.
+ */
+public class WebServiceBindingImpl extends BindingImpl implements WebServiceBinding {
+    
+    private Definition definition;
+    private Port port;
+    private String portURI;
+
+    /**
+     * Constructor
+     */
+    protected WebServiceBindingImpl() {
+    }
+    
+    /**
+     * @see org.apache.tuscany.binding.axis2.assembly.WebServiceBinding#getWSDLPort()
+     */
+    public Port getWSDLPort() {
+        return port;
+    }
+    
+    /**
+     * @see org.apache.tuscany.binding.axis2.assembly.WebServiceBinding#setWSDLPort(javax.wsdl.Port)
+     */
+    public void setWSDLPort(Port value) {
+        checkNotFrozen();
+        this.port=value;
+    }
+    
+    /**
+     * @see org.apache.tuscany.binding.axis2.assembly.WebServiceBinding#getWSDLDefinition()
+     */
+    public Definition getWSDLDefinition() {
+        return definition;
+    }
+    
+    /**
+     * @see org.apache.tuscany.binding.axis2.assembly.WebServiceBinding#setWSDLDefinition(javax.wsdl.Definition)
+     */
+    public void setWSDLDefinition(Definition definition) {
+        checkNotFrozen();
+        this.definition=definition;
+    }
+    
+    /**
+     * @param portURI The portURI to set.
+     */
+    public void setPortURI(String portURI) {
+        this.portURI = portURI;
+    }
+    
+    /**
+     * @see org.apache.tuscany.model.assembly.impl.BindingImpl#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
+     */
+    public void initialize(AssemblyModelContext modelContext) {
+        if (isInitialized())
+            return;
+        super.initialize(modelContext);
+        
+        // Get the WSDL port namespace and name
+        if (port==null && portURI!=null) {
+            int h=portURI.indexOf('#');
+            String portNamespace=portURI.substring(0,h);
+            String portName=portURI.substring(h+1);
+    
+            // Load the WSDL definitions for the given namespace
+            List<Definition> definitions=modelContext.getAssemblyLoader().loadDefinitions(portNamespace);
+            if (definitions==null)
+                throw new IllegalArgumentException("Cannot find WSDL definition for "+portNamespace);
+            for (Definition definition: definitions) {
+    
+                // Find the port with the given name
+                for (Service service : (Collection<Service>)definition.getServices().values()) {
+                    Port port=service.getPort(portName);
+                    if (port!=null) {
+                        this.definition=definition;
+                        this.port=port;
+                        return;
+                    }
+                }
+            }
+            throw new IllegalArgumentException("Cannot find WSDL port "+portURI);
+        }
+    }
+    
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceConfigurationBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceConfigurationBuilder.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceConfigurationBuilder.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceConfigurationBuilder.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,150 @@
+/**
+ * 
+ * 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.builder;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tuscany.binding.axis2.assembly.WebServiceBinding;
+import org.apache.tuscany.binding.axis2.config.ExternalWebServiceRuntimeConfiguration;
+import org.apache.tuscany.binding.axis2.handler.ExternalWebServiceClient;
+import org.apache.tuscany.core.builder.BuilderException;
+import org.apache.tuscany.core.builder.RuntimeConfigurationBuilder;
+import org.apache.tuscany.core.config.JavaIntrospectionHelper;
+import org.apache.tuscany.core.context.Context;
+import org.apache.tuscany.core.context.QualifiedName;
+import org.apache.tuscany.core.injection.SingletonObjectFactory;
+import org.apache.tuscany.core.invocation.InvocationConfiguration;
+import org.apache.tuscany.core.invocation.MethodHashMap;
+import org.apache.tuscany.core.invocation.ProxyConfiguration;
+import org.apache.tuscany.core.invocation.impl.InvokerInterceptor;
+import org.apache.tuscany.core.invocation.spi.ProxyFactory;
+import org.apache.tuscany.core.invocation.spi.ProxyFactoryFactory;
+import org.apache.tuscany.core.message.MessageFactory;
+import org.apache.tuscany.core.runtime.RuntimeContext;
+import org.apache.tuscany.core.system.annotation.Autowire;
+import org.apache.tuscany.model.assembly.AssemblyModelObject;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.ExternalService;
+import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.ServiceContract;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * Creates a <code>RuntimeConfigurationBuilder</code> for an external service configured with the {@link WebServiceBinding}
+ * 
+ * @version $Rev$ $Date$
+ */
+@Scope("MODULE")
+public class ExternalWebServiceConfigurationBuilder implements RuntimeConfigurationBuilder {
+
+    private RuntimeContext runtimeContext;
+
+    private ProxyFactoryFactory proxyFactoryFactory;
+
+    private MessageFactory messageFactory;
+
+    private RuntimeConfigurationBuilder policyBuilder;
+
+    public ExternalWebServiceConfigurationBuilder() {
+    }
+
+    @Init(eager = true)
+    public void init() {
+        runtimeContext.addBuilder(this);
+    }
+
+    /**
+     * @param runtimeContext The runtimeContext to set.
+     */
+    @Autowire
+    public void setRuntimeContext(RuntimeContext runtimeContext) {
+        this.runtimeContext = runtimeContext;
+    }
+
+    /**
+     * Sets the factory used to construct proxies implmementing the business interface required by a reference
+     */
+    @Autowire
+    public void setProxyFactoryFactory(ProxyFactoryFactory factory) {
+        this.proxyFactoryFactory = factory;
+    }
+
+    /**
+     * Sets the factory used to construct invocation messages
+     * 
+     * @param msgFactory
+     */
+    @Autowire
+    public void setMessageFactory(MessageFactory msgFactory) {
+        this.messageFactory = msgFactory;
+    }
+
+    /**
+     * Sets a builder responsible for creating source-side and target-side invocation chains for a reference. The
+     * reference builder may be hierarchical, containing other child reference builders that operate on specific
+     * metadata used to construct and invocation chain.
+     * 
+     * @see org.apache.tuscany.core.builder.impl.HierarchicalBuilder
+     */
+    public void setPolicyBuilder(RuntimeConfigurationBuilder builder) {
+        policyBuilder = builder;
+    }
+
+    public void build(AssemblyModelObject object, Context context) throws BuilderException {
+        if (!(object instanceof ExternalService)) {
+            return;
+        }
+        ExternalService externalService = (ExternalService) object;
+        if (externalService.getBindings().size() < 1 || !(externalService.getBindings().get(0) instanceof WebServiceBinding)) {
+            return;
+        }
+
+        WebServiceBinding wsBinding=(WebServiceBinding)externalService.getBindings().get(0);
+        
+        ExternalWebServiceClient externalWebServiceClient=new ExternalWebServiceClient(externalService, wsBinding);
+        ExternalWebServiceRuntimeConfiguration config = new ExternalWebServiceRuntimeConfiguration(externalService.getName(), new SingletonObjectFactory<ExternalWebServiceClient>(externalWebServiceClient));
+
+        ConfiguredService configuredService = externalService.getConfiguredService();
+        Service service = configuredService.getService();
+        ServiceContract serviceContract = service.getServiceContract();
+        Map<Method, InvocationConfiguration> iConfigMap = new MethodHashMap();
+        ProxyFactory proxyFactory = proxyFactoryFactory.createProxyFactory();
+        Set<Method> javaMethods = JavaIntrospectionHelper.getAllUniqueMethods(serviceContract.getInterface());
+        for (Method method : javaMethods) {
+            InvocationConfiguration iConfig = new InvocationConfiguration(method);
+            iConfigMap.put(method, iConfig);
+        }
+        QualifiedName qName = new QualifiedName(externalService.getName() + "/" + service.getName());
+        ProxyConfiguration pConfiguration = new ProxyConfiguration(qName, iConfigMap, serviceContract.getInterface().getClassLoader(), messageFactory);
+        proxyFactory.setBusinessInterface(serviceContract.getInterface());
+        proxyFactory.setProxyConfiguration(pConfiguration);
+        config.addTargetProxyFactory(service.getName(), proxyFactory);
+        configuredService.setProxyFactory(proxyFactory);
+        if (policyBuilder != null) {
+            // invoke the reference builder to handle additional policy metadata
+            policyBuilder.build(configuredService, context);
+        }
+        // add tail interceptor
+        for (InvocationConfiguration iConfig : (Collection<InvocationConfiguration>) iConfigMap.values()) {
+            iConfig.addTargetInterceptor(new InvokerInterceptor());
+        }
+
+        externalService.getConfiguredService().setRuntimeConfiguration(config);
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceWireBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceWireBuilder.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceWireBuilder.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceWireBuilder.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,61 @@
+package org.apache.tuscany.binding.axis2.builder;
+
+import org.apache.tuscany.binding.axis2.config.ExternalWebServiceRuntimeConfiguration;
+import org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker;
+import org.apache.tuscany.core.builder.BuilderConfigException;
+import org.apache.tuscany.core.builder.WireBuilder;
+import org.apache.tuscany.core.context.ScopeContext;
+import org.apache.tuscany.core.invocation.InvocationConfiguration;
+import org.apache.tuscany.core.invocation.spi.ProxyFactory;
+import org.apache.tuscany.core.runtime.RuntimeContext;
+import org.apache.tuscany.core.system.annotation.Autowire;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+
+@Scope("MODULE")
+public class ExternalWebServiceWireBuilder implements WireBuilder {
+
+    private RuntimeContext runtimeContext;
+
+    /**
+     * Constructs a new ExternalWebServiceWireBuilder.
+     */
+    public ExternalWebServiceWireBuilder() {
+        super();
+    }
+
+    @Autowire
+    public void setRuntimeContext(RuntimeContext context) {
+        runtimeContext = context;
+    }
+
+    @Init(eager=true)
+    public void init() {
+        runtimeContext.addBuilder(this);
+    }
+
+    public void connect(ProxyFactory sourceFactory, ProxyFactory targetFactory, Class targetType, boolean downScope, ScopeContext targetScopeContext) throws BuilderConfigException {
+        if (!(ExternalWebServiceRuntimeConfiguration.class.isAssignableFrom(targetType))) {
+            return;
+        }
+        for (InvocationConfiguration sourceInvocationConfig : sourceFactory.getProxyConfiguration().getInvocationConfigurations().values()) {
+            
+            ExternalWebServiceTargetInvoker invoker = new ExternalWebServiceTargetInvoker(sourceFactory.getProxyConfiguration().getTargetName(), sourceInvocationConfig.getMethod(), targetScopeContext);
+            
+            // if (downScope) {
+            // // the source scope is shorter than the target, so the invoker can cache the target instance
+            // invoker.setCacheable(true);
+            // } else {
+            // invoker.setCacheable(false);
+            // }
+            sourceInvocationConfig.setTargetInvoker(invoker);
+        }
+
+    }
+
+    public void completeTargetChain(ProxyFactory targetFactory, Class targetType, ScopeContext targetScopeContext)
+            throws BuilderConfigException {
+        //TODO implement
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/WebServiceEntryPointConfigurationBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/WebServiceEntryPointConfigurationBuilder.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/WebServiceEntryPointConfigurationBuilder.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/builder/WebServiceEntryPointConfigurationBuilder.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,170 @@
+/**
+ * 
+ * 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.builder;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tuscany.binding.axis2.assembly.WebServiceBinding;
+import org.apache.tuscany.binding.axis2.config.WebServiceEntryPointRuntimeConfiguration;
+import org.apache.tuscany.core.builder.BuilderException;
+import org.apache.tuscany.core.builder.RuntimeConfigurationBuilder;
+import org.apache.tuscany.core.builder.impl.EntryPointRuntimeConfiguration;
+import org.apache.tuscany.core.config.JavaIntrospectionHelper;
+import org.apache.tuscany.core.context.AggregateContext;
+import org.apache.tuscany.core.context.QualifiedName;
+import org.apache.tuscany.core.invocation.Interceptor;
+import org.apache.tuscany.core.invocation.InvocationConfiguration;
+import org.apache.tuscany.core.invocation.InvocationRuntimeException;
+import org.apache.tuscany.core.invocation.ProxyConfiguration;
+import org.apache.tuscany.core.invocation.TargetInvoker;
+import org.apache.tuscany.core.invocation.spi.ProxyFactory;
+import org.apache.tuscany.core.invocation.spi.ProxyFactoryFactory;
+import org.apache.tuscany.core.message.Message;
+import org.apache.tuscany.core.message.MessageFactory;
+import org.apache.tuscany.core.runtime.RuntimeContext;
+import org.apache.tuscany.core.system.annotation.Autowire;
+import org.apache.tuscany.model.assembly.AssemblyModelObject;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.ServiceContract;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * Creates a <code>RuntimeConfigurationBuilder</code> for an entry point configured with the {@link WebServiceBinding}
+ * 
+ * @version $Rev$ $Date$
+ */
+@Scope("MODULE")
+public class WebServiceEntryPointConfigurationBuilder implements RuntimeConfigurationBuilder<AggregateContext> {
+
+    private RuntimeContext runtimeContext;
+
+    private ProxyFactoryFactory proxyFactoryFactory;
+
+    private MessageFactory messageFactory;
+
+    private RuntimeConfigurationBuilder policyBuilder;
+
+    public WebServiceEntryPointConfigurationBuilder() {
+    }
+
+    @Init(eager = true)
+    public void init() {
+        runtimeContext.addBuilder(this);
+    }
+
+    /**
+     * @param runtimeContext The runtimeContext to set.
+     */
+    @Autowire
+    public void setRuntimeContext(RuntimeContext runtimeContext) {
+        this.runtimeContext = runtimeContext;
+    }
+
+    /**
+     * Sets the factory used to construct proxies implmementing the business interface required by a reference
+     */
+    @Autowire
+    public void setProxyFactoryFactory(ProxyFactoryFactory factory) {
+        this.proxyFactoryFactory = factory;
+    }
+
+    /**
+     * Sets the factory used to construct invocation messages
+     * 
+     * @param msgFactory
+     */
+    @Autowire
+    public void setMessageFactory(MessageFactory msgFactory) {
+        this.messageFactory = msgFactory;
+    }
+
+    /**
+     * Sets a builder responsible for creating source-side and target-side invocation chains for a reference. The
+     * reference builder may be hierarchical, containing other child reference builders that operate on specific
+     * metadata used to construct and invocation chain.
+     * 
+     * @see org.apache.tuscany.core.builder.impl.HierarchicalBuilder
+     */
+    public void setPolicyBuilder(RuntimeConfigurationBuilder builder) {
+        policyBuilder = builder;
+    }
+
+    public void build(AssemblyModelObject object, AggregateContext parentContext) throws BuilderException {
+        if (!(object instanceof EntryPoint)) {
+            return;
+        }
+        EntryPoint entryPoint = (EntryPoint) object;
+        if (entryPoint.getBindings().size() < 1 || !(entryPoint.getBindings().get(0) instanceof WebServiceBinding)) {
+            return;
+        }
+
+        EntryPointRuntimeConfiguration config = new WebServiceEntryPointRuntimeConfiguration(entryPoint.getName(), entryPoint.getConfiguredService().getService().getName(), messageFactory);
+
+        ConfiguredService configuredService = entryPoint.getConfiguredService();
+        Service service = configuredService.getService();
+        ServiceContract serviceContract = service.getServiceContract();
+        Map<Method, InvocationConfiguration> iConfigMap = new HashMap();
+        ProxyFactory proxyFactory = proxyFactoryFactory.createProxyFactory();
+        Set<Method> javaMethods = JavaIntrospectionHelper.getAllUniqueMethods(serviceContract.getInterface());
+        for (Method method : javaMethods) {
+            InvocationConfiguration iConfig = new InvocationConfiguration(method);
+            iConfigMap.put(method, iConfig);
+        }
+        QualifiedName qName = new QualifiedName(entryPoint.getConfiguredReference().getTargetConfiguredServices().get(0).getAggregatePart().getName() + "/" + service.getName());
+        ProxyConfiguration pConfiguration = new ProxyConfiguration(qName, iConfigMap, serviceContract.getInterface().getClassLoader(), messageFactory);
+        proxyFactory.setBusinessInterface(serviceContract.getInterface());
+        proxyFactory.setProxyConfiguration(pConfiguration);
+        config.addSourceProxyFactory(service.getName(), proxyFactory);
+        configuredService.setProxyFactory(proxyFactory);
+        if (policyBuilder != null) {
+            // invoke the reference builder to handle additional policy metadata
+            policyBuilder.build(configuredService, parentContext);
+        }
+        // add tail interceptor
+        for (InvocationConfiguration iConfig : (Collection<InvocationConfiguration>) iConfigMap.values()) {
+            iConfig.addTargetInterceptor(new EntryPointInvokerInterceptor());
+        }
+        entryPoint.getConfiguredReference().setRuntimeConfiguration(config);
+    }
+    
+    //FIXME same as the InvokerInterceptor except that it doesn't throw an exception in setNext
+    // For some reason another InvokerInterceptor is added after this one, need Jim to look into it
+    // and figure out why.
+    public class EntryPointInvokerInterceptor implements Interceptor {
+        
+        public EntryPointInvokerInterceptor() {
+        }
+
+        public Message invoke(Message msg) throws InvocationRuntimeException {
+            TargetInvoker invoker = msg.getTargetInvoker();
+            if (invoker == null) {
+                throw new InvocationRuntimeException("No target invoker specified on message");
+            }
+            return invoker.invoke(msg);
+        }
+
+        public void setNext(Interceptor next) {
+        }
+
+    }
+
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/ExternalWebServiceRuntimeConfiguration.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/ExternalWebServiceRuntimeConfiguration.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/ExternalWebServiceRuntimeConfiguration.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/ExternalWebServiceRuntimeConfiguration.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,32 @@
+/**
+ * 
+ * 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.config;
+
+import org.apache.tuscany.core.builder.ObjectFactory;
+import org.apache.tuscany.core.builder.impl.BaseExternalServiceRuntimeConfiguration;
+
+/**
+ * Creates instances of {@link org.apache.tuscany.core.context.ExternalServiceContext} configured with the appropriate
+ * invocation chains and bindings. This implementation serves as a marker for
+ * {@link org.apache.tuscany.binding.axis2.builder.ExternalWebServiceWireBuilder}
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ExternalWebServiceRuntimeConfiguration extends BaseExternalServiceRuntimeConfiguration {
+
+    public ExternalWebServiceRuntimeConfiguration(String name, ObjectFactory objectFactory) {
+        super(name, objectFactory);
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/WebServiceEntryPointRuntimeConfiguration.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/WebServiceEntryPointRuntimeConfiguration.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/WebServiceEntryPointRuntimeConfiguration.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/config/WebServiceEntryPointRuntimeConfiguration.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,32 @@
+/**
+ * 
+ * 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.config;
+
+import org.apache.tuscany.core.builder.impl.EntryPointRuntimeConfiguration;
+import org.apache.tuscany.core.message.MessageFactory;
+
+/**
+ * Creates instances of {@link org.apache.tuscany.core.context.EntryPointContext} configured with the appropriate
+ * invocation chains and bindings. This implementation serves as a marker for
+ * {@link org.apache.tuscany.binding.axis2.builder.WebServiceEntryPointWireBuilder}
+ * 
+ * @version $Rev$ $Date$
+ */
+public class WebServiceEntryPointRuntimeConfiguration extends EntryPointRuntimeConfiguration {
+
+    public WebServiceEntryPointRuntimeConfiguration(String name, String serviceName, MessageFactory messageFactory) {
+        super(name, serviceName, messageFactory);
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceClient.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceClient.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceClient.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceClient.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,121 @@
+/**
+ * 
+ * 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.handler;
+
+import java.lang.reflect.Method;
+
+import javax.xml.parsers.FactoryConfigurationError;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.MessageContextConstants;
+import org.apache.axis2.om.OMElement;
+import org.apache.tuscany.binding.axis2.assembly.WebServiceBinding;
+import org.apache.tuscany.binding.axis2.util.AxiomHelper;
+import org.apache.tuscany.model.assembly.ExternalService;
+import org.osoa.sca.ServiceRuntimeException;
+
+/**
+ * An ExternalWebServiceClient using Axis2
+ */
+public class ExternalWebServiceClient {
+
+    private ExternalService externalService;
+
+    private WebServicePortMetaData wsPortMetaData;
+
+    /**
+     * Constructs a new ExternalWebServiceClient.
+     * 
+     * @param externalService
+     * @param wsBinding
+     */
+    public ExternalWebServiceClient(ExternalService externalService, WebServiceBinding wsBinding) {
+        this.externalService = externalService;
+        this.wsPortMetaData = new WebServicePortMetaData(wsBinding.getWSDLDefinition(), wsBinding.getWSDLPort(), wsBinding.getURI(), false);
+    }
+
+    /**
+     * Invoke an operation on the external Web service.
+     * 
+     * @param method
+     * @param args
+     * @return
+     */
+    public Object invoke(Method method, Object[] args) {
+
+        ServiceClient serviceClient = createServiceClient(method);
+
+        OMElement requestOM = AxiomHelper.toOMElement(method, args, wsPortMetaData);
+
+        OMElement responseOM;
+        try {
+            responseOM = serviceClient.sendReceive(requestOM);
+        } catch (AxisFault e) {
+            throw new ServiceRuntimeException(e);
+        }
+
+        Object[] os = AxiomHelper.toObjects(responseOM);
+        Object response;
+        if (os == null || os.length < 1) {
+            response = null;
+        } else {
+            response = os[0];
+        }
+
+        return response;
+    }
+
+    private ServiceClient createServiceClient(Method method) throws FactoryConfigurationError {
+
+        /*
+         * TODO: Simlistic impl for now, needs to be redone. Should cache our ConfigurationContext and pass in on ServiceClient constructor, should
+         * probably use WSDL configured Axis2 OperationClient
+         */
+
+        Options options = new Options();
+
+        options.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
+
+        WebServiceOperationMetaData operationMetaData = wsPortMetaData.getOperationMetaData(method.getName());
+
+        EndpointReference targetEPR = new EndpointReference(wsPortMetaData.getEndpoint());
+        options.setTo(targetEPR);
+
+        String soapAction = operationMetaData.getSOAPAction();
+        if (soapAction != null) {
+            options.setSoapAction(soapAction);
+        }
+
+        // If use is encoded assume its an old style service and wont understand chunking
+        if ("encoded".equals(operationMetaData.getUse())) {
+            options.setProperty(MessageContextConstants.CHUNKED, Boolean.FALSE);
+        }
+
+        ServiceClient serviceClient;
+        try {
+            serviceClient = new ServiceClient();
+        } catch (org.apache.axis2.AxisFault e) {
+            throw new RuntimeException(e);
+        }
+
+        serviceClient.setOptions(options);
+
+        return serviceClient;
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceTargetInvoker.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceTargetInvoker.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceTargetInvoker.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ExternalWebServiceTargetInvoker.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,96 @@
+/**
+ * 
+ * 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.handler;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.tuscany.core.context.ExternalServiceContext;
+import org.apache.tuscany.core.context.InstanceContext;
+import org.apache.tuscany.core.context.QualifiedName;
+import org.apache.tuscany.core.context.ScopeContext;
+import org.apache.tuscany.core.context.TargetException;
+import org.apache.tuscany.core.invocation.Interceptor;
+import org.apache.tuscany.core.invocation.TargetInvoker;
+import org.apache.tuscany.core.message.Message;
+
+/**
+ * Responsible for invoking an external web service
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ExternalWebServiceTargetInvoker implements TargetInvoker {
+
+    private QualifiedName serviceName;
+    private String esName;
+    private Method method;
+    private ScopeContext container;
+
+    private ExternalServiceContext context;
+
+    /**
+     * Constructs a new ExternalWebServiceTargetInvoker.
+     * @param esName
+     * @param container
+     */
+    public ExternalWebServiceTargetInvoker(QualifiedName serviceName, Method method, ScopeContext container) {
+        assert (serviceName != null) : "No service name specified";
+        assert (method != null) : "No method specified";
+        assert (container != null) : "No scope container specified";
+        this.serviceName = serviceName;
+        this.esName=serviceName.getPartName();
+        this.method = method;
+        this.container = container;
+    }
+
+    public Object invokeTarget(Object payload) throws InvocationTargetException {
+        if (context == null) {
+            InstanceContext iContext = container.getContext(esName);
+            if (!(iContext instanceof ExternalServiceContext)) {
+                TargetException te = new TargetException("Unexpected target context type");
+                te.setIdentifier(iContext.getClass().getName());
+                te.addContextName(iContext.getName());
+                throw te;
+            }
+            context = (ExternalServiceContext) iContext;
+        }
+        ExternalWebServiceClient client = (ExternalWebServiceClient) context.getImplementationInstance(true);
+        if (payload != null) {
+            return client.invoke(method, (Object[])payload);
+        } else {
+            return client.invoke(method, null);
+        }
+    }
+
+    public boolean isCacheable() {
+        return false;
+    }
+
+    public Message invoke(Message msg) {
+        try {
+            Object resp = invokeTarget(msg.getBody());
+            msg.setBody(resp);
+        } catch (InvocationTargetException e) {
+            msg.setBody(e.getCause());
+        } catch (Throwable e) {
+            msg.setBody(e);
+        }
+        return msg;
+    }
+
+    public void setNext(Interceptor next) {
+        throw new UnsupportedOperationException();
+    }
+
+}

Added: incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceEntryPointInOutSyncMessageReceiver.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceEntryPointInOutSyncMessageReceiver.java?rev=382293&view=auto
==============================================================================
--- incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceEntryPointInOutSyncMessageReceiver.java (added)
+++ incubator/tuscany/java/sca/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/WebServiceEntryPointInOutSyncMessageReceiver.java Wed Mar  1 20:25:29 2006
@@ -0,0 +1,145 @@
+package org.apache.tuscany.binding.axis2.handler;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.ListIterator;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.om.OMDocument;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMFactory;
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFactory;
+import org.apache.tuscany.binding.axis2.util.AxiomHelper;
+import org.apache.tuscany.core.context.AggregateContext;
+import org.apache.tuscany.core.context.EntryPointContext;
+import org.apache.tuscany.core.context.InstanceContext;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.wsdl.WSDLConstants;
+import org.eclipse.emf.common.util.UniqueEList;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Sequence;
+import commonj.sdo.Type;
+
+public class WebServiceEntryPointInOutSyncMessageReceiver extends AbstractInOutSyncMessageReceiver {
+    // public static final String MEP_URL = "http://www.w3.org/2004/08/wsdl/tuscany/in-out";
+    public static final String MEP_URL = WSDLConstants.MEP_URI_OUT_IN;
+
+    protected final AggregateContext moduleContext;
+
+    protected final EntryPoint entryPoint;
+    protected final EntryPointContext entryPointContext;
+
+    /**
+     * Field log
+     */
+
+    /**
+     * Constructor WebServiceEntryPointInOutSyncMessageReceiver
+     * 
+     * @param entryPoint
+     * @param moduleContext
+     * @param context 
+     */
+    public WebServiceEntryPointInOutSyncMessageReceiver(AggregateContext moduleContext, EntryPoint entryPoint, EntryPointContext context) {
+        this.moduleContext = moduleContext;
+        this.entryPoint = entryPoint;
+        this.entryPointContext= context;
+    }
+
+    public void invokeBusinessLogic(MessageContext msgContext, MessageContext outMsgContext) throws AxisFault {
+        try {
+            
+            AxisOperation axisOperation = msgContext.getAxisOperation();
+            String axisOperationName= axisOperation.getName().getLocalPart();
+
+            DataObject msgdo = AxiomHelper.fromOMElement(msgContext.getEnvelope().getBody());
+            Sequence parmSeq = msgdo.getSequence("mixed");
+            ArrayList parms = new ArrayList(parmSeq.size());
+            for (int i = 0; i < parmSeq.size(); ++i) {
+                Object parmDO = (Object) parmSeq.getValue(i);// parm element
+                if (parmDO instanceof DataObject) {
+
+                    Sequence nn = ((DataObject) parmDO).getSequence("mixed");
+
+                    for (int j = 0; j < nn.size(); j++) {
+
+                        Object valueDO = (Object) nn.getValue(j); // data array s
+                        if (valueDO instanceof DataObject) {
+
+                            Sequence seqVal = ((DataObject) valueDO).getSequence("mixed");
+                            Object seqDO = seqVal.getValue(0);
+                            if (seqDO instanceof String) {
+                                parms.add(seqDO);
+                            } else {
+                                parms.add(valueDO); // no sure if this is right?
+
+                            }
+                        }
+                    }
+                }
+            }
+            Object[] args= parms.toArray(new Object[parms.size()]);
+            Class[] argsClazz= new Class[args.length];
+            for(int i= args.length -1; i> -1; --i){
+                argsClazz[i]= args[i].getClass();
+                
+            }
+            Class clazz = entryPoint.getConfiguredService().getService().getServiceContract().getInterface();
+            Method operationMethod= clazz.getMethod(axisOperationName, argsClazz);
+            
+             
+            InvocationHandler handler = (InvocationHandler) entryPointContext.getInstance(null);
+           
+         
+            Object response = handler.invoke(null, operationMethod,  args);
+            // response.getClass();
+            //TODO how do I form the response .. the only way is to look at the schema ..yuk
+            
+          
+            //SOAPFactory sf=  new SOAP11Factory();
+            SOAPFactory fac = getSOAPFactory(msgContext);
+           // SOAPEnvelope soapenv = sf.createSOAPEnvelope();
+            SOAPEnvelope soapenv = fac.getDefaultEnvelope();
+            SOAPBody soapbody = soapenv.getBody();
+            OMNamespace respNS = fac.createOMNamespace(axisOperation.getName().getNamespaceURI(), "");
+          
+            OMElement se = fac.createOMElement(axisOperationName+"Response",respNS,soapbody);
+            
+            soapbody.addChild(se);
+            OMElement returnEl= fac.createOMElement(axisOperationName+"Return",respNS,soapbody);
+            returnEl.setText(response.toString());
+            se.addChild(returnEl);
+            // se.addChild(sf.createText(response, true));
+            outMsgContext.setEnvelope(soapenv);
+            // outMsgContext.setAxisOperation(axisOperation);
+            // outMsgContext.setAxisService(msgContext.getAxisService());
+         
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new AxisFault("Error creating DataObject from Soapenvelope. " + e.getClass() + " " + e.getMessage(), e);
+
+        } catch (Throwable e) {
+            
+            e.printStackTrace();
+            throw new AxisFault("Error creating DataObject from Soapenvelope. " + e.getClass() + " " + e.getMessage(), e);
+        }
+
+    }
+
+}