diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-31 10:50:31 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-31 10:50:31 +0000 |
commit | 50107a29161e0dbc6d47d17ce08fd7d4745c4e5c (patch) | |
tree | 00743ab7d89c08eb13957a97ca660dbff83b69f3 /tags/java/sca/2.0-M3-RC3a/modules/binding-ws | |
parent | f4f110a4caa4a8dde751ef5b570ce767a38a93b4 (diff) |
Delete old RC tags
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799574 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
222 files changed, 0 insertions, 18795 deletions
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/LICENSE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/META-INF/MANIFEST.MF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/META-INF/MANIFEST.MF deleted file mode 100644 index 992af5dd44..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/META-INF/MANIFEST.MF +++ /dev/null @@ -1,59 +0,0 @@ -Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.configuration;version="2.0.0";
- uses:="org.apache.axis2,
- org.apache.tuscany.sca.runtime,
- org.apache.tuscany.sca.assembly,
- org.apache.tuscany.sca.provider,
- org.apache.tuscany.sca.core,
- org.apache.axis2.context,
- org.apache.tuscany.sca.monitor,
- org.apache.tuscany.sca.policy,
- javax.xml.namespace,
- org.apache.axiom.om,
- org.apache.axis2.description,
- javax.xml.stream,
- org.apache.axis2.engine,
- org.apache.tuscany.sca.contribution.resolver,
- org.apache.tuscany.sca.policy.util,
- org.apache.tuscany.sca.contribution.processor,
- org.oasisopen.sca",
- org.apache.tuscany.sca.binding.ws.axis2.policy.header;version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: Apache Tuscany Policy Model for Axis2 WS binding
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: 2.0.0
-Bnd-LastModified: 1225397340328
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany Policy Model for Axis2 WS binding
-Import-Package: javax.xml.namespace,
- javax.xml.stream,
- org.apache.axiom.om,
- org.apache.axiom.om.impl.llom.factory,
- org.apache.axiom.soap,
- org.apache.axis2,
- org.apache.axis2.context,
- org.apache.axis2.description,
- org.apache.axis2.engine,
- org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.configuration;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.header;version="2.0.0",
- org.apache.tuscany.sca.contribution.processor;version="2.0.0",
- org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
- org.apache.tuscany.sca.core;version="2.0.0",
- org.apache.tuscany.sca.interfacedef;version="2.0.0",
- org.apache.tuscany.sca.invocation;version="2.0.0",
- org.apache.tuscany.sca.monitor;version="2.0.0",
- org.apache.tuscany.sca.policy;version="2.0.0",
- org.apache.tuscany.sca.policy.authentication.token;version="2.0.0",
- org.apache.tuscany.sca.policy.security;version="2.0.0",
- org.apache.tuscany.sca.policy.util;version="2.0.0",
- org.apache.tuscany.sca.provider;version="2.0.0",
- org.apache.tuscany.sca.runtime;version="2.0.0",
- org.oasisopen.sca;version="2.0.0"
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.ws.axis2.policy
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/NOTICE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/NOTICE deleted file mode 100644 index 25bb89c9b2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/pom.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/pom.xml deleted file mode 100644 index 8232a34888..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/pom.xml +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>2.0-M3</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-binding-ws-axis2-policy</artifactId> - <name>Apache Tuscany SCA Policy Model for Axis2 WS binding</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-security</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-axiom</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.ws.commons.axiom</groupId> - <artifactId>axiom-api</artifactId> - <exclusions> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - </exclusion> - <exclusion> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - <version>1.2.7</version> - </dependency> - - <dependency> - <groupId>org.apache.ws.commons.axiom</groupId> - <artifactId>axiom-impl</artifactId> - <version>1.2.7</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-kernel</artifactId> - <version>1.4.1</version> - <exclusions> - <exclusion> - <groupId>backport-util-concurrent</groupId> - <artifactId>backport-util-concurrent</artifactId> - </exclusion> - <exclusion> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - </exclusion> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>backport-util-concurrent</groupId> - <artifactId>backport-util-concurrent</artifactId> - <version>3.1</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.neethi</groupId> - <artifactId>neethi</artifactId> - <version>2.0.4</version> - <exclusions> - <exclusion> - <groupId>wsdl4j</groupId> - <artifactId>wsdl4j</artifactId> - </exclusion> - <exclusion> - <groupId>org.codehaus.woodstox</groupId> - <artifactId>wstx-asl</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.1.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> - -</project> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicy.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicy.java deleted file mode 100644 index 0d6743bfe2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicy.java +++ /dev/null @@ -1,54 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-import javax.xml.namespace.QName;
-
-/**
- * Implementation for policies that could be injected as parameter
- * into the axis2config.
- *
- * @version $Rev: 695374 $ $Date: 2008-09-15 09:07:58 +0100 (Mon, 15 Sep 2008) $
- */
-public class Axis2TokenAuthenticationPolicy {
- private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1";
- public static final QName AXIS2_TOKEN_AUTHENTICATION_POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "axis2TokenAuthentication");
- public static final String AXIS2_TOKEN_AUTHENTICATION_TOKEN_NAME = "tokenName";
-
- private QName tokenName;
-
- public QName getTokenName() {
- return tokenName;
- }
-
- public void setTokenName(QName tokenName) {
- this.tokenName = tokenName;
- }
-
- public QName getSchemaName() {
- return AXIS2_TOKEN_AUTHENTICATION_POLICY_QNAME;
- }
-
- public boolean isUnresolved() {
- return false;
- }
-
- public void setUnresolved(boolean unresolved) {
- }
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicyProcessor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicyProcessor.java deleted file mode 100644 index 61624bb346..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicyProcessor.java +++ /dev/null @@ -1,113 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.monitor.Monitor;
-
-/**
- *
- * Adjusted for 2.0 environment, Mike Edwards, 4th Dec 2008
- * @version $Rev: 695374 $ $Date: 2008-09-15 09:07:58 +0100 (Mon, 15 Sep 2008) $
- */
-public class Axis2TokenAuthenticationPolicyProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<Axis2TokenAuthenticationPolicy> {
- private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1";
-
- public QName getArtifactType() {
- return Axis2TokenAuthenticationPolicy.AXIS2_TOKEN_AUTHENTICATION_POLICY_QNAME;
- }
-
- public Axis2TokenAuthenticationPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
- }
-
-
- public Axis2TokenAuthenticationPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- Axis2TokenAuthenticationPolicy policy = new Axis2TokenAuthenticationPolicy();
- int event = reader.getEventType();
- QName name = null;
-
- while (reader.hasNext()) {
- event = reader.getEventType();
- switch (event) {
- case START_ELEMENT : {
- name = reader.getName();
- if ( name.equals(getArtifactType()) ) {
- policy.setTokenName(getQName(reader, Axis2TokenAuthenticationPolicy.AXIS2_TOKEN_AUTHENTICATION_TOKEN_NAME));
- }
- break;
- }
- }
-
- if ( event == END_ELEMENT ) {
- if ( getArtifactType().equals(reader.getName()) ) {
- break;
- }
- }
-
- //Read the next element
- if (reader.hasNext()) {
- reader.next();
- }
- }
-
- return policy;
- }
-
- public void write(Axis2TokenAuthenticationPolicy policy, XMLStreamWriter writer)
- throws ContributionWriteException, XMLStreamException {
- String prefix = "tuscany";
- writer.writeStartElement(prefix,
- getArtifactType().getLocalPart(),
- getArtifactType().getNamespaceURI());
- writer.writeNamespace("tuscany", SCA11_TUSCANY_NS);
-
- if ( policy.getTokenName() != null ) {
- writer.writeStartElement(prefix,
- Axis2TokenAuthenticationPolicy.AXIS2_TOKEN_AUTHENTICATION_TOKEN_NAME,
- getArtifactType().getNamespaceURI());
- writer.writeCharacters(policy.getTokenName().toString());
- writer.writeEndElement();
- }
-
- writer.writeEndElement();
- }
-
- public Class<Axis2TokenAuthenticationPolicy> getModelType() {
- return Axis2TokenAuthenticationPolicy.class;
- }
-
- public void resolve(Axis2TokenAuthenticationPolicy arg0, ModelResolver arg1) throws ContributionResolveException {
-
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicyProviderFactory.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicyProviderFactory.java deleted file mode 100644 index 805d6f80cb..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationPolicyProviderFactory.java +++ /dev/null @@ -1,75 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.provider.PolicyProvider;
-import org.apache.tuscany.sca.provider.PolicyProviderFactory;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * @version $Rev: 695374 $ $Date: 2008-09-15 09:07:58 +0100 (Mon, 15 Sep 2008) $
- */
-public class Axis2TokenAuthenticationPolicyProviderFactory implements PolicyProviderFactory<Axis2TokenAuthenticationPolicy> {
- private ExtensionPointRegistry registry;
-
- public Axis2TokenAuthenticationPolicyProviderFactory(ExtensionPointRegistry registry) {
- super();
- this.registry = registry;
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation)
- */
- public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) {
- return null;//new TokenAuthenticationImplementationPolicyProvider(component, implementation);
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding)
- */
- public PolicyProvider createReferencePolicyProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- Binding binding) {
- return new Axis2TokenAuthenticationReferencePolicyProvider(component, reference, binding);
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding)
- */
- public PolicyProvider createServicePolicyProvider(RuntimeComponent component,
- RuntimeComponentService service,
- Binding binding) {
- return new Axis2TokenAuthenticationServicePolicyProvider(component, service, binding);
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType()
- */
- public Class getModelType() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationReferencePolicyInterceptor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationReferencePolicyInterceptor.java deleted file mode 100644 index 0046d3d6ca..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationReferencePolicyInterceptor.java +++ /dev/null @@ -1,84 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2SOAPHeaderString;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Interceptor;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.PolicySet;
-
-/**
- * Policy handler to handle PolicySet related to Logging with the QName
- * {http://tuscany.apache.org/xmlns/sca/1.1/impl/java}LoggingPolicy
- *
- * @version $Rev: 698457 $ $Date: 2008-09-24 09:13:02 +0100 (Wed, 24 Sep 2008) $
- */
-public class Axis2TokenAuthenticationReferencePolicyInterceptor implements Interceptor {
-
- private Invoker next;
- private Operation operation;
- private PolicySet policySet = null;
- private String context;
- private Axis2TokenAuthenticationPolicy policy;
-
- public Axis2TokenAuthenticationReferencePolicyInterceptor(String context, Operation operation, PolicySet policySet) {
- super();
- this.operation = operation;
- this.policySet = policySet;
- this.context = context;
- init();
- }
-
- private void init() {
- if (policySet != null) {
- for (Object policyObject : policySet.getPolicies()){
- if (policyObject instanceof Axis2TokenAuthenticationPolicy){
- policy = (Axis2TokenAuthenticationPolicy)policyObject;
- break;
- }
- }
- }
- }
-
- public Message invoke(Message msg) {
- // could call out here to some 3rd party system to get credentials
-
- if ( policy.getTokenName() != null){
- // create Axis representation of header
- Axis2SOAPHeaderString header = new Axis2SOAPHeaderString();
- header.setHeaderName(policy.getTokenName());
- header.setHeaderString("SomeWSAuthorizationToken");
-
- // add header to Tuscany message
- msg.getHeaders().add(header);
- }
-
- return getNext().invoke(msg);
- }
-
- public Invoker getNext() {
- return next;
- }
-
- public void setNext(Invoker next) {
- this.next = next;
- }
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationReferencePolicyProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationReferencePolicyProvider.java deleted file mode 100644 index 4753012de4..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationReferencePolicyProvider.java +++ /dev/null @@ -1,89 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Interceptor;
-import org.apache.tuscany.sca.invocation.Phase;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySubject;
-import org.apache.tuscany.sca.provider.PolicyProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-
-/**
- * @version $Rev: 695374 $ $Date: 2008-09-15 09:07:58 +0100 (Mon, 15 Sep 2008) $
- */
-public class Axis2TokenAuthenticationReferencePolicyProvider implements PolicyProvider {
- private RuntimeComponent component;
- private RuntimeComponentReference reference;
- private Binding binding;
-
- public Axis2TokenAuthenticationReferencePolicyProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- Binding binding) {
- super();
- this.component = component;
- this.reference = reference;
- this.binding = binding;
- }
-
- private PolicySet findPolicySet() {
- if (binding instanceof PolicySubject) {
- List<PolicySet> policySets = ((PolicySubject)binding).getPolicySets();
- for (PolicySet ps : policySets) {
- for (Object p : ps.getPolicies()) {
- if (Axis2TokenAuthenticationPolicy.class.isInstance(p)) {
- return ps;
- }
- }
- }
- }
- return null;
- }
-
- private String getContext() {
- return "component.reference: " + component.getURI()
- + "#"
- + reference.getName()
- + "("
- + binding.getClass().getName()
- + ")";
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation)
- */
- public Interceptor createInterceptor(Operation operation) {
- PolicySet ps = findPolicySet();
- return ps == null ? null : new Axis2TokenAuthenticationReferencePolicyInterceptor(getContext(), operation, ps);
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase()
- */
- public String getPhase() {
- return Phase.REFERENCE_POLICY;
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationServicePolicyInterceptor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationServicePolicyInterceptor.java deleted file mode 100644 index cf081e1121..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationServicePolicyInterceptor.java +++ /dev/null @@ -1,93 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-
-import java.security.Principal;
-
-import javax.security.auth.Subject;
-
-import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicyUtil;
-import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2SOAPHeaderString;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Interceptor;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.authentication.token.TokenPrincipal;
-import org.apache.tuscany.sca.policy.security.SecurityUtil;
-
-/**
- * Policy handler to handle PolicySet related to Logging with the QName
- * {http://tuscany.apache.org/xmlns/sca/1.1/impl/java}LoggingPolicy
- *
- * @version $Rev: 721811 $ $Date: 2008-11-30 13:46:51 +0000 (Sun, 30 Nov 2008) $
- */
-public class Axis2TokenAuthenticationServicePolicyInterceptor implements Interceptor {
- private Invoker next;
- private Operation operation;
- private PolicySet policySet = null;
- private String context;
- private Axis2TokenAuthenticationPolicy policy;
-
- public Axis2TokenAuthenticationServicePolicyInterceptor(String context, Operation operation, PolicySet policySet) {
- super();
- this.operation = operation;
- this.policySet = policySet;
- this.context = context;
- init();
- }
-
- private void init() {
- if (policySet != null) {
- for (Object policyObject : policySet.getPolicies()){
- if (policyObject instanceof Axis2TokenAuthenticationPolicy){
- policy = (Axis2TokenAuthenticationPolicy)policyObject;
- break;
- }
- }
- }
- }
-
- public Message invoke(Message msg) {
-
- Axis2SOAPHeaderString header = (Axis2SOAPHeaderString)Axis2HeaderPolicyUtil.getHeader(msg, policy.getTokenName());
-
- if (header != null) {
- System.out.println("Web service received token: " + header.getHeaderString());
-
- // call out here to some 3rd party system to do whatever you
- // need to turn header credentials into an authenticated principal
-
- Subject subject = SecurityUtil.getSubject(msg);
- Principal principal = new TokenPrincipal(header.getHeaderString());
- subject.getPrincipals().add(principal);
- }
-
- return getNext().invoke(msg);
- }
-
- public Invoker getNext() {
- return next;
- }
-
- public void setNext(Invoker next) {
- this.next = next;
- }
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationServicePolicyProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationServicePolicyProvider.java deleted file mode 100644 index d1be46d1ce..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/token/Axis2TokenAuthenticationServicePolicyProvider.java +++ /dev/null @@ -1,87 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Interceptor;
-import org.apache.tuscany.sca.invocation.Phase;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySubject;
-import org.apache.tuscany.sca.provider.PolicyProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * @version $Rev: 695374 $ $Date: 2008-09-15 09:07:58 +0100 (Mon, 15 Sep 2008) $
- */
-public class Axis2TokenAuthenticationServicePolicyProvider implements PolicyProvider {
- private RuntimeComponent component;
- private RuntimeComponentService service;
- private Binding binding;
-
- public Axis2TokenAuthenticationServicePolicyProvider(RuntimeComponent component, RuntimeComponentService service, Binding binding) {
- super();
- this.component = component;
- this.service = service;
- this.binding = binding;
- }
-
- private PolicySet findPolicySet() {
- if (binding instanceof PolicySubject) {
- List<PolicySet> policySets = ((PolicySubject)binding).getPolicySets();
- for (PolicySet ps : policySets) {
- for (Object p : ps.getPolicies()) {
- if (Axis2TokenAuthenticationPolicy.class.isInstance(p)) {
- return ps;
- }
- }
- }
- }
- return null;
- }
-
- private String getContext() {
- return "component.service: " + component.getURI()
- + "#"
- + service.getName()
- + "("
- + binding.getClass().getName()
- + ")";
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation)
- */
- public Interceptor createInterceptor(Operation operation) {
- PolicySet ps = findPolicySet();
- return ps == null ? null : new Axis2TokenAuthenticationServicePolicyInterceptor(getContext(), operation, ps);
- }
-
- /**
- * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase()
- */
- public String getPhase() {
- return Phase.SERVICE_POLICY;
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicy.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicy.java deleted file mode 100644 index ded09392ec..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicy.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.configuration; - -import java.util.Hashtable; -import java.util.Map; - -import javax.xml.namespace.QName; - -import org.apache.axiom.om.OMElement; - -/** - * Implementation for policies that could be injected as parameter - * into the axis2config. - * - * @version $Rev$ $Date$ - */ -public class Axis2ConfigParamPolicy { - private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; - public static final QName NAME = new QName(SCA11_TUSCANY_NS, "wsConfigParam"); - private Map<String, OMElement> paramElements = new Hashtable<String, OMElement>(); - - public Map<String, OMElement> getParamElements() { - return paramElements; - } - - public QName getSchemaName() { - return NAME; - } - - public boolean isUnresolved() { - return false; - } - - public void setUnresolved(boolean unresolved) { - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyHandler.java deleted file mode 100644 index dfedaf97a5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyHandler.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.configuration; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.description.Parameter; -import org.apache.tuscany.sca.policy.PolicySet; - - -/** - * Policy handler to handle PolicySet that contain Axis2ConfigParamPolicy instances - * - * @version $Rev$ $Date$ - */ -public class Axis2ConfigParamPolicyHandler { - private PolicySet applicablePolicySet = null; - - public void setUp(Object... context) { - Axis2ConfigParamPolicy axis2ConfigParamPolicy = null; - Parameter configParam = null; - for ( Object contextObject : context ) { - if ( contextObject instanceof ConfigurationContext ) { - ConfigurationContext configContext = (ConfigurationContext)contextObject; - for ( Object policy : applicablePolicySet.getPolicies() ) { - if ( policy instanceof Axis2ConfigParamPolicy ) { - axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy; - for ( String paramName : axis2ConfigParamPolicy.getParamElements().keySet() ) { - configParam = new Parameter(paramName, - axis2ConfigParamPolicy.getParamElements().get(paramName).getFirstElement()); - configParam.setParameterElement(axis2ConfigParamPolicy.getParamElements().get(paramName)); - try { - configContext.getAxisConfiguration().addParameter(configParam); - } catch ( AxisFault e ) { - throw new RuntimeException(e); - } - } - } - } - } - } - } - - public void cleanUp(Object... context) { - } - - public void beforeInvoke(Object... context) { - } - - public void afterInvoke(Object... context) { - - } - - public PolicySet getApplicablePolicySet() { - return applicablePolicySet; - } - - public void setApplicablePolicySet(PolicySet applicablePolicySet) { - this.applicablePolicySet = applicablePolicySet; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java deleted file mode 100644 index 33a1688138..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.configuration; - -import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; -import static javax.xml.stream.XMLStreamConstants.START_ELEMENT; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; -import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; - -/** - * - * @version $Rev$ $Date$ - */ -public class Axis2ConfigParamPolicyProcessor implements StAXArtifactProcessor<Axis2ConfigParamPolicy> { - public static final QName AXIS2_CONFIG_PARAM_POLICY_QNAME = Axis2ConfigParamPolicy.NAME; - public static final String PARAMETER = "parameter"; - public QName getArtifactType() { - return AXIS2_CONFIG_PARAM_POLICY_QNAME; - } - - public Axis2ConfigParamPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) { - } - - public Axis2ConfigParamPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - Axis2ConfigParamPolicy policy = new Axis2ConfigParamPolicy(); - int event = reader.getEventType(); - QName name = null; - OMElement parameterElement = null; - String paramName = null; - while (reader.hasNext()) { - event = reader.getEventType(); - switch (event) { - case START_ELEMENT : { - name = reader.getName(); - if ( PARAMETER.equals(name.getLocalPart()) ) { - paramName = reader.getAttributeValue(null, "name"); - parameterElement = loadElement(reader); - policy.getParamElements().put(paramName, parameterElement); - } - break; - } - } - - if ( event == END_ELEMENT ) { - if ( AXIS2_CONFIG_PARAM_POLICY_QNAME.equals(reader.getName()) ) { - break; - } - } - - //Read the next element - if (reader.hasNext()) { - reader.next(); - } - } - - return policy; - } - - public void write(Axis2ConfigParamPolicy arg0, XMLStreamWriter arg1) throws ContributionWriteException, - XMLStreamException { - } - - public Class<Axis2ConfigParamPolicy> getModelType() { - return Axis2ConfigParamPolicy.class; - } - - public void resolve(Axis2ConfigParamPolicy arg0, ModelResolver arg1) throws ContributionResolveException { - - } - - private OMElement loadElement(XMLStreamReader reader) throws XMLStreamException { - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement head = fac.createOMElement(reader.getName()); - OMElement current = head; - while (true) { - switch (reader.next()) { - case XMLStreamConstants.START_ELEMENT: - //since the axis2 code checks against a no namespace we need to generate accordingly - QName name = new QName(reader.getName().getLocalPart()); - OMElement child = fac.createOMElement(name, current); - - int count = reader.getNamespaceCount(); - for (int i = 0; i < count; i++) { - String prefix = reader.getNamespacePrefix(i); - String ns = reader.getNamespaceURI(i); - child.declareNamespace(ns, prefix); - } - - if(!"".equals(name.getNamespaceURI())) { - child.declareNamespace(name.getNamespaceURI(), name.getPrefix()); - } - - // add the attributes for this element - count = reader.getAttributeCount(); - for (int i = 0; i < count; i++) { - String ns = reader.getAttributeNamespace(i); - String prefix = reader.getAttributePrefix(i); - String qname = reader.getAttributeLocalName(i); - String value = reader.getAttributeValue(i); - - if (ns != null) { - child.addAttribute(qname, value, fac.createOMNamespace(ns, prefix)); - child.declareNamespace(ns, prefix); - } else { - child.addAttribute(qname, value, null); - } - } - current = child; - break; - case XMLStreamConstants.CDATA: - fac.createOMText(current, reader.getText()); - break; - case XMLStreamConstants.CHARACTERS: - fac.createOMText(current, reader.getText()); - break; - case XMLStreamConstants.END_ELEMENT: - if ( current == head ) { - return head; - } else { - current = (OMElement)current.getParent(); - } - } - } - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProviderFactory.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProviderFactory.java deleted file mode 100644 index ed4335baa7..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProviderFactory.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.configuration; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.description.Parameter; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.provider.PolicyProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; -import org.oasisopen.sca.ServiceRuntimeException; - -/** - * @version $Rev$ $Date$ - */ -public class Axis2ConfigParamPolicyProviderFactory implements PolicyProviderFactory<Axis2ConfigParamPolicy> { - - public Axis2ConfigParamPolicyProviderFactory(ExtensionPointRegistry registry) { - super(); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation) - */ - public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createReferencePolicyProvider(RuntimeComponent component, - RuntimeComponentReference reference, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createServicePolicyProvider(RuntimeComponent component, - RuntimeComponentService service, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType() - */ - public Class<Axis2ConfigParamPolicy> getModelType() { - return Axis2ConfigParamPolicy.class; - } - - // FIXME: [rfeng] I think this should be refactored into the binding.ws axis2 code - public void setUp(ConfigurationContext configContext, PolicySet ps) { - Axis2ConfigParamPolicy axis2ConfigParamPolicy = null; - Parameter configParam = null; - for (Object policy : ps.getPolicies()) { - if (policy instanceof Axis2ConfigParamPolicy) { - axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy; - for (String paramName : axis2ConfigParamPolicy.getParamElements().keySet()) { - configParam = - new Parameter(paramName, axis2ConfigParamPolicy.getParamElements().get(paramName) - .getFirstElement()); - configParam.setParameterElement(axis2ConfigParamPolicy.getParamElements().get(paramName)); - try { - configContext.getAxisConfiguration().addParameter(configParam); - } catch (AxisFault e) { - throw new ServiceRuntimeException(e); - } - } - } - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicy.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicy.java deleted file mode 100644 index f25bd8c0cc..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicy.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import javax.xml.namespace.QName; - -/** - * Implementation for policies that could be injected as parameter - * into the axis2config. - * - * @version $Rev$ $Date$ - */ -public class Axis2HeaderPolicy { - private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; - public static final QName AXIS2_HEADER_POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "axis2Header"); - public static final String AXIS2_HEADER_NAME = "headerName"; - - private QName headerName; - - public QName getHeaderName() { - return headerName; - } - - public void setHeaderName(QName headerName) { - this.headerName = headerName; - } - - public QName getSchemaName() { - return AXIS2_HEADER_POLICY_QNAME; - } - - public boolean isUnresolved() { - return false; - } - - public void setUnresolved(boolean unresolved) { - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyProcessor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyProcessor.java deleted file mode 100644 index 70afbd22ee..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyProcessor.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; -import static javax.xml.stream.XMLStreamConstants.START_ELEMENT; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; -import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; - -/** - * - * @version $Rev$ $Date$ - */ -public class Axis2HeaderPolicyProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<Axis2HeaderPolicy> { - private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; - - public QName getArtifactType() { - return Axis2HeaderPolicy.AXIS2_HEADER_POLICY_QNAME; - } - - public Axis2HeaderPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) { - } - - - public Axis2HeaderPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - Axis2HeaderPolicy policy = new Axis2HeaderPolicy(); - int event = reader.getEventType(); - QName name = null; - - while (reader.hasNext()) { - event = reader.getEventType(); - switch (event) { - case START_ELEMENT : { - name = reader.getName(); - if ( name.equals(getArtifactType()) ) { - policy.setHeaderName(getQName(reader, Axis2HeaderPolicy.AXIS2_HEADER_NAME)); - } - break; - } - } - - if ( event == END_ELEMENT ) { - if ( getArtifactType().equals(reader.getName()) ) { - break; - } - } - - //Read the next element - if (reader.hasNext()) { - reader.next(); - } - } - - return policy; - } - - public void write(Axis2HeaderPolicy policy, XMLStreamWriter writer) - throws ContributionWriteException, XMLStreamException { - String prefix = "tuscany"; - writer.writeStartElement(prefix, - getArtifactType().getLocalPart(), - getArtifactType().getNamespaceURI()); - writer.writeNamespace("tuscany", SCA11_TUSCANY_NS); - - if ( policy.getHeaderName() != null ) { - writer.writeStartElement(prefix, - Axis2HeaderPolicy.AXIS2_HEADER_NAME, - getArtifactType().getNamespaceURI()); - writer.writeCharacters(policy.getHeaderName().toString()); - writer.writeEndElement(); - } - - writer.writeEndElement(); - } - - public Class<Axis2HeaderPolicy> getModelType() { - return Axis2HeaderPolicy.class; - } - - public void resolve(Axis2HeaderPolicy arg0, ModelResolver arg1) throws ContributionResolveException { - - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyProviderFactory.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyProviderFactory.java deleted file mode 100644 index 71833df382..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyProviderFactory.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.provider.PolicyProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * @version $Rev$ $Date$ - */ -public class Axis2HeaderPolicyProviderFactory implements PolicyProviderFactory<Axis2HeaderPolicy> { - private ExtensionPointRegistry registry; - - public Axis2HeaderPolicyProviderFactory(ExtensionPointRegistry registry) { - super(); - this.registry = registry; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation) - */ - public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - return null;//new TokenAuthenticationImplementationPolicyProvider(component, implementation); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createReferencePolicyProvider(RuntimeComponent component, - RuntimeComponentReference reference, - Binding binding) { - return new Axis2HeaderReferencePolicyProvider(component, reference, binding); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createServicePolicyProvider(RuntimeComponent component, - RuntimeComponentService service, - Binding binding) { - return new Axis2HeaderServicePolicyProvider(component, service, binding); - } - - /** - * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType() - */ - public Class getModelType() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyUtil.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyUtil.java deleted file mode 100644 index 98d011a8fc..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderPolicyUtil.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.invocation.Message; - - -/** - * - * @version $Rev$ $Date$ - */ -public class Axis2HeaderPolicyUtil { - - public static Axis2SOAPHeader getHeader(Message msg, QName headerName){ - - Axis2SOAPHeader axis2Header = null; - - for (Object header : msg.getHeaders()){ - if (header instanceof Axis2SOAPHeader){ - Axis2SOAPHeader tmpHeader = (Axis2SOAPHeader)header; - - if (tmpHeader.getHeaderName().equals(headerName)){ - axis2Header = tmpHeader; - break; - } - } - } - - return axis2Header; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderReferencePolicyInterceptor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderReferencePolicyInterceptor.java deleted file mode 100644 index 35c8a68be2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderReferencePolicyInterceptor.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Policy handler to handle PolicySet related to Logging with the QName - * {http://tuscany.apache.org/xmlns/sca/1.1/impl/java}LoggingPolicy - * - * @version $Rev$ $Date$ - */ -public class Axis2HeaderReferencePolicyInterceptor implements Interceptor { - private Invoker next; - private Operation operation; - private PolicySet policySet = null; - private String context; - private Axis2HeaderPolicy policy; - - public Axis2HeaderReferencePolicyInterceptor(String context, Operation operation, PolicySet policySet) { - super(); - this.operation = operation; - this.policySet = policySet; - this.context = context; - init(); - } - - private void init() { - if (policySet != null) { - for (Object policyObject : policySet.getPolicies()){ - if (policyObject instanceof Axis2HeaderPolicy){ - policy = (Axis2HeaderPolicy)policyObject; - break; - } - } - } - } - - public Message invoke(Message msg) { - // TODO - not yet implemented - - return getNext().invoke(msg); - } - - public Invoker getNext() { - return next; - } - - public void setNext(Invoker next) { - this.next = next; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderReferencePolicyProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderReferencePolicyProvider.java deleted file mode 100644 index d0fc58cd33..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderReferencePolicyProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import java.util.List; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Phase; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; - -/** - * @version $Rev$ $Date$ - */ -public class Axis2HeaderReferencePolicyProvider implements PolicyProvider { - private RuntimeComponent component; - private RuntimeComponentReference reference; - private Binding binding; - - public Axis2HeaderReferencePolicyProvider(RuntimeComponent component, - RuntimeComponentReference reference, - Binding binding) { - super(); - this.component = component; - this.reference = reference; - this.binding = binding; - } - - // FIXME: Need to use the endpoint with effective policies - private PolicySet findPolicySet() { - if (binding instanceof PolicySubject) { - List<PolicySet> policySets = ((PolicySubject)binding).getPolicySets(); - for (PolicySet ps : policySets) { - for (Object p : ps.getPolicies()) { - if (Axis2HeaderPolicy.class.isInstance(p)) { - return ps; - } - } - } - } - return null; - } - - private String getContext() { - return "component.reference: " + component.getURI() - + "#" - + reference.getName() - + "(" - + binding.getClass().getName() - + ")"; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation) - */ - public Interceptor createInterceptor(Operation operation) { - PolicySet ps = findPolicySet(); - return ps == null ? null : new Axis2HeaderReferencePolicyInterceptor(getContext(), operation, ps); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase() - */ - public String getPhase() { - return Phase.REFERENCE_POLICY; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderServicePolicyInterceptor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderServicePolicyInterceptor.java deleted file mode 100644 index c6758aea48..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderServicePolicyInterceptor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Policy handler to handle PolicySet related to Logging with the QName - * {http://tuscany.apache.org/xmlns/sca/1.1/impl/java}LoggingPolicy - * - * @version $Rev$ $Date$ - */ -public class Axis2HeaderServicePolicyInterceptor implements Interceptor { - private Invoker next; - private Operation operation; - private PolicySet policySet = null; - private String context; - private Axis2HeaderPolicy policy; - - public Axis2HeaderServicePolicyInterceptor(String context, Operation operation, PolicySet policySet) { - super(); - this.operation = operation; - this.policySet = policySet; - this.context = context; - init(); - } - - private void init() { - if (policySet != null) { - for (Object policyObject : policySet.getPolicies()){ - if (policyObject instanceof Axis2HeaderPolicy){ - policy = (Axis2HeaderPolicy)policyObject; - break; - } - } - } - } - - public Message invoke(Message msg) { - // TODO - not yet implemented - - return getNext().invoke(msg); - } - - public Invoker getNext() { - return next; - } - - public void setNext(Invoker next) { - this.next = next; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderServicePolicyProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderServicePolicyProvider.java deleted file mode 100644 index 3cb6d8007b..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2HeaderServicePolicyProvider.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import java.util.List; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Phase; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * @version $Rev$ $Date$ - */ -public class Axis2HeaderServicePolicyProvider implements PolicyProvider { - private RuntimeComponent component; - private RuntimeComponentService service; - private Binding binding; - - public Axis2HeaderServicePolicyProvider(RuntimeComponent component, RuntimeComponentService service, Binding binding) { - super(); - this.component = component; - this.service = service; - this.binding = binding; - } - - private PolicySet findPolicySet() { - if (binding instanceof PolicySubject) { - List<PolicySet> policySets = ((PolicySubject)binding).getPolicySets(); - for (PolicySet ps : policySets) { - for (Object p : ps.getPolicies()) { - if (Axis2HeaderPolicy.class.isInstance(p)) { - return ps; - } - } - } - } - return null; - } - - private String getContext() { - return "component.service: " + component.getURI() - + "#" - + service.getName() - + "(" - + binding.getClass().getName() - + ")"; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation) - */ - public Interceptor createInterceptor(Operation operation) { - PolicySet ps = findPolicySet(); - return ps == null ? null : new Axis2HeaderServicePolicyInterceptor(getContext(), operation, ps); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase() - */ - public String getPhase() { - return Phase.SERVICE_POLICY; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2SOAPHeader.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2SOAPHeader.java deleted file mode 100644 index 36916f4ff5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2SOAPHeader.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import javax.xml.namespace.QName; - -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.soap.SOAPFactory; - -/** - * Implementation for policies that could be injected as parameter - * into the axis2config. - * - * @version $Rev$ $Date$ - */ -public class Axis2SOAPHeader { - - private QName headerName; - - public QName getHeaderName() { - return headerName; - } - - public void setHeaderName(QName headerName) { - this.headerName = headerName; - } - - public OMElement getAsSOAPHeaderBlock(OMFactory factory) { - OMNamespace ns1 = factory.createOMNamespace(headerName.getNamespaceURI(), - headerName.getPrefix()); - OMElement header = ((SOAPFactory)factory).createSOAPHeaderBlock(headerName.getLocalPart(),ns1); - return header; - } - - public void setAsSOAPHeaderBlock(OMElement header) { - headerName = header.getQName(); - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2SOAPHeaderString.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2SOAPHeaderString.java deleted file mode 100644 index c593f07780..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/header/Axis2SOAPHeaderString.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.header; - -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; - -/** - * Implementation for policies that could be injected as parameter - * into the axis2config. - * - * @version $Rev$ $Date$ - */ -public class Axis2SOAPHeaderString extends Axis2SOAPHeader { - - private String headerString; - - public String getHeaderString() { - return headerString; - } - - public void setHeaderString(String headerString) { - this.headerString = headerString; - } - - public OMElement getAsSOAPHeaderBlock(OMFactory factory) { - OMElement header = super.getAsSOAPHeaderBlock(factory); - OMText headerText = factory.createOMText(header, headerString); - header.addChild(headerText); - return header; - } - - public void setAsSOAPHeaderBlock(OMElement header) { - super.setAsSOAPHeaderBlock(header); - headerString = header.getText(); - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 8dd9f200d8..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#wsConfigParam,model=org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy
-org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#axis2TokenAuthentication,model=org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy
-org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#axis2Header,model=org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory deleted file mode 100644 index ced48cf236..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Implementation class for the policy extension
-org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicyProviderFactory;model=org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy
-org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicyProviderFactory;model=org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/PolicyReadTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/PolicyReadTestCase.java deleted file mode 100644 index 44533fe0b6..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/PolicyReadTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.policy.configuration; - - -import java.io.InputStream; -import java.net.URL; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; - -/** - * - * Test the reading of ws config params policy. - * - * @version $Rev$ $Date$ - */ -public class PolicyReadTestCase extends TestCase { - - public void testPolicyReading() throws Exception { - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - XMLInputFactory inputFactory = XMLInputFactory.newInstance(); - StAXArtifactProcessor<Object> staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null); - - URL url = getClass().getResource("mock_policies.xml"); - - InputStream urlStream = url.openStream(); - XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream); - - Axis2ConfigParamPolicy policy = (Axis2ConfigParamPolicy)staxProcessor.read(reader); - assertEquals(policy.getParamElements().size(), 2); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/mock_policies.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/mock_policies.xml deleted file mode 100644 index cc84a83a47..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2-policy/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/mock_policies.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<tuscany:wsConfigParam xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - <parameter name="InflowSecurity"> - <action> - <items>Timestamp Signature</items> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/security.properties</signaturePropFile> - </action> - </parameter> - <parameter name="OutflowSecurity"> - <action> - <items>Timestamp Signature</items> - <user>TuscanyWsUser</user> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/security.properties</signaturePropFile> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.IntegrityPWCBHandler</passwordCallbackClass>" + - <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier> - </action> - </parameter> -</tuscany:wsConfigParam>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/LICENSE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/META-INF/MANIFEST.MF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/META-INF/MANIFEST.MF deleted file mode 100644 index 74869d3c4a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/META-INF/MANIFEST.MF +++ /dev/null @@ -1,156 +0,0 @@ -Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.binding.ws.axis2;version="2.0.0";
- uses:="org.apache.axis2.deployment.util,
- org.apache.tuscany.sca.definitions,
- org.apache.tuscany.sca.policy.authentication.basic,
- org.apache.tuscany.sca.policy.security.ws,
- org.apache.ws.security.handler,
- javax.xml.namespace,
- org.apache.axiom.om,
- org.xml.sax,
- org.apache.commons.httpclient,
- org.apache.axiom.soap,
- org.apache.axis2.util,
- javax.servlet,
- javax.xml.stream,
- org.apache.tuscany.sca.core.assembly,
- org.apache.axis2.transport.http.server,
- org.oasisopen.sca,
- org.apache.axis2.i18n,
- org.apache.axis2.transport,
- org.apache.axis2.transport.jms,
- org.apache.axis2.client,
- org.apache.axis2.context,
- org.apache.axiom.om.impl.builder,
- org.apache.tuscany.sca.interfacedef.java,
- org.w3c.dom,
- javax.wsdl,
- org.apache.tuscany.sca.xsd.xml,
- org.apache.tuscany.sca.binding.ws,
- org.apache.axis2.engine,
- org.apache.axis2.receivers,
- org.apache.commons.httpclient.params,
- org.apache.tuscany.sca.interfacedef.wsdl,
- org.apache.tuscany.sca.xsd,
- org.apache.tuscany.sca.databinding,
- org.apache.axis2.addressing,
- org.apache.axis2.deployment,
- org.apache.axis2.transport.http,
- org.apache.tuscany.sca.runtime,
- org.apache.commons.logging,
- org.apache.tuscany.sca.interfacedef.util,
- org.apache.tuscany.sca.provider,
- org.apache.tuscany.sca.core,
- javax.xml.transform.dom,
- org.apache.tuscany.sca.policy,
- org.apache.axis2.description,
- javax.wsdl.extensions,
- org.apache.tuscany.sca.host.http,
- org.apache.tuscany.sca.policy.util,
- org.apache.axis2.util.threadpool,
- org.apache.ws.security,
- org.apache.axis2,
- org.apache.ws.commons.schema,
- org.apache.tuscany.sca.assembly,
- org.apache.ws.commons.schema.resolver,
- javax.wsdl.extensions.soap,
- org.apache.tuscany.sca.interfacedef,
- org.apache.tuscany.sca.invocation,
- javax.xml.transform,
- javax.wsdl.extensions.soap12,
- org.apache.tuscany.sca.contribution.processor,
- javax.servlet.http"
-Private-Package: org.apache.tuscany.sca.binding.ws.axis2.engine.config
- ;version="2.0.0",org.apache.tuscany.sca.binding.ws.axis2.engine.config.
- modules;version="2.0.0",org.apache.tuscany.sca.binding.ws.axis2.engine.
- config.services;version="2.0.0",org.apache.tuscany.sca.binding.ws.axis2
- .policy.authentication.basic;version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: Apache Tuscany SCA Axis2-based WS Binding Extension
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: 2.0.0
-Bnd-LastModified: 1225397353000
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA Axis2-based WS Binding Extensio
- n
-Eclipse-RegisterBuddy: org.apache.axis2.kernel
-Import-Package: javax.xml.stream,
- javax.xml.transform,
- javax.xml.transform.dom,
- javax.xml.parsers,
- org.w3c.dom,
- javax.activation;resolution:=optional,
- org.xml.sax,
- javax.security.auth.callback;resolution:=optional,
- javax.servlet,
- javax.servlet.http,
- javax.wsdl,
- javax.wsdl.extensions,
- javax.wsdl.extensions.soap,
- javax.wsdl.extensions.soap12,
- javax.wsdl.factory;resolution:=optional,
- javax.wsdl.xml;resolution:=optional,
- javax.xml.namespace,
- org.apache.axiom.om,
- org.apache.axiom.om.impl.builder,
- org.apache.axiom.om.util,
- org.apache.axiom.soap,
- org.apache.axis2,
- org.apache.axis2.addressing,
- org.apache.axis2.client,
- org.apache.axis2.context,
- org.apache.axis2.deployment,
- org.apache.axis2.deployment.util,
- org.apache.axis2.description,
- org.apache.axis2.engine,
- org.apache.axis2.handlers,
- org.apache.axis2.i18n,
- org.apache.axis2.receivers,
- org.apache.axis2.transport,
- org.apache.axis2.transport.http,
- org.apache.axis2.transport.http.server,
- org.apache.axis2.transport.jms,
- org.apache.axis2.util,
- org.apache.axis2.util.threadpool,
- org.apache.commons.httpclient,
- org.apache.commons.httpclient.params,
- org.apache.commons.logging;resolution:=optional,
- org.apache.neethi,
- org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.binding.ws;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.configuration;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.axis2.policy.header;version="2.0.0",
- org.apache.tuscany.sca.contribution.processor;version="2.0.0",
- org.apache.tuscany.sca.core;version="2.0.0",
- org.apache.tuscany.sca.core.assembly;version="2.0.0",
- org.apache.tuscany.sca.databinding;version="2.0.0",
- org.apache.tuscany.sca.definitions;version="2.0.0",
- org.apache.tuscany.sca.host.http;version="2.0.0",
- org.apache.tuscany.sca.interfacedef;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.java;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.util;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.wsdl;version="2.0.0",
- org.apache.tuscany.sca.invocation;version="2.0.0",
- org.apache.tuscany.sca.policy;version="2.0.0",
- org.apache.tuscany.sca.policy.authentication.basic;version="2.0.0",
- org.apache.tuscany.sca.policy.security;version="2.0.0",
- org.apache.tuscany.sca.policy.util;version="2.0.0",
- org.apache.tuscany.sca.policy.xml.ws;version="2.0.0";resolution:=optional,
- org.apache.tuscany.sca.provider;version="2.0.0",
- org.apache.tuscany.sca.runtime;version="2.0.0",
- org.apache.tuscany.sca.xsd;version="2.0.0",
- org.apache.tuscany.sca.xsd.xml;version="2.0.0",
- org.apache.ws.commons.schema,
- org.apache.ws.commons.schema.resolver,
- org.apache.ws.security,
- org.apache.ws.security.handler,
- org.oasisopen.sca;version="2.0.0",
- org.oasisopen.sca.annotation;version="2.0.0";resolution:=optional
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.ws.axis2
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- JavaSE-1.6
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/NOTICE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/NOTICE deleted file mode 100644 index 25bb89c9b2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/pom.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/pom.xml deleted file mode 100644 index f312297a74..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/pom.xml +++ /dev/null @@ -1,385 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>2.0-M3</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>tuscany-binding-ws-axis2</artifactId> - <name>Apache Tuscany SCA Axis2-based WS Binding Extension</name> - - <repositories> - <repository> - <id>apache.ws</id> - <name>Apache WebServices Repository</name> - <url>http://ws.zones.apache.org/repository/</url> - <layout>legacy</layout> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-interface-wsdl</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-assembly-xml</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-xml</artifactId> - <version>2.0-M3</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-xml</artifactId> - <version>2.0-M3</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-core-databinding</artifactId> - <version>2.0-M3</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-axiom</artifactId> - <version>2.0-M3</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-databinding-jaxb-axiom</artifactId> - <version>2.0-M3</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-http</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2-policy</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-xml-ws</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-xsd</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-kernel</artifactId> - <version>1.4.1</version> - <exclusions> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xmlParserAPIs</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.ant</groupId> - <artifactId>ant</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.ant</groupId> - <artifactId>ant-launcher</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-java2wsdl</artifactId> - <version>1.4.1</version> - <exclusions> - <exclusion> - <groupId>org.apache.ant</groupId> - <artifactId>ant</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.ant</groupId> - <artifactId>ant-launcher</artifactId> - </exclusion> - <exclusion> - <groupId>xom</groupId> - <artifactId>xom</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-codegen</artifactId> - <version>1.4.1</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb</artifactId> - </exclusion> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.neethi</groupId> - <artifactId>neethi</artifactId> - <version>2.0.4</version> - <exclusions> - <exclusion> - <groupId>org.codehaus.woodstox</groupId> - <artifactId>wstx-asl</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>3.1</version> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.1.1</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-mtompolicy</artifactId> - <version>1.4.1</version> - </dependency> - - <dependency> - <groupId>org.apache.santuario</groupId> - <artifactId>xmlsec</artifactId> - <version>1.4.2</version> - </dependency> - - <dependency> - <groupId>org.apache.ws.security</groupId> - <artifactId>wss4j</artifactId> - <version>1.5.4</version> - <exclusions> - <exclusion> - <groupId>bouncycastle</groupId> - <artifactId>bcprov-jdk13</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>mex</artifactId> - <version>1.41</version> - <classifier>impl</classifier> - </dependency> - - <dependency> - <groupId>org.apache.rampart</groupId> - <artifactId>rampart-core</artifactId> - <version>1.4</version> - <exclusions> - <exclusion> - <groupId>org.apache.ant</groupId> - <artifactId>ant-nodeps</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>addressing</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-xmlbeans</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>mex</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-codegen</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb-codegen</artifactId> - </exclusion> - <exclusion> - <groupId>xmlbeans</groupId> - <artifactId>xbean</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.ws.commons.schema</groupId> - <artifactId>XmlSchema</artifactId> - </exclusion> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - <exclusion> - <groupId>bouncycastle</groupId> - <artifactId>bcprov-jdk13</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - - <!-- xerces, xalan, and xml-apis are required for running in websphere --> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <version>2.7.0</version> - <scope>optional</scope> - <exclusions> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.1</version> - <exclusions> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - </dependency> - -<!-- - <dependency> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - <version>1.3.03</version> - </dependency> ---> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-jetty</artifactId> - <version>2.0-M3</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>2.0-M3</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-launcher-equinox</artifactId> - <version>2.0-M3</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>2.0-M3</version> - <scope>test</scope> - </dependency> - - </dependencies> - -</project> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java deleted file mode 100644 index 46c97e7553..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.security.AccessController; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.axiom.om.OMElement; -import org.apache.axiom.soap.SOAPBody; -import org.apache.axiom.soap.SOAPEnvelope; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axiom.soap.SOAPHeader; -import org.apache.axis2.AxisFault; -import org.apache.axis2.addressing.AddressingConstants; -import org.apache.axis2.addressing.EndpointReference; -import org.apache.axis2.addressing.EndpointReferenceHelper; -import org.apache.axis2.client.OperationClient; -import org.apache.axis2.client.Options; -import org.apache.axis2.context.MessageContext; -import org.apache.axis2.transport.http.HTTPConstants; -import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy; -import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingBasicAuthenticationConfigurator; -import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingHeaderConfigurator; -import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy; -import org.apache.tuscany.sca.interfacedef.util.FaultException; -import org.apache.tuscany.sca.invocation.DataExchangeSemantics; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy; -import org.apache.tuscany.sca.runtime.ReferenceParameters; - - -/** - * Axis2BindingInvoker uses an Axis2 OperationClient to invoke a remote web service - * - * @version $Rev$ $Date$ - */ -public class Axis2BindingInvoker implements Invoker, DataExchangeSemantics { - private final static String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; - - public static final QName QNAME_WSA_FROM = - new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_FROM, - AddressingConstants.WSA_DEFAULT_PREFIX); - public static final String TUSCANY_PREFIX = "tuscany"; - public static final QName CALLBACK_ID_REFPARM_QN = - new QName(SCA11_TUSCANY_NS, "CallbackID", TUSCANY_PREFIX); - public static final QName CONVERSATION_ID_REFPARM_QN = - new QName(SCA11_TUSCANY_NS, "ConversationID", TUSCANY_PREFIX); - - private Axis2ServiceClient serviceClient; - private QName wsdlOperationName; - private Options options; - private SOAPFactory soapFactory; - private WebServiceBinding wsBinding; - - private BasicAuthenticationPolicy basicAuthenticationPolicy = null; - private Axis2TokenAuthenticationPolicy axis2TokenAuthenticationPolicy = null; - private List<Axis2HeaderPolicy> axis2HeaderPolicies = new ArrayList<Axis2HeaderPolicy>(); - - public Axis2BindingInvoker(Axis2ServiceClient serviceClient, - QName wsdlOperationName, - Options options, - SOAPFactory soapFactory, - WebServiceBinding wsBinding) { - this.serviceClient = serviceClient; - this.wsdlOperationName = wsdlOperationName; - this.options = options; - this.soapFactory = soapFactory; - this.wsBinding = wsBinding; - - // find out which policies are active - /* - if (wsBinding instanceof PolicySubject) { - List<PolicySet> policySets = ((PolicySubject)wsBinding).getPolicySets(); - for (PolicySet ps : policySets) { - for (Object p : ps.getPolicies()) { - if (BasicAuthenticationPolicy.class.isInstance(p)) { - basicAuthenticationPolicy = (BasicAuthenticationPolicy)p; - } else if (Axis2TokenAuthenticationPolicy.class.isInstance(p)) { - axis2TokenAuthenticationPolicy = (Axis2TokenAuthenticationPolicy)p; - } else if (Axis2HeaderPolicy.class.isInstance(p)) { - axis2HeaderPolicies.add((Axis2HeaderPolicy)p); - }else { - // etc. check for other types of policy being present - } - } - } - } - */ - } - - private static final QName EXCEPTION = new QName("", "Exception"); - - public Message invoke(Message msg) { - try { - Object resp = invokeTarget(msg); - - msg.setBody(resp); - } catch (AxisFault e) { - if (e.getDetail() != null ) { - FaultException f = new FaultException(e.getMessage(), e.getDetail(), e); - f.setFaultName(e.getDetail().getQName()); - msg.setFaultBody(f); - } else { - msg.setFaultBody(e); - } - } catch (Throwable e) { - msg.setFaultBody(e); - } - - return msg; - } - - protected Object invokeTarget(Message msg) throws AxisFault { - final OperationClient operationClient = createOperationClient(msg); - - // ensure connections are tracked so that they can be closed by the reference binding - MessageContext requestMC = operationClient.getMessageContext("Out"); - requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); - requestMC.getOptions().setTimeOutInMilliSeconds(240000L); - - /* - for ( PolicyHandler policyHandler : policyHandlerList ) { - policyHandler.beforeInvoke(msg, requestMC, operationClient); - } - */ - - // set policy specified headers - for (Axis2HeaderPolicy policy : axis2HeaderPolicies){ - Axis2BindingHeaderConfigurator.setHeader(requestMC, msg, policy.getHeaderName()); - } - - if (basicAuthenticationPolicy != null) { - Axis2BindingBasicAuthenticationConfigurator.setOperationOptions(operationClient, msg, basicAuthenticationPolicy); - } - - if (axis2TokenAuthenticationPolicy != null) { - Axis2BindingHeaderConfigurator.setHeader(requestMC, msg, axis2TokenAuthenticationPolicy.getTokenName()); - } - - // Allow privileged access to read properties. Requires PropertiesPermission read in - // security policy. - try { - AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { - public Object run() throws AxisFault { - operationClient.execute(true); - return null; - } - }); - } catch (PrivilegedActionException e) { - operationClient.complete(requestMC); - throw (AxisFault)e.getException(); - } - - MessageContext responseMC = operationClient.getMessageContext("In"); - - /* - for ( PolicyHandler policyHandler : policyHandlerList ) { - policyHandler.afterInvoke(msg, responseMC, operationClient); - } - */ - - OMElement response = responseMC.getEnvelope().getBody().getFirstElement(); - - // FIXME: [rfeng] We have to pay performance penalty to build the complete OM as the operationClient.complete() will - // release the underlying HTTP connection. - // Force the response to be populated, see https://issues.apache.org/jira/browse/TUSCANY-1541 - if (response != null) { - response.build(); - } - - operationClient.complete(requestMC); - - return response; - } - - @SuppressWarnings("deprecation") - protected OperationClient createOperationClient(Message msg) throws AxisFault { - SOAPEnvelope env = soapFactory.getDefaultEnvelope(); - Object[] args = (Object[])msg.getBody(); - if (args != null && args.length > 0) { - SOAPBody body = env.getBody(); - for (Object bc : args) { - if (bc instanceof OMElement) { - body.addChild((OMElement)bc); - } else { - throw new IllegalArgumentException( - "Can't handle mixed payloads between OMElements and other types."); - } - } - } - final MessageContext requestMC = new MessageContext(); - requestMC.setEnvelope(env); - - // Axis2 operationClients can not be shared so create a new one for each request - final OperationClient operationClient = serviceClient.getServiceClient().createClient(wsdlOperationName); - operationClient.setOptions(options); - - Endpoint callbackEndpoint = msg.getFrom().getCallbackEndpoint(); - -/* TODO - EPR - not required for OASIS - // set callback endpoint and callback ID for WS-Addressing header - EndpointReference fromEPR = null; - org.apache.tuscany.sca.runtime.EndpointReference callbackEPR = parameters.getCallbackReference(); - if (callbackEPR != null) { - fromEPR = new EndpointReference(callbackEPR.getBinding().getURI()); - } - Object callbackID = parameters.getCallbackID(); - if (callbackID != null) { - if (fromEPR == null) { - fromEPR = new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL); - } - //FIXME: serialize callback ID to XML in case it is not a string - fromEPR.addReferenceParameter(CALLBACK_ID_REFPARM_QN, callbackID.toString()); - } - - // set conversation ID for WS-Addressing header - Object conversationId = parameters.getConversationID(); - if (conversationId != null) { - if (fromEPR == null) { - fromEPR = new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL); - } - //FIXME: serialize conversation ID to XML in case it is not a string - fromEPR.addReferenceParameter(CONVERSATION_ID_REFPARM_QN, conversationId.toString()); - } -*/ - - // add WS-Addressing header - //FIXME: is there any way to use the Axis2 addressing support for this? - if (callbackEndpoint != null) { - EndpointReference fromEPR = new EndpointReference(callbackEndpoint.getURI()); - SOAPEnvelope sev = requestMC.getEnvelope(); - SOAPHeader sh = sev.getHeader(); - OMElement epr = - EndpointReferenceHelper.toOM(sev.getOMFactory(), - fromEPR, - QNAME_WSA_FROM, - AddressingConstants.Final.WSA_NAMESPACE); - sh.addChild(epr); - requestMC.setFrom(fromEPR); - } - - // Set any message headers required by policy - // Get the header from the tuscany message - // If its not already an OM convert it to OM - // add it to the envelope header - - // if target endpoint was not specified when this invoker was created, - // use dynamically specified target endpoint passed in on this call - if (options.getTo() == null) { - Endpoint ep = msg.getTo(); - if (ep != null) { - requestMC.setTo(new EndpointReference(ep.getBinding().getURI())); - } else { - throw new RuntimeException("Unable to determine destination endpoint"); - } - } else { - requestMC.setTo(new EndpointReference(options.getTo().getAddress())); - } - - // Allow privileged access to read properties. Requires PropertiesPermission read in - // security policy. - try { - AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { - public Object run() throws AxisFault { - operationClient.addMessageContext(requestMC); - return null; - } - }); - } catch (PrivilegedActionException e) { - throw (AxisFault)e.getException(); - } - return operationClient; - } - - public boolean allowsPassByReference() { - return true; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java deleted file mode 100644 index cc65988553..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.util.List; - -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; -import org.apache.tuscany.sca.host.http.ServletHost; -import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint; -import org.apache.tuscany.sca.provider.BindingProviderFactory; -import org.apache.tuscany.sca.provider.ReferenceBindingProvider; -import org.apache.tuscany.sca.provider.ServiceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * Axis2BindingProviderFactory - * - * @version $Rev$ $Date$ - */ - -public class Axis2BindingProviderFactory implements BindingProviderFactory<WebServiceBinding> { - - private FactoryExtensionPoint modelFactories; - private ServletHost servletHost; - private DataBindingExtensionPoint dataBindings; - - public Axis2BindingProviderFactory(ExtensionPointRegistry extensionPoints) { - ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class); - List<ServletHost> hosts = servletHosts.getServletHosts(); - if (!hosts.isEmpty()) { - this.servletHost = hosts.get(0); - } - modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); - dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class); - } - - public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, - RuntimeComponentReference reference, - WebServiceBinding binding) { - return new Axis2ReferenceBindingProvider(component, reference, binding, - modelFactories, dataBindings); - } - - public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, - RuntimeComponentService service, - WebServiceBinding binding) { - return new Axis2ServiceBindingProvider(component, service, binding, - servletHost, modelFactories, - dataBindings); - } - - public Class<WebServiceBinding> getModelType() { - return WebServiceBinding.class; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java deleted file mode 100644 index abf5f4008d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import javax.xml.namespace.QName; - -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.transport.http.HTTPConstants; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.invocation.Message; - -/** - * Axis2OneWayBindingInvoker uses an Axis2 OperationClient to invoke a OneWay remote web service. - * - * @version $Rev$ $Date$ - */ -public class Axis2OneWayBindingInvoker extends Axis2BindingInvoker { - - public Axis2OneWayBindingInvoker(Axis2ServiceClient serviceClient, - QName wsdlOperationName, - Options options, - SOAPFactory soapFactory, - WebServiceBinding wsBinding) { - - super(serviceClient, wsdlOperationName, options, soapFactory, wsBinding); - } - - @Override - protected Object invokeTarget(Message msg) throws AxisFault { - OperationClient operationClient = createOperationClient(msg); - - // ensure connections are tracked so that they can be closed by the reference binding - MessageContext requestMC = operationClient.getMessageContext("Out"); - //requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); - Options opt = requestMC.getOptions(); - opt.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); - opt.setUseSeparateListener(true); - opt.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,Boolean.TRUE); - - operationClient.execute(false); - - // REVIEW it seems ok to return null - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java deleted file mode 100644 index 184d02642e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import org.apache.axiom.om.OMElement; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.provider.ReferenceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.oasisopen.sca.ServiceRuntimeException; - -public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider { - - private WebServiceBinding wsBinding; - private Axis2ServiceClient axisClient; - - public Axis2ReferenceBindingProvider(RuntimeComponent component, - RuntimeComponentReference reference, - WebServiceBinding wsBinding, - FactoryExtensionPoint modelFactories, - DataBindingExtensionPoint dataBindings) { - - MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class); - this.wsBinding = wsBinding; - - // A WSDL document should always be present in the binding - if (wsBinding.getWSDLDocument() == null) { - throw new ServiceRuntimeException("No WSDL document for " + component.getName() + "/" + reference.getName()); - } - - // Set to use the Axiom data binding - InterfaceContract contract = wsBinding.getBindingInterfaceContract(); - if (contract.getInterface() != null) { - contract.getInterface().resetDataBinding(OMElement.class.getName()); - } - - axisClient = new Axis2ServiceClient(component, reference, wsBinding, messageFactory); - } - - public void start() { - axisClient.start(); - } - - public void stop() { - axisClient.stop(); - } - - public InterfaceContract getBindingInterfaceContract() { - return wsBinding.getBindingInterfaceContract(); - } - - public boolean supportsOneWayInvocation() { - return true; - } - - public Invoker createInvoker(Operation operation) { - return axisClient.createInvoker(operation); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java deleted file mode 100644 index 5306a519ab..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import org.apache.axiom.om.OMElement; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; -import org.apache.tuscany.sca.host.http.ServletHost; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.provider.ServiceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; -import org.oasisopen.sca.ServiceRuntimeException; - -public class Axis2ServiceBindingProvider implements ServiceBindingProvider { - - private WebServiceBinding wsBinding; - private Axis2ServiceProvider axisProvider; - - public Axis2ServiceBindingProvider(RuntimeComponent component, - RuntimeComponentService service, - WebServiceBinding wsBinding, - ServletHost servletHost, - FactoryExtensionPoint modelFactories, - DataBindingExtensionPoint dataBindings) { - - if (servletHost == null) { - throw new ServiceRuntimeException("No Servlet host is avaible for HTTP web services"); - } - - MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class); - this.wsBinding = wsBinding; - - // A WSDL document should always be present in the binding - if (wsBinding.getWSDLDocument() == null) { - throw new ServiceRuntimeException("No WSDL document for " + component.getName() + "/" + service.getName()); - } - - // Set to use the Axiom data binding - InterfaceContract contract = wsBinding.getBindingInterfaceContract(); - contract.getInterface().resetDataBinding(OMElement.class.getName()); - - axisProvider = new Axis2ServiceProvider(component, service, wsBinding, servletHost, messageFactory, modelFactories); - } - - public void start() { - axisProvider.start(); - } - - public void stop() { - axisProvider.stop(); - } - - public InterfaceContract getBindingInterfaceContract() { - return wsBinding.getBindingInterfaceContract(); - } - - public boolean supportsOneWayInvocation() { - return true; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java deleted file mode 100644 index d2ba46a7e2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import static org.apache.tuscany.sca.binding.ws.axis2.AxisPolicyHelper.SOAP12_INTENT; -import static org.apache.tuscany.sca.binding.ws.axis2.AxisPolicyHelper.isIntentRequired; - -import java.io.IOException; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import javax.wsdl.Binding; -import javax.wsdl.BindingOperation; -import javax.wsdl.Definition; -import javax.wsdl.Import; -import javax.wsdl.Port; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap.SOAPOperation; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.xml.namespace.QName; -import javax.xml.stream.FactoryConfigurationError; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.transform.dom.DOMSource; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; -import org.apache.axiom.soap.SOAPFactory; -import org.apache.axis2.AxisFault; -import org.apache.axis2.addressing.EndpointReference; -import org.apache.axis2.addressing.EndpointReferenceHelper; -import org.apache.axis2.client.Options; -import org.apache.axis2.client.ServiceClient; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.description.AxisEndpoint; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.Parameter; -import org.apache.axis2.description.WSDL11ToAxisServiceBuilder; -import org.apache.axis2.description.WSDL2Constants; -import org.apache.axis2.transport.http.HTTPConstants; -import org.apache.axis2.util.threadpool.ThreadPool; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; -import org.apache.commons.httpclient.params.HttpConnectionManagerParams; -import org.apache.tuscany.sca.assembly.AbstractContract; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.xsd.xml.XMLDocumentHelper; -import org.apache.ws.commons.schema.resolver.URIResolver; -import org.oasisopen.sca.ServiceRuntimeException; - -public class Axis2ServiceClient { - - private RuntimeComponent component; - private AbstractContract contract; - private WebServiceBinding wsBinding; - private ServiceClient serviceClient; - - public Axis2ServiceClient(RuntimeComponent component, - AbstractContract contract, - WebServiceBinding wsBinding, - MessageFactory messageFactory) { - - this.component = component; - this.contract = contract; - this.wsBinding = wsBinding; - } - - protected void start() { - if (serviceClient == null) { - this.serviceClient = createServiceClient(); - } - } - - public ServiceClient getServiceClient() { - return serviceClient; - } - - protected void configurePolicy(ConfigurationContext context, PolicySet ps) throws AxisFault { - if (ps == null) { - return; - } - for (Object policy : ps.getPolicies()) { - if (policy instanceof Axis2ConfigParamPolicy) { - Axis2ConfigParamPolicy axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy; - for (Map.Entry<String, OMElement> param : axis2ConfigParamPolicy.getParamElements().entrySet()) { - Parameter configParam = new Parameter(param.getKey(), param.getValue().getFirstElement()); - configParam.setParameterElement(param.getValue()); - context.getAxisConfiguration().addParameter(configParam); - } - } - } - } - - /** - * Create an Axis2 ServiceClient - */ - protected ServiceClient createServiceClient() { - try { - final boolean isRampartRequired = AxisPolicyHelper.isRampartRequired(wsBinding); - ConfigurationContext configContext; - - try { - // TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator(); - // Allow privileged access to read properties. Requires PropertyPermission read in - // security policy. - TuscanyAxisConfigurator tuscanyAxisConfigurator = - AccessController.doPrivileged(new PrivilegedExceptionAction<TuscanyAxisConfigurator>() { - public TuscanyAxisConfigurator run() throws AxisFault { - return new TuscanyAxisConfigurator(isRampartRequired); - } - }); - configContext = tuscanyAxisConfigurator.getConfigurationContext(); - // deployRampartModule(); - // configureSecurity(); - } catch (PrivilegedActionException e) { - throw new ServiceRuntimeException(e.getException()); - } - - createPolicyHandlers(); - - Definition definition = wsBinding.getWSDLDocument(); - QName serviceQName = wsBinding.getService().getQName(); - Port port = wsBinding.getPort(); - if (port == null) { - // service has multiple ports, select one port to use - Collection<Port> ports = wsBinding.getService().getPorts().values(); - for (Port p : ports) { - // look for a SOAP 1.1 port first - if (p.getExtensibilityElements().get(0) instanceof SOAPAddress) { - port = p; - break; - } - } - if (port == null) { - // no SOAP 1.1 port available, so look for a SOAP 1.2 port - for (Port p : ports) { - if (p.getExtensibilityElements().get(0) instanceof SOAP12Address) { - port = p; - break; - } - } - } - } - AxisService axisService = - createClientSideAxisService(definition, serviceQName, port.getName(), new Options()); - - HttpClient httpClient = (HttpClient)configContext.getProperty(HTTPConstants.CACHED_HTTP_CLIENT); - if (httpClient == null) { - MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager(); - HttpConnectionManagerParams connectionManagerParams = new HttpConnectionManagerParams(); - connectionManagerParams.setDefaultMaxConnectionsPerHost(2); - connectionManagerParams.setTcpNoDelay(true); - connectionManagerParams.setStaleCheckingEnabled(true); - connectionManagerParams.setLinger(0); - connectionManager.setParams(connectionManagerParams); - httpClient = new HttpClient(connectionManager); - configContext.setThreadPool(new ThreadPool(1, 5)); - configContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); - configContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); - } - - return new ServiceClient(configContext, axisService); - - } catch (AxisFault e) { - throw new RuntimeException(e); // TODO: better exception - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - /** - * URI resolver implementation for XML schema - */ - public static class URIResolverImpl implements URIResolver { - private Definition definition; - - public URIResolverImpl(Definition definition) { - this.definition = definition; - } - - public org.xml.sax.InputSource resolveEntity(java.lang.String targetNamespace, - java.lang.String schemaLocation, - java.lang.String baseUri) { - try { - if (baseUri == null) { - baseUri = definition.getDocumentBaseURI(); - } - URL url = new URL(new URL(baseUri), schemaLocation); - return XMLDocumentHelper.getInputSource(url); - } catch (IOException e) { - return null; - } - } - } - - /** - * Workaround for https://issues.apache.org/jira/browse/AXIS2-3205 - * @param definition - * @param serviceName - * @return - */ - private static Definition getDefinition(Definition definition, QName serviceName) { - - if (serviceName == null) { - return definition; - } - - if (definition == null) { - return null; - } - Object service = definition.getServices().get(serviceName); - if (service != null) { - return definition; - } - for (Object i : definition.getImports().values()) { - List<Import> imports = (List<Import>)i; - for (Import imp : imports) { - Definition d = getDefinition(imp.getDefinition(), serviceName); - if (d != null) { - return d; - } - } - } - return null; - } - - /** - * This method is copied from AxisService.createClientSideAxisService to - * work around http://issues.apache.org/jira/browse/WSCOMMONS-228 - * - * @param wsdlDefinition - * @param wsdlServiceName - * @param portName - * @param options - * @return - * @throws AxisFault - */ - @Deprecated - public static AxisService createClientSideAxisService(Definition definition, - QName serviceName, - String portName, - Options options) throws AxisFault { - Definition def = getDefinition(definition, serviceName); - final WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(def, serviceName, portName); - serviceBuilder.setServerSide(false); - // [rfeng] Add a custom resolver to work around WSCOMMONS-228 - serviceBuilder.setCustomResolver(new URIResolverImpl(def)); - serviceBuilder.setBaseUri(def.getDocumentBaseURI()); - // [rfeng] - // Allow access to read properties. Requires PropertiesPermission in security policy. - AxisService axisService; - try { - axisService = AccessController.doPrivileged(new PrivilegedExceptionAction<AxisService>() { - public AxisService run() throws AxisFault { - return serviceBuilder.populateService(); - } - }); - } catch ( PrivilegedActionException e ) { - throw (AxisFault) e.getException(); - } - - AxisEndpoint axisEndpoint = (AxisEndpoint)axisService.getEndpoints().get(axisService.getEndpointName()); - options.setTo(new EndpointReference(axisEndpoint.getEndpointURL())); - if (axisEndpoint != null) { - options.setSoapVersionURI((String)axisEndpoint.getBinding().getProperty(WSDL2Constants.ATTR_WSOAP_VERSION)); - } - return axisService; - } - - /* - private static <T extends ExtensibilityElement> T getExtensibilityElement(List elements, Class<T> type) { - for (Object e : elements) { - if (type.isInstance(e)) { - return type.cast(e); - } - } - return null; - } - */ - - protected void stop() { - if (serviceClient != null) { - // close all connections that we have initiated, so that the jetty server - // can be restarted without seeing ConnectExceptions - HttpClient httpClient = - (HttpClient)serviceClient.getServiceContext().getConfigurationContext() - .getProperty(HTTPConstants.CACHED_HTTP_CLIENT); - if (httpClient != null) - ((MultiThreadedHttpConnectionManager)httpClient.getHttpConnectionManager()).shutdown(); - - serviceClient = null; - } - } - - /** - * Create and configure an Axis2BindingInvoker for each operation - */ - protected Invoker createInvoker(Operation operation) { - Options options = new Options(); - EndpointReference epTo = getWSATOEPR(wsBinding); - if (epTo != null) { - options.setTo(epTo); - } - options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE); - - String operationName = operation.getName(); - - String soapAction = getSOAPAction(operationName); - if (soapAction != null && soapAction.length() > 1) { - options.setAction(soapAction); - } - - options.setTimeOutInMilliSeconds(30 * 1000); // 30 seconds - - // Allow privileged access to read properties. Requires PropertiesPermission read in - // security policy. - SOAPFactory soapFactory = AccessController.doPrivileged(new PrivilegedAction<SOAPFactory>() { - public SOAPFactory run() { - if (requiresSOAP12()) - return OMAbstractFactory.getSOAP12Factory(); - else - return OMAbstractFactory.getSOAP11Factory(); - - } - }); - QName wsdlOperationQName = new QName(operationName); - if (requiresMTOM()) - { - options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM, org.apache.axis2.Constants.VALUE_TRUE); - } - Axis2BindingInvoker invoker; - if (operation.isNonBlocking()) { - invoker = new Axis2OneWayBindingInvoker(this, wsdlOperationQName, options, soapFactory, wsBinding); - } else { - invoker = new Axis2BindingInvoker(this, wsdlOperationQName, options, soapFactory, wsBinding); - } - - return invoker; - } - - private boolean requiresSOAP12() { - return isIntentRequired(wsBinding, SOAP12_INTENT); - } - - private boolean requiresMTOM() { - return isIntentRequired(wsBinding, AxisPolicyHelper.MTOM_INTENT); - } - - protected EndpointReference getWSATOEPR(WebServiceBinding binding) { - EndpointReference epr = getEPR(binding); - if (epr == null) { - epr = getPortLocationEPR(binding); - } else if (epr.getAddress() == null || epr.getAddress().length() < 1) { - EndpointReference bindingEPR = getPortLocationEPR(binding); - if (bindingEPR != null) { - epr.setAddress(bindingEPR.getAddress()); - } - } - return epr; - } - - protected EndpointReference getPortLocationEPR(WebServiceBinding binding) { - String ep = null; - if (binding.getPort() != null) { - List<?> wsdlPortExtensions = binding.getPort().getExtensibilityElements(); - for (final Object extension : wsdlPortExtensions) { - if (extension instanceof SOAPAddress) { - ep = ((SOAPAddress)extension).getLocationURI(); - break; - } - if (extension instanceof SOAP12Address) { - SOAP12Address address = (SOAP12Address)extension; - ep = address.getLocationURI(); - break; - } - } - } - if(ep == null || ep.equals("")) { - ep = binding.getURI(); - } - return ep == null || "".equals(ep) ? null : new EndpointReference(ep); - } - - protected org.apache.axis2.addressing.EndpointReference getEPR(WebServiceBinding wsBinding) { - if (wsBinding.getEndPointReference() == null) { - return null; - } - try { - - XMLStreamReader parser = - XMLInputFactory.newInstance().createXMLStreamReader(new DOMSource(wsBinding.getEndPointReference())); - StAXOMBuilder builder = new StAXOMBuilder(parser); - OMElement omElement = builder.getDocumentElement(); - org.apache.axis2.addressing.EndpointReference epr = EndpointReferenceHelper.fromOM(omElement); - return epr; - - } catch (IOException e) { - throw new RuntimeException(e); - } catch (XMLStreamException e) { - throw new RuntimeException(e); - } catch (FactoryConfigurationError e) { - throw new RuntimeException(e); - } - } - - protected String getSOAPAction(String operationName) { - Binding binding = wsBinding.getBinding(); - if (binding != null) { - for (Object o : binding.getBindingOperations()) { - BindingOperation bop = (BindingOperation)o; - if (bop.getName().equalsIgnoreCase(operationName)) { - for (Object o2 : bop.getExtensibilityElements()) { - if (o2 instanceof SOAPOperation) { - return ((SOAPOperation)o2).getSoapActionURI(); - } - } - } - } - } - return null; - } - - private void createPolicyHandlers() throws IllegalAccessException, InstantiationException, ClassNotFoundException { - if (wsBinding instanceof PolicySubject) { - - // code to create policy handlers using the new policy SPI based - // on policy providers -/* - List<PolicyProvider> policyProviders = ((RuntimeComponentReference)contract).getPolicyProviders(wsBinding); - - for (PolicyProvider policyProvider : policyProviders){ - policyHandler = policyProvider.createHandler(); - if (policyHandler != null) { - policyHandlerList.add(policyHandler); - } - } -*/ - } - } - - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java deleted file mode 100644 index 795b3b256f..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.lang.reflect.InvocationTargetException; - -import org.apache.axiom.om.OMElement; -import org.apache.axis2.AxisFault; -import org.apache.axis2.context.MessageContext; -import org.apache.axis2.receivers.AbstractInMessageReceiver; -import org.apache.tuscany.sca.interfacedef.Operation; - -public class Axis2ServiceInMessageReceiver extends AbstractInMessageReceiver { - - protected Operation operation; - - private Axis2ServiceProvider provider; - - public Axis2ServiceInMessageReceiver(Axis2ServiceProvider provider, Operation operation) { - this.provider = provider; - this.operation = operation; - } - - public Axis2ServiceInMessageReceiver() { - } - - @Override - public void invokeBusinessLogic(MessageContext inMC) throws AxisFault { - try { - OMElement requestOM = inMC.getEnvelope().getBody().getFirstElement(); - Object[] args = new Object[] {requestOM}; - - provider.invokeTarget(operation, args, inMC); - - } catch (InvocationTargetException e) { - Throwable t = e.getCause(); - if (t instanceof Exception) { - throw AxisFault.makeFault((Exception)t); - } - throw new RuntimeException(e); - } catch (Exception e) { - e.printStackTrace(); - throw AxisFault.makeFault(e); - } - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java deleted file mode 100644 index 2cd176aae0..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.lang.reflect.InvocationTargetException; -import java.util.logging.Level; -import java.util.logging.Logger; - -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.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.util.FaultException; -import org.oasisopen.sca.ServiceRuntimeException; - -public class Axis2ServiceInOutSyncMessageReceiver extends AbstractInOutSyncMessageReceiver { - private static final Logger logger = Logger.getLogger(Axis2ServiceInOutSyncMessageReceiver.class.getName()); - - protected Operation operation; - - private Axis2ServiceProvider provider; - - public Axis2ServiceInOutSyncMessageReceiver(Axis2ServiceProvider provider, Operation operation) { - this.provider = provider; - this.operation = operation; - } - - public Axis2ServiceInOutSyncMessageReceiver() { - } - - @Override - public void invokeBusinessLogic(MessageContext inMC, MessageContext outMC) throws AxisFault { - try { - OMElement requestOM = inMC.getEnvelope().getBody().getFirstElement(); - Object[] args = null; - - if (requestOM != null) { - args = new Object[] {requestOM}; - } - - /* - for ( PolicyHandler policyHandler : policyHandlerList ) { - policyHandler.beforeInvoke(operation, args, inMC); - } - */ - - OMElement responseOM = (OMElement)provider.invokeTarget(operation, args, inMC); - - /* - for ( PolicyHandler policyHandler : policyHandlerList ) { - policyHandler.afterInvoke(operation, args, inMC, responseOM); - } - */ - - SOAPEnvelope soapEnvelope = getSOAPFactory(inMC).getDefaultEnvelope(); - if (null != responseOM ) { - soapEnvelope.getBody().addChild(responseOM); - } - outMC.setEnvelope(soapEnvelope); - outMC.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE); - - } catch (InvocationTargetException e) { - Throwable t = e.getCause(); - if (t instanceof FaultException && ((FaultException)t).getFaultInfo() instanceof OMElement) { - OMElement faultDetail = (OMElement)((FaultException)t).getFaultInfo(); - inMC.setProperty(Constants.FAULT_NAME, faultDetail.getQName().getLocalPart()); - AxisFault f = new AxisFault(null, e.getMessage(), "faultNode", "faultRole", faultDetail); - throw f; - } - if (t instanceof Exception) { - throw AxisFault.makeFault((Exception)t); - } - logger.log(Level.SEVERE, e.getMessage(), t); - throw new ServiceRuntimeException(e); - } catch (Throwable e) { - logger.log(Level.SEVERE, e.getMessage(), e); - throw AxisFault.makeFault(e); - } - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java deleted file mode 100644 index 1db1d94dee..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java +++ /dev/null @@ -1,899 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Vector; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.wsdl.Definition; -import javax.wsdl.Import; -import javax.wsdl.Port; -import javax.wsdl.Types; -import javax.wsdl.extensions.UnknownExtensibilityElement; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.stream.XMLInputFactory; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.soap.SOAPHeader; -import org.apache.axis2.AxisFault; -import org.apache.axis2.Constants; -import org.apache.axis2.Constants.Configuration; -import org.apache.axis2.addressing.AddressingConstants; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.MessageContext; -import org.apache.axis2.deployment.util.Utils; -import org.apache.axis2.description.AxisEndpoint; -import org.apache.axis2.description.AxisOperation; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.Parameter; -import org.apache.axis2.description.TransportInDescription; -import org.apache.axis2.description.TransportOutDescription; -import org.apache.axis2.description.WSDL11ToAxisServiceBuilder; -import org.apache.axis2.description.WSDL2Constants; -import org.apache.axis2.description.WSDLToAxisServiceBuilder; -import org.apache.axis2.engine.ListenerManager; -import org.apache.axis2.engine.MessageReceiver; -import org.apache.axis2.transport.jms.JMSConstants; -import org.apache.axis2.transport.jms.JMSListener; -import org.apache.axis2.transport.jms.JMSSender; -import org.apache.axis2.transport.jms.JMSUtils; -import org.apache.tuscany.sca.assembly.AbstractContract; -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.assembly.EndpointReference; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceClient.URIResolverImpl; -import org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy; -import org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy; -import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingBasicAuthenticationConfigurator; -import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingHeaderConfigurator; -import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy; -import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2SOAPHeaderString; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; -import org.apache.tuscany.sca.host.http.ServletHost; -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy; -import org.apache.tuscany.sca.runtime.ReferenceParameters; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; -import org.apache.tuscany.sca.runtime.RuntimeWire; -import org.apache.tuscany.sca.xsd.XSDefinition; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaExternal; -import org.apache.ws.security.WSSecurityEngineResult; -import org.apache.ws.security.handler.WSHandlerConstants; -import org.apache.ws.security.handler.WSHandlerResult; -import org.oasisopen.sca.ServiceRuntimeException; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -public class Axis2ServiceProvider { - public static final String IMPORT_TAG = "import"; - public static final String INCLUDE_TAG = "include"; - - private static final Logger logger = Logger.getLogger(Axis2ServiceProvider.class.getName()); - - private RuntimeComponent component; - private AbstractContract contract; - private WebServiceBinding wsBinding; - private ServletHost servletHost; - private MessageFactory messageFactory; - private FactoryExtensionPoint modelFactories; - private RuntimeAssemblyFactory assemblyFactory; - private ConfigurationContext configContext; - private JMSSender jmsSender; - private JMSListener jmsListener; - private Map<String, Port> urlMap = new HashMap<String, Port>(); - - private BasicAuthenticationPolicy basicAuthenticationPolicy = null; - private Axis2TokenAuthenticationPolicy axis2TokenAuthenticationPolicy = null; - private List<Axis2HeaderPolicy> axis2HeaderPolicies = new ArrayList<Axis2HeaderPolicy>(); - - public static final QName QNAME_WSA_ADDRESS = - new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_ADDRESS); - public static final QName QNAME_WSA_FROM = - new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_FROM); - public static final QName QNAME_WSA_REFERENCE_PARAMETERS = - new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_REFERENCE_PARAMETERS); - - private static final QName TRANSPORT_JMS_QUALIFIED_INTENT = - new QName("http://docs.oasis-open.org/ns/opencsa/sca/200903", "transport.jms"); - private static final String DEFAULT_QUEUE_CONNECTION_FACTORY = "TuscanyQueueConnectionFactory"; - - //Schema element names - public static final String ELEM_SCHEMA = "schema"; - - //Schema URI - public static final String NS_URI_XSD_1999 = "http://www.w3.org/1999/XMLSchema"; - public static final String NS_URI_XSD_2000 = "http://www.w3.org/2000/10/XMLSchema"; - public static final String NS_URI_XSD_2001 = "http://www.w3.org/2001/XMLSchema"; - - //Schema QNames - public static final QName Q_ELEM_XSD_1999 = new QName(NS_URI_XSD_1999, ELEM_SCHEMA); - public static final QName Q_ELEM_XSD_2000 = new QName(NS_URI_XSD_2000, ELEM_SCHEMA); - public static final QName Q_ELEM_XSD_2001 = new QName(NS_URI_XSD_2001, ELEM_SCHEMA); - public static final List<QName> XSD_QNAME_LIST = - Arrays.asList(new QName[] {Q_ELEM_XSD_1999, Q_ELEM_XSD_2000, Q_ELEM_XSD_2001}); - - /** - * This classloader is used in OSGi to work around XXXFactory.newInstance() - */ - private static class MultiParentClassLoader extends ClassLoader { - private final Set<ClassLoader> classLoaders = new HashSet<ClassLoader>(); - - /** - * @param parent The parent classloaders - * @param loaders A list of classloaders to be used to load classes or resources - */ - public MultiParentClassLoader(ClassLoader parent, ClassLoader[] loaders) { - super(parent); - if (loaders != null) { - for (ClassLoader cl : loaders) { - if (cl != null && cl != parent) { - this.classLoaders.add(cl); - } - } - } - } - - @Override - protected Class<?> findClass(String className) throws ClassNotFoundException { - for (ClassLoader parent : classLoaders) { - try { - return parent.loadClass(className); - } catch (ClassNotFoundException e) { - continue; - } - } - throw new ClassNotFoundException(className); - } - - @Override - protected URL findResource(String resName) { - for (ClassLoader parent : classLoaders) { - URL url = parent.getResource(resName); - if (url != null) { - return url; - } - } - return null; - } - - @Override - protected Enumeration<URL> findResources(String resName) throws IOException { - Set<URL> urlSet = new HashSet<URL>(); - for (ClassLoader parent : classLoaders) { - Enumeration<URL> urls = parent.getResources(resName); - if (urls != null) { - while (urls.hasMoreElements()) { - urlSet.add(urls.nextElement()); - } - } - } - return Collections.enumeration(urlSet); - } - } - - public Axis2ServiceProvider(RuntimeComponent component, - AbstractContract contract, - WebServiceBinding wsBinding, - ServletHost servletHost, - MessageFactory messageFactory, - final FactoryExtensionPoint modelFactories) { - - this.component = component; - this.contract = contract; - this.wsBinding = wsBinding; - this.servletHost = servletHost; - this.messageFactory = messageFactory; - this.modelFactories = modelFactories; - this.assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); - - final boolean isRampartRequired = AxisPolicyHelper.isRampartRequired(wsBinding); - try { - // TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator(); - // Allow privileged access to read properties. Requires PropertyPermission read in - // security policy. - configContext = AccessController.doPrivileged(new PrivilegedExceptionAction<ConfigurationContext>() { - public ConfigurationContext run() throws AxisFault { - ClassLoader cl1 = modelFactories.getFactory(XMLInputFactory.class).getClass().getClassLoader(); - ClassLoader cl2 = - modelFactories.getFactory(DocumentBuilderFactory.class).getClass().getClassLoader(); - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - ClassLoader newTccl = tccl; - if (cl1 != tccl || cl2 != tccl) { - newTccl = new MultiParentClassLoader(null, new ClassLoader[] {cl1, cl2}); - } - if (newTccl != null && newTccl != tccl) { - Thread.currentThread().setContextClassLoader(newTccl); - } - try { - return new TuscanyAxisConfigurator(isRampartRequired).getConfigurationContext(); - } finally { - if (newTccl != null && newTccl != tccl) { - Thread.currentThread().setContextClassLoader(tccl); - } - } - } - }); - // deployRampartModule(); - // configureSecurity(); - } catch (PrivilegedActionException e) { - throw new ServiceRuntimeException(e.getException()); - } - - configContext.setContextRoot(servletHost.getContextPath()); - - // Enable MTOM if the policy intent is specified. - if (AxisPolicyHelper.isIntentRequired(wsBinding, AxisPolicyHelper.MTOM_INTENT)) { - configContext.getAxisConfiguration().getParameter(Configuration.ENABLE_MTOM).setLocked(false); - configContext.getAxisConfiguration().getParameter(Configuration.ENABLE_MTOM).setValue("true"); - } - - // Update port addresses with runtime information, and create a - // map from endpoint URIs to WSDL ports that eliminates duplicate - // ports for the same endpoint. - for (Object port : wsBinding.getService().getPorts().values()) { - String portAddress = getPortAddress((Port)port); - String endpointURI = computeEndpointURI(portAddress, servletHost); - setPortAddress((Port)port, endpointURI); - urlMap.put(endpointURI, (Port)port); - } - - /* - // find out which policies are active - if (wsBinding instanceof PolicySubject) { - List<PolicySet> policySets = ((PolicySubject)wsBinding).getApplicablePolicySets(); - for (PolicySet ps : policySets) { - for (Object p : ps.getPolicies()) { - if (BasicAuthenticationPolicy.class.isInstance(p)) { - basicAuthenticationPolicy = (BasicAuthenticationPolicy)p; - } else if (Axis2TokenAuthenticationPolicy.class.isInstance(p)) { - axis2TokenAuthenticationPolicy = (Axis2TokenAuthenticationPolicy)p; - } else if (Axis2HeaderPolicy.class.isInstance(p)) { - axis2HeaderPolicies.add((Axis2HeaderPolicy)p); - } else { - // etc. check for other types of policy being present - } - } - } - } - */ - } - - static String getPortAddress(Port port) { - Object ext = port.getExtensibilityElements().get(0); - if (ext instanceof SOAPAddress) { - return ((SOAPAddress)ext).getLocationURI(); - } - if (ext instanceof SOAP12Address) { - return ((SOAP12Address)ext).getLocationURI(); - } - return null; - } - - static void setPortAddress(Port port, String locationURI) { - Object ext = port.getExtensibilityElements().get(0); - if (ext instanceof SOAPAddress) { - ((SOAPAddress)ext).setLocationURI(locationURI); - } - if (ext instanceof SOAP12Address) { - ((SOAP12Address)ext).setLocationURI(locationURI); - } - } - - // TODO - EPR - what to do with URI - /* - private EndpointReference2 createEndpointReference() { - FactoryExtensionPoint factories = - component.getComponentContext().getExtensionPointRegistry().getExtensionPoint(FactoryExtensionPoint.class); - RuntimeAssemblyFactory factory = (RuntimeAssemblyFactory)factories.getFactory(AssemblyFactory.class); - return factory.createEndpointReference(); - } - */ - - private String computeEndpointURI(String uri, ServletHost servletHost) { - - if (uri == null) { - return null; - } - - // pull out the binding intents to see what sort of transport is required - PolicySet transportJmsPolicySet = AxisPolicyHelper.getPolicySet(wsBinding, TRANSPORT_JMS_QUALIFIED_INTENT); - if (transportJmsPolicySet != null) { - if (!uri.startsWith("jms:/")) { - uri = "jms:" + uri; - } - - // construct the rest of the URI based on the policy. All the details are put - // into the URI here rather than being place directly into the Axis configuration - // as the Axis JMS sender relies on parsing the target URI - Axis2ConfigParamPolicy axis2ConfigParamPolicy = null; - for (Object policy : transportJmsPolicySet.getPolicies()) { - if (policy instanceof Axis2ConfigParamPolicy) { - axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy; - Iterator paramIterator = - axis2ConfigParamPolicy.getParamElements().get(DEFAULT_QUEUE_CONNECTION_FACTORY) - .getChildElements(); - - if (paramIterator.hasNext()) { - StringBuffer uriParams = new StringBuffer("?"); - - while (paramIterator.hasNext()) { - OMElement parameter = (OMElement)paramIterator.next(); - uriParams.append(parameter.getAttributeValue(new QName("", "name"))); - uriParams.append("="); - uriParams.append(parameter.getText()); - - if (paramIterator.hasNext()) { - uriParams.append("&"); - } - } - - uri = uri + uriParams; - } - } - } - } else { - if (!uri.startsWith("jms:")) { - uri = servletHost.getURLMapping(uri).toString(); - } - } - - return uri; - } - - public void start() { - - try { - createPolicyHandlers(); - for (Map.Entry<String, Port> entry : urlMap.entrySet()) { - AxisService axisService = createAxisService(entry.getKey(), entry.getValue()); - configContext.getAxisConfiguration().addService(axisService); - } - - Axis2ServiceServlet servlet = null; - for (String endpointURL : urlMap.keySet()) { - if (endpointURL.startsWith("http://") || endpointURL.startsWith("https://") - || endpointURL.startsWith("/")) { - if (servlet == null) { - servlet = new Axis2ServiceServlet(); - servlet.init(configContext); - } - //[nash] configContext.setContextRoot(endpointURL); - servletHost.addServletMapping(endpointURL, servlet); - } else if (endpointURL.startsWith("jms")) { - logger.log(Level.INFO, "Axis2 JMS URL=" + endpointURL); - - jmsListener = new JMSListener(); - jmsSender = new JMSSender(); - ListenerManager listenerManager = configContext.getListenerManager(); - TransportInDescription trsIn = - configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS); - - // get JMS transport parameters from the computed URL - Map<String, String> jmsProps = JMSUtils.getProperties(endpointURL); - - // collect the parameters used to configure the JMS transport - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null); - - for (String key : jmsProps.keySet()) { - OMElement param = fac.createOMElement("parameter", null); - param.addAttribute("name", key, null); - param.addChild(fac.createOMText(param, jmsProps.get(key))); - parms.addChild(param); - } - - Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms); - trsIn.addParameter(queueConnectionFactory); - - trsIn.setReceiver(jmsListener); - - configContext.getAxisConfiguration().addTransportIn(trsIn); - TransportOutDescription trsOut = - configContext.getAxisConfiguration().getTransportOut(Constants.TRANSPORT_JMS); - //configContext.getAxisConfiguration().addTransportOut( trsOut ); - trsOut.setSender(jmsSender); - - if (listenerManager == null) { - listenerManager = new ListenerManager(); - listenerManager.init(configContext); - } - listenerManager.addListener(trsIn, true); - jmsSender.init(configContext, trsOut); - jmsListener.init(configContext, trsIn); - jmsListener.start(); - } - } - } catch (AxisFault e) { - throw new RuntimeException(e); - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - public void stop() { - if (jmsListener != null) { - jmsListener.stop(); - jmsListener.destroy(); - } else { - for (String endpointURL : urlMap.keySet()) { - servletHost.removeServletMapping(endpointURL); - } - } - - if (jmsSender != null) - jmsSender.stop(); - - try { - for (String endpointURL : urlMap.keySet()) { - // get the path to the service - URI uriPath = new URI(endpointURL); - String stringURIPath = uriPath.getPath(); - - /* [nash] Need a leading slash for WSDL imports to work with ?wsdl - // remove any "/" from the start of the path - if (stringURIPath.startsWith("/")) { - stringURIPath = stringURIPath.substring(1, stringURIPath.length()); - } - */ - - configContext.getAxisConfiguration().removeService(stringURIPath); - } - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } catch (AxisFault e) { - throw new RuntimeException(e); - } - } - - private AxisService createAxisService(String endpointURL, Port port) throws AxisFault { - AxisService axisService; - if (wsBinding.getWSDLDocument() != null) { - axisService = createWSDLAxisService(endpointURL, port); - } else { - axisService = createJavaAxisService(endpointURL); - } - initAxisOperations(axisService); - return axisService; - } - - /** - * Create an AxisService from the interface class from the SCA service interface - */ - protected AxisService createJavaAxisService(String endpointURL) throws AxisFault { - AxisService axisService = new AxisService(); - String path = URI.create(endpointURL).getPath(); - axisService.setName(path); - axisService.setServiceDescription("Tuscany configured AxisService for service: " + endpointURL); - axisService.setClientSide(false); - Parameter classParam = - new Parameter(Constants.SERVICE_CLASS, ((JavaInterface)contract.getInterfaceContract().getInterface()) - .getJavaClass().getName()); - axisService.addParameter(classParam); - try { - Utils.fillAxisService(axisService, configContext.getAxisConfiguration(), null, null); - } catch (Exception e) { - throw new RuntimeException(e); - } - - return axisService; - } - - /** - * Workaround for https://issues.apache.org/jira/browse/AXIS2-3205 - * @param definition - * @param serviceName - * @return - */ - private static Definition getDefinition(Definition definition, QName serviceName) { - - if (serviceName == null) { - return definition; - } - - if (definition == null) { - return null; - } - Object service = definition.getServices().get(serviceName); - if (service != null) { - return definition; - } - for (Object i : definition.getImports().values()) { - List<Import> imports = (List<Import>)i; - for (Import imp : imports) { - Definition d = getDefinition(imp.getDefinition(), serviceName); - if (d != null) { - return d; - } - } - } - return null; - } - - /** - * Create an AxisService from the WSDL doc used by ws binding - */ - protected AxisService createWSDLAxisService(String endpointURL, Port port) throws AxisFault { - - Definition definition = wsBinding.getWSDLDocument(); - QName serviceQName = wsBinding.getService().getQName(); - Definition def = getDefinition(definition, serviceQName); - - final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); - builder.setServerSide(true); - // [rfeng] Add a custom resolver to work around WSCOMMONS-228 - builder.setCustomResolver(new URIResolverImpl(def)); - builder.setBaseUri(def.getDocumentBaseURI()); - // [rfeng] - // AxisService axisService = builder.populateService(); - // Allow privileged access to read properties. Requires PropertiesPermission read in - // security policy. - AxisService axisService; - try { - axisService = AccessController.doPrivileged(new PrivilegedExceptionAction<AxisService>() { - public AxisService run() throws AxisFault { - return builder.populateService(); - } - }); - } catch (PrivilegedActionException e) { - throw (AxisFault)e.getException(); - } - - String name = URI.create(endpointURL).getPath(); - //[nash] HTTP endpoints need a leading slash for WSDL imports to work with ?wsdl - if (endpointURL.startsWith("jms")) { - name = name.startsWith("/") ? name.substring(1) : name; - } - axisService.setName(name); - axisService.setEndpointURL(endpointURL); - axisService.setDocumentation("Tuscany configured AxisService for service: " + endpointURL); - for (Iterator i = axisService.getEndpoints().values().iterator(); i.hasNext();) { - AxisEndpoint ae = (AxisEndpoint)i.next(); - if (endpointURL.startsWith("jms")) { - Parameter qcf = new Parameter(JMSConstants.CONFAC_PARAM, null); - qcf.setValue(DEFAULT_QUEUE_CONNECTION_FACTORY); - axisService.addParameter(qcf); - break; - } - } - - // Add schema information to the AxisService (needed for "?xsd=" support) - addSchemas(wsBinding.getWSDLDefinition(), axisService); - - // Use the existing WSDL - Parameter wsdlParam = new Parameter("wsdl4jDefinition", null); - wsdlParam.setValue(definition); - axisService.addParameter(wsdlParam); - Parameter userWSDL = new Parameter("useOriginalwsdl", "true"); - axisService.addParameter(userWSDL); - - // Modify schema imports and includes to add "servicename?xsd=" prefix. - // Axis2 does this for schema extensibility elements, but Tuscany has - // overriden the WSDl4J deserializer to create UnknownExtensibilityElement - // elements in place of these. - modifySchemaImportsAndIncludes(definition, name); - - // Axis2 1.3 has a bug with returning incorrect values for the port - // addresses. To work around this, compute the values here. - Parameter modifyAddr = new Parameter("modifyUserWSDLPortAddress", "false"); - axisService.addParameter(modifyAddr); - - return axisService; - } - - private void addSchemas(WSDLDefinition wsdlDef, AxisService axisService) { - for (XSDefinition xsDef : wsdlDef.getXmlSchemas()) { - if (xsDef.getSchema() != null) { - axisService.addSchema(xsDef.getSchema()); - updateSchemaRefs(xsDef.getSchema(), axisService.getName()); - } - } - for (WSDLDefinition impDef : wsdlDef.getImportedDefinitions()) { - addSchemas(impDef, axisService); - } - } - - private void updateSchemaRefs(XmlSchema parentSchema, String name) { - for (Iterator iter = parentSchema.getIncludes().getIterator(); iter.hasNext();) { - Object obj = iter.next(); - if (obj instanceof XmlSchemaExternal) { - XmlSchemaExternal extSchema = (XmlSchemaExternal)obj; - String location = extSchema.getSchemaLocation(); - if (location.length() > 0 && location.indexOf(":/") < 0 && location.indexOf("?xsd=") < 0) { - extSchema.setSchemaLocation(name + "?xsd=" + location); - } - if (extSchema.getSchema() != null) { - updateSchemaRefs(extSchema.getSchema(), name); - } - } - } - } - - private void modifySchemaImportsAndIncludes(Definition definition, String name) { - // adjust the schema locations in types section - Types types = definition.getTypes(); - if (types != null) { - for (Iterator iter = types.getExtensibilityElements().iterator(); iter.hasNext();) { - Object ext = iter.next(); - if (ext instanceof UnknownExtensibilityElement && XSD_QNAME_LIST - .contains(((UnknownExtensibilityElement)ext).getElementType())) { - changeLocations(((UnknownExtensibilityElement)ext).getElement(), name); - } - } - } - for (Iterator iter = definition.getImports().values().iterator(); iter.hasNext();) { - Vector values = (Vector)iter.next(); - for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) { - Import wsdlImport = (Import)valuesIter.next(); - modifySchemaImportsAndIncludes(wsdlImport.getDefinition(), name); - } - } - } - - private void changeLocations(Element element, String name) { - NodeList nodeList = element.getChildNodes(); - for (int i = 0; i < nodeList.getLength(); i++) { - String tagName = nodeList.item(i).getLocalName(); - if (IMPORT_TAG.equals(tagName) || INCLUDE_TAG.equals(tagName)) { - processImport(nodeList.item(i), name); - } - } - } - - private void processImport(Node importNode, String name) { - NamedNodeMap nodeMap = importNode.getAttributes(); - for (int i = 0; i < nodeMap.getLength(); i++) { - Node attribute = nodeMap.item(i); - if (attribute.getNodeName().equals("schemaLocation")) { - String location = attribute.getNodeValue(); - if (location.indexOf(":/") < 0 & location.indexOf("?xsd=") < 0) { - attribute.setNodeValue(name + "?xsd=" + location); - } - } - } - } - - protected void initAxisOperations(AxisService axisService) { - for (Iterator<?> i = axisService.getOperations(); i.hasNext();) { - AxisOperation axisOp = (AxisOperation)i.next(); - Operation op = getOperation(axisOp); - if (op != null) { - - if (op.isNonBlocking()) { - axisOp.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_ONLY); - } else { - axisOp.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OUT); - } - - MessageReceiver msgrec = null; - if (op.isNonBlocking()) { - msgrec = new Axis2ServiceInMessageReceiver(this, op); - } else { - msgrec = new Axis2ServiceInOutSyncMessageReceiver(this, op); - } - axisOp.setMessageReceiver(msgrec); - } - } - } - - protected Operation getOperation(AxisOperation axisOp) { - String operationName = axisOp.getName().getLocalPart(); - Interface iface = wsBinding.getBindingInterfaceContract().getInterface(); - for (Operation op : iface.getOperations()) { - if (op.getName().equalsIgnoreCase(operationName)) { - return op; - } - } - return null; - } - - // methods for Axis2 message receivers - - public Object invokeTarget(Operation op, Object[] args, MessageContext inMC) throws InvocationTargetException { - String callbackAddress = null; - String callbackID = null; - Object conversationID = null; - - // create a message object and set the args as its body - Message msg = messageFactory.createMessage(); - msg.setBody(args); - msg.setOperation(op); - - //FIXME: can we use the Axis2 addressing support for this? - SOAPHeader header = inMC.getEnvelope().getHeader(); - if (header != null) { - OMElement from = header.getFirstChildWithName(QNAME_WSA_FROM); - if (from != null) { - OMElement callbackAddrElement = from.getFirstChildWithName(QNAME_WSA_ADDRESS); - if (callbackAddrElement != null) { - if (contract.getInterfaceContract().getCallbackInterface() != null) { - callbackAddress = callbackAddrElement.getText(); - } - } - -/* TODO - EPR - not required by OASIS - OMElement params = from.getFirstChildWithName(QNAME_WSA_REFERENCE_PARAMETERS); - if (params != null) { - OMElement convIDElement = - params.getFirstChildWithName(Axis2BindingInvoker.CONVERSATION_ID_REFPARM_QN); - if (convIDElement != null) { - if (isConversational()) { - conversationID = convIDElement.getText(); - } - } - OMElement callbackIDElement = - params.getFirstChildWithName(Axis2BindingInvoker.CALLBACK_ID_REFPARM_QN); - if (callbackIDElement != null) { - callbackID = callbackIDElement.getText(); - } - } -*/ - } - - // get policy specified headers - for (Axis2HeaderPolicy policy : axis2HeaderPolicies) { - //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName()); - } - - if (axis2TokenAuthenticationPolicy != null) { - Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString(); - Axis2BindingHeaderConfigurator.getHeader(inMC, - msg, - axis2TokenAuthenticationPolicy.getTokenName(), - tokenHeader); - } - } - - //fill message with QoS context info - fillQoSContext(msg, inMC); - - // Create a from EPR to hold the details of the callback endpoint - EndpointReference from = null; - if (callbackAddress != null ) { - from = assemblyFactory.createEndpointReference(); - Endpoint fromEndpoint = assemblyFactory.createEndpoint(); - from.setTargetEndpoint(fromEndpoint); - msg.setFrom(from); - Endpoint callbackEndpoint = assemblyFactory.createEndpoint(); - callbackEndpoint.setURI(callbackAddress); - callbackEndpoint.setUnresolved(true); - from.setCallbackEndpoint(callbackEndpoint); - } - - /* TODO - EPR - not required in OASIS - // set the reference parameters into the "From" EPR - if (callbackAddress != null) { - parameters.setCallbackReference(createEndpointReference(callbackAddress)); - } - if (callbackID != null) { - parameters.setCallbackID(callbackID); - } - if (conversationID != null) { - parameters.setConversationID(conversationID); - } - - if (basicAuthenticationPolicy != null) { - Axis2BindingBasicAuthenticationConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy); - } - */ - - // find the runtime wire and invoke it with the message - RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding()); - Object response = wire.invoke(op, msg); - - return response; - } - - public boolean isConversational() { - return wsBinding.getBindingInterfaceContract().getInterface().isConversational(); - } - - /** - * Return the binding for this provider as a primitive binding type - * For use when looking up wires registered against the binding. - * - * @return the binding - */ - protected Binding getBinding() { - return wsBinding; - } - - private void createPolicyHandlers() throws IllegalAccessException, InstantiationException, ClassNotFoundException { - if (wsBinding instanceof PolicySubject) { - - // code to create policy handlers using a policy SPI based - // on policy providers - /* - List<PolicyProvider> policyProviders = ((RuntimeComponentService)contract).getPolicyProviders(wsBinding); - - for (PolicyProvider policyProvider : policyProviders){ - policyHandler = policyProvider.createHandler(); - if (policyHandler != null) { - policyHandlerList.add(policyHandler); - } - } - */ - } - } - - private void fillQoSContext(Message message, MessageContext axis2MsgCtx) { - if (axis2MsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS) != null && axis2MsgCtx - .getProperty(WSHandlerConstants.RECV_RESULTS) instanceof Vector) { - Vector recvResults = (Vector)axis2MsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS); - for (int count1 = 0; count1 < recvResults.size(); ++count1) { - if (recvResults.elementAt(count1) instanceof WSHandlerResult) { - WSHandlerResult wshr = (WSHandlerResult)recvResults.elementAt(count1); - Vector results = wshr.getResults(); - for (int count2 = 0; count2 < results.size(); ++count2) { - if (results.elementAt(count2) instanceof WSSecurityEngineResult) { - WSSecurityEngineResult securityResult = - (WSSecurityEngineResult)wshr.getResults().elementAt(count2); - if (securityResult.get("principal") != null) { - message.getHeaders().add(securityResult.get("principal")); - } - } - } - } - } - - } - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java deleted file mode 100644 index 746b850ff0..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.SocketException; -import java.net.URI; -import java.net.URL; -import java.util.Collections; -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.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.addressing.EndpointReference; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.transport.http.AxisServlet; -import org.apache.axis2.transport.http.ListingAgent; -import org.apache.axis2.transport.http.server.HttpUtils; - -/** - * This overrides the Servlet init of the AxisServlet so Tuscany can use - * a single Axis2 ConfigurationContext instance shared between AxisServlet - * instances for each SCA service with a ws binding. - * TODO: need to review if thats really what we want to be doing - * - * @version $Rev$ $Date$ - */ -public class Axis2ServiceServlet extends AxisServlet { - - protected TuscanyListingAgent agent; - - private static final long serialVersionUID = 1L; - private static final ServletConfig DUMMY_CONFIG = createDummyServletConfig(); - -//JIRA TUSCANY-1561 Port to Axis2 1.3 - private ConfigurationContext tmpconfigContext; - - public void init(ConfigurationContext configContext) { - this.tmpconfigContext = configContext; - try { - super.init(DUMMY_CONFIG); - } catch (ServletException e) { - throw new RuntimeException(e); - } - agent = new TuscanyListingAgent(configContext); - } - - /** - * Override Axis2 Servlet method to avoid loop when init - * is called after servletConfig already initialized by - * this classes init(ConfigurationContext) method. - */ - @Override - public void init() throws ServletException { - } - - @Override - public void init(ServletConfig config) throws ServletException { - ServletContext servletContext = config.getServletContext(); - servletContext.setAttribute(CONFIGURATION_CONTEXT, tmpconfigContext); - super.init(config); - } - - /** - * We've setup the Servlet by passing in a ConfigurationContext on our init method - * override this method to just return that - */ - @Override - protected ConfigurationContext initConfigContext(ServletConfig config) throws ServletException { - return this.tmpconfigContext; - } - - @Override - public ServletConfig getServletConfig() { - return DUMMY_CONFIG; - } - - @Override - public String getServletName() { - return "TuscanyAxis2Servlet"; - } - - /** - * The AxisServlet gets NPE during init without a ServletConfig so this is a mocked up one to prevent that. - */ - private static ServletConfig createDummyServletConfig() { - ServletConfig sc = new ServletConfig() { - - public String getServletName() { - return "TuscanyAxis2DummyServlet"; - } - - public ServletContext getServletContext() { - return new ServletContext() { - - public ServletContext getContext(String uripath) { - return null; - } - - @SuppressWarnings("unused") // it's on the Servlet 2.5 API so we need it - public String getContextPath() { - return null; - } - - public int getMajorVersion() { - return 0; - } - - public int getMinorVersion() { - return 0; - } - - public String getMimeType(String file) { - return null; - } - - public Set<?> getResourcePaths(String path) { - return Collections.emptySet(); - } - - public URL getResource(String path) throws MalformedURLException { - if("/".equals(path)) { - // HACK: To avoid NPE - return new URL("/axis2"); - } - return null; - } - - public InputStream getResourceAsStream(String path) { - return null; - } - - public RequestDispatcher getRequestDispatcher(String path) { - 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; - } - }; - } - - public String getInitParameter(String arg0) { - return null; - } - - public Enumeration getInitParameterNames() { - return new Vector().elements(); - } - }; - return sc; - } - - @Override - public void destroy() { - try { - super.destroy(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Override the AxisServlet doGet to use the TuscanyListingAgent for ?wsdl - */ - @Override - protected void doGet(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - - initContextRoot(request); - - String query = request.getQueryString(); - if ((query != null) && (query.indexOf("wsdl2") >= 0 || - query.indexOf("wsdl") >= 0 || query.indexOf("xsd") >= 0 || - query.indexOf("policy") >= 0)) { - agent.processListService(request, response); - } else { - super.doGet(request, response); - } - } - - /** - - /** - * Override the AxisServlet method so as to not add "/services" into the URL - * and to work with Tuscany service names. can go once moved to Axis2 1.3 - */ - @Override - public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault { - //RUNNING_PORT - String port = (String) configContext.getProperty(ListingAgent.RUNNING_PORT); - if (port == null) { - port = "8080"; - } - if (ip == null) { - try { - ip = HttpUtils.getIpAddress(); - if (ip == null) { - ip = "localhost"; - } - } catch (SocketException e) { -//TUSCANY-1561 Port to Axis2 1.3 -// throw new AxisFault.(e); - throw AxisFault.makeFault(e); - } - } - - URI epURI = URI.create("http://" + ip + ":" + port + "/" + serviceName).normalize(); - - return new EndpointReference[]{new EndpointReference(epURI.toString())}; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java deleted file mode 100644 index da02d1033e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; - -/** - * @version $Rev$ $Date$ - */ -public class AxisPolicyHelper { - - public static final String XMLNS_SCA_11 = "http://docs.oasis-open.org/ns/opencsa/sca/200903"; - public static final QName AUTHENTICATION_INTENT = new QName(XMLNS_SCA_11, "authentication"); - public static final QName CONFIDENTIALITY_INTENT = new QName(XMLNS_SCA_11, "confidentiality"); - public static final QName INTEGRITY_INTENT = new QName(XMLNS_SCA_11, "integrity"); - public static final QName MTOM_INTENT = new QName(XMLNS_SCA_11, "MTOM"); - public static final QName SOAP12_INTENT = new QName(XMLNS_SCA_11, "SOAP12"); - - public static PolicySet getPolicySet(Binding wsBinding, QName intentName) { - PolicySet returnPolicySet = null; - - if (wsBinding instanceof PolicySubject) { - PolicySubject policiedBinding = (PolicySubject)wsBinding; - for (PolicySet policySet : policiedBinding.getPolicySets()) { - for (Intent intent : policySet.getProvidedIntents()) { - if (intent.getName().equals(intentName)) { - returnPolicySet = policySet; - break; - } - } - } - } - - return returnPolicySet; - } - - public static boolean isIntentRequired(Binding wsBinding, QName intent) { - if (wsBinding instanceof PolicySubject) { - List<Intent> intents = ((PolicySubject)wsBinding).getRequiredIntents(); - for (Intent i : intents) { - if (intent.equals(i.getName())) { - return true; - } - } - } - return getPolicySet(wsBinding, intent) != null; - } - - public static boolean isRampartRequired(Binding wsBinding) { - return isIntentRequired(wsBinding, AUTHENTICATION_INTENT) || isIntentRequired(wsBinding, INTEGRITY_INTENT) - || isIntentRequired(wsBinding, CONFIDENTIALITY_INTENT); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java deleted file mode 100644 index 853bfbc0cb..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.HashMap; -import java.util.Iterator; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.Constants; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.ConfigurationContextFactory; -import org.apache.axis2.deployment.DeploymentConstants; -import org.apache.axis2.deployment.DeploymentErrorMsgs; -import org.apache.axis2.deployment.DeploymentException; -import org.apache.axis2.deployment.ModuleBuilder; -import org.apache.axis2.deployment.URLBasedAxisConfigurator; -import org.apache.axis2.description.AxisModule; -import org.apache.axis2.description.Parameter; -import org.apache.axis2.engine.AxisConfiguration; -import org.apache.axis2.engine.AxisConfigurator; -import org.apache.axis2.i18n.Messages; - -/** - * Helps configure Axis2 from a resource in binding.ws.axis2 instead of Axis2.xml - * <p/> TODO: Review: should there be a single global Axis ConfigurationContext - * - * @version $Rev$ $Date$ - */ -public class TuscanyAxisConfigurator extends URLBasedAxisConfigurator implements AxisConfigurator { - - /* these two fields are part of a temporary fix to solve problems that Maven has with including - * rampart-1.4.mar into the classpath and also at the time of Release 1.0 rampart-1.4.mar seems - * to pull in a SNAPSHOT version of rampart-project pom. Hence rampart.mar has been excluded - * as a Maven dependency and has been packed with this module - */ - /************start of fix *********************************************************************/ - private URL axis2_xml = - getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml"); - private URL axis2_repository = null; - private URL rampart_mar_url = - getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.4.mar"); - /************** end of fix *************************************************************/ - - private boolean isRampartRequired; - - public TuscanyAxisConfigurator(boolean isRampartRequired) throws AxisFault { - //super(TuscanyAxisConfigurator.class.getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml"), - // TuscanyAxisConfigurator.class.getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart.mar")); - super(getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml"), - null); - this.isRampartRequired = isRampartRequired; - } - - private static URL getResource(final String name) { - return AccessController.doPrivileged(new PrivilegedAction<URL>() { - public URL run() { - return TuscanyAxisConfigurator.class.getResource(name); - } - }); - } - - public ConfigurationContext getConfigurationContext() throws AxisFault { - if (configContext == null) { - configContext = ConfigurationContextFactory.createConfigurationContext(this); - } - return configContext; - } - - private InputStream getResourceAsStream(final String resource) { - return AccessController.doPrivileged(new PrivilegedAction<InputStream>() { - public InputStream run() { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - return cl.getResourceAsStream(resource); - } - }); - } - - /* these three methods are part of a temporary fix to solve problems that Maven has with including - * rampart-1.3.mar into the classpath and also at the time of Release 1.0 rampart-1.3.mar seems - * to pull in a SNAPSHOT version of rampart-project pom. Hence rampart.mar has been excluded - * as a Maven dependency and has been packed with this module - */ - /************start of fix *********************************************************************/ - @Override - public AxisConfiguration getAxisConfiguration() throws AxisFault { - InputStream axis2xmlStream; - try { - if (axis2_xml == null) { - axis2xmlStream = - getResourceAsStream(DeploymentConstants.AXIS2_CONFIGURATION_RESOURCE); - } else { - axis2xmlStream = axis2_xml.openStream(); - } - axisConfig = populateAxisConfiguration(axis2xmlStream); - if (isRampartRequired) { - axisConfig.addGlobalModuleRef("rampart"); - } - if (axis2_repository == null) { - Parameter axis2repoPara = axisConfig.getParameter(DeploymentConstants.AXIS2_REPO); - if (axis2repoPara != null) { - String repoValue = (String) axis2repoPara.getValue(); - if (repoValue != null && !"".equals(repoValue.trim())) { - if (repoValue.startsWith("file:/")) { - // we treat this case specially , by assuming file is - // located in the local machine - loadRepository(repoValue); - } else { - loadRepositoryFromURL(new URL(repoValue)); - } - } - } else { - //log.info("No repository found , module will be loaded from classpath"); - try { - loadFromClassPath(); - } catch ( Exception e ) { - if (isRampartRequired) { - loadRampartModule(); - } - } - } - - } else { - loadRepositoryFromURL(axis2_repository); - } - - } catch (IOException e) { - throw new AxisFault(e.getMessage()); - } - axisConfig.setConfigurator(this); - return axisConfig; - } - - public void loadRampartModule() throws DeploymentException { - try { - ClassLoader deploymentClassLoader = - org.apache.axis2.deployment.util.Utils.createClassLoader( - new URL[]{rampart_mar_url}, - axisConfig.getModuleClassLoader(), - true, - (File) axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR)); - final AxisModule module = new AxisModule(); - module.setModuleClassLoader(deploymentClassLoader); - module.setParent(axisConfig); - //String moduleFile = fileUrl.substring(0, fileUrl.indexOf(".mar")); - if (module.getName() == null) { - module.setName("rampart"); - module.setVersion("1.4"); - } - populateModule(module, rampart_mar_url); - module.setFileName(rampart_mar_url); - // Allow privileged access to read properties. Requires PropertiesPermission read in - // security policy. - try { - AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { - public Object run() throws IOException { - addNewModule(module, axisConfig); - return null; - } - }); - } catch (PrivilegedActionException e) { - throw (AxisFault)e.getException(); - } - - calculateDefaultModuleVersion(axisConfig.getModules(), axisConfig); - axisConfig.validateSystemPredefinedPhases(); - } catch (IOException e) { - throw new DeploymentException(e); - } - } - /** - * Get the name of the module , where archive name is combination of module name + its version - * The format of the name is as follows: - * moduleName-00.0000 - * Example: "addressing-01.0001.mar" would return "addressing" - * - * @param moduleName the name of the module archive - * @return the module name parsed out of the file name - */ - public static String getModuleName(String moduleName) { - if (moduleName.endsWith("-SNAPSHOT")) { - return moduleName.substring(0, moduleName.indexOf("-SNAPSHOT")); - } - char delimiter = '-'; - int version_index = moduleName.lastIndexOf(delimiter); - if (version_index > 0) { - String versionString = getModuleVersion(moduleName); - if (versionString == null) { - return moduleName; - } else { - return moduleName.substring(0, version_index); - } - } else { - return moduleName; - } - } - - public static String getModuleVersion(String moduleName) { - if (moduleName.endsWith("-SNAPSHOT")) { - return "SNAPSHOT"; - } - char version_seperator = '-'; - int version_index = moduleName.lastIndexOf(version_seperator); - if (version_index > 0) { - String versionString = moduleName.substring(version_index + 1, moduleName.length()); - try { - Float.parseFloat(versionString); - return versionString; - } catch (NumberFormatException e) { - return null; - } - } else { - return null; - } - } - - public static String getModuleName(String moduleName, String moduleVersion) { - if (moduleVersion != null && moduleVersion.length() != 0) { - moduleName = moduleName + "-" + moduleVersion; - } - return moduleName; - } - - public static boolean isLatest(String moduleVersion, String currentDefaultVersion) { - if (AxisModule.VERSION_SNAPSHOT.equals(moduleVersion)) { - return true; - } else { - float m_version = Float.parseFloat(moduleVersion); - float m_c_vresion = Float.parseFloat(currentDefaultVersion); - return m_version > m_c_vresion; - } - } - - public static void calculateDefaultModuleVersion(HashMap modules, - AxisConfiguration axisConfig) { - Iterator allModules = modules.values().iterator(); - HashMap defaultModules = new HashMap(); - while (allModules.hasNext()) { - AxisModule axisModule = (AxisModule) allModules.next(); - String moduleName = axisModule.getName(); - String moduleNameString; - String moduleVersionString; - if (AxisModule.VERSION_SNAPSHOT.equals(axisModule.getVersion())) { - moduleNameString = axisModule.getName(); - moduleVersionString = axisModule.getVersion(); - } else { - if (axisModule.getVersion() == null) { - moduleNameString = getModuleName(moduleName); - moduleVersionString = getModuleVersion(moduleName); - if (moduleVersionString != null) { - try { - Float.valueOf(moduleVersionString); - axisModule.setVersion(moduleVersionString); - axisModule.setName(moduleName); - } catch (NumberFormatException e) { - moduleVersionString = null; - } - } - } else { - moduleNameString = axisModule.getName(); - moduleVersionString = axisModule.getVersion(); - } - } - String currentDefaultVerison = (String) defaultModules.get(moduleNameString); - if (currentDefaultVerison != null) { - // if the module version is null then , that will be ignore in this case - if (!AxisModule.VERSION_SNAPSHOT.equals(currentDefaultVerison)) { - if (moduleVersionString != null && - isLatest(moduleVersionString, currentDefaultVerison)) { - defaultModules.put(moduleNameString, moduleVersionString); - } - } - } else { - defaultModules.put(moduleNameString, moduleVersionString); - } - - } - Iterator def_mod_itr = defaultModules.keySet().iterator(); - while (def_mod_itr.hasNext()) { - String moduleName = (String) def_mod_itr.next(); - axisConfig.addDefaultModuleVersion(moduleName, (String) defaultModules.get(moduleName)); - } - } - - - private void populateModule(AxisModule module, URL moduleUrl) throws DeploymentException { - try { - ClassLoader classLoader = module.getModuleClassLoader(); - InputStream moduleStream = classLoader.getResourceAsStream("META-INF/module.xml"); - if (moduleStream == null) { - moduleStream = classLoader.getResourceAsStream("meta-inf/module.xml"); - } - if (moduleStream == null) { - throw new DeploymentException( - Messages.getMessage( - DeploymentErrorMsgs.MODULE_XML_MISSING, moduleUrl.toString())); - } - ModuleBuilder moduleBuilder = new ModuleBuilder(moduleStream, module, axisConfig); - moduleBuilder.populateModule(); - } catch (IOException e) { - throw new DeploymentException(e); - } - } - - /************** end of fix *************************************************************/ - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyDispatcher.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyDispatcher.java deleted file mode 100644 index 3527061a66..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyDispatcher.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.net.URI; -import java.util.HashMap; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.addressing.EndpointReference; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.MessageContext; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.HandlerDescription; -import org.apache.axis2.engine.AxisConfiguration; -import org.apache.axis2.engine.RequestURIBasedDispatcher; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * A Tuscany specific Axis2 Dispatcher that enables using services - * exposed at the SCA defined service URI instead of /services/<serviceName> - * - * @version $Rev$ $Date$ - */ -public class TuscanyDispatcher extends RequestURIBasedDispatcher { - - public static final String NAME = "TuscanyDispatcher"; - private static final Log log = LogFactory.getLog(RequestURIBasedDispatcher.class); - private static final boolean isDebugEnabled = log.isDebugEnabled(); - - /* - * (non-Javadoc) - * - * @see org.apache.axis2.engine.AbstractDispatcher#findService(org.apache.axis2.context.MessageContext) - */ - @Override - public AxisService findService(MessageContext messageContext) throws AxisFault { - EndpointReference toEPR = messageContext.getTo(); - - if (toEPR != null) { - if(isDebugEnabled){ - log.debug("Checking for Service using target endpoint address : " + toEPR.getAddress()); - } - - String path = URI.create(toEPR.getAddress()).getPath(); - - ConfigurationContext configurationContext = messageContext.getConfigurationContext(); - AxisConfiguration registry = configurationContext.getAxisConfiguration(); - - String serviceName = findAxisServiceName(registry, path); - return registry.getService(serviceName); - - } else { - if(isDebugEnabled){ - log.debug("Attempted to check for Service using null target endpoint URI"); - } - return null; - } - } - - @Override - public void initDispatcher() { - init(new HandlerDescription(NAME)); - } - - protected String findAxisServiceName(AxisConfiguration registry, String path) { - HashMap services = registry.getServices(); - if (services == null) { - return null; - } - String[] parts = path.split("/"); - String serviceName = ""; - for (int i=parts.length-1; i>=0; i--) { - serviceName = parts[i] + serviceName; - if (services.containsKey(serviceName)) { - return serviceName; - } - serviceName = "/" + serviceName; - if (services.containsKey(serviceName)) { - return serviceName; - } - } - - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java deleted file mode 100644 index 3f8599b118..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.net.URI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; - -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.Parameter; -import org.apache.axis2.transport.http.ListingAgent; -import org.apache.axis2.transport.http.server.HttpUtils; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaExternal; - -/** - * A Tuscany specific Axis2 ListingAgent as the Axis2 one does not work - * with the Tuscany service names which include slash ('/') characters. - * Unfortunately it ends up having to copy a fair amount of Axis2 code to do this. - * - * @version $Rev$ $Date$ - */ -public class TuscanyListingAgent extends ListingAgent { - - private static final String LIST_SINGLE_SERVICE_JSP_NAME = - "listSingleService.jsp"; - - public TuscanyListingAgent(ConfigurationContext aConfigContext) { - super(aConfigContext); - } - - /** - * This method overrides the Axis2 listing agent's computation of the - * service name. - */ - @Override - public String extractServiceName(String urlString) { - String serviceName = findAxisServiceName(urlString); - setContextRoot(urlString, serviceName); - return serviceName; - } - - /** - * Override ?xsd processing so that WSDL documents with XSD imports - * and includes work correctly. When we move to Axis2 1.4, we may - * be able to use SchemaSupplier to do this in a cleaner way. Also - * ensure that the correct IP address and port are returned by ?wsdl. - */ - @Override - public void processListService(HttpServletRequest req, - HttpServletResponse res) - throws IOException, ServletException { - - String url = req.getRequestURL().toString(); - String query = req.getQueryString(); - - // for ?wsdl requests, need to update the WSDL with correct IPaddr and port - int wsdl = query.indexOf("wsdl"); - if (wsdl >= 0) { - String serviceName = extractServiceName(url); - HashMap services = configContext.getAxisConfiguration().getServices(); - if ((services != null) && !services.isEmpty()) { - AxisService axisService = (AxisService)services.get(serviceName); - Parameter wsld4jdefinition = axisService.getParameter("wsdl4jDefinition"); - Definition definition = (Definition)wsld4jdefinition.getValue(); - for (Object s : definition.getServices().values()) { - for (Object p : ((Service)s).getPorts().values()) { - String endpointURL = Axis2ServiceProvider.getPortAddress((Port)p); - String modifiedURL = setIPAddress(endpointURL, url); - Axis2ServiceProvider.setPortAddress((Port)p, modifiedURL); - } - } - } - } - - // handle ?xsd requests here - int xsd = query.indexOf("xsd"); - if (xsd >= 0) { - String serviceName = extractServiceName(url); - HashMap services = configContext.getAxisConfiguration().getServices(); - if ((services != null) && !services.isEmpty()) { - Object serviceObj = services.get(serviceName); - if (serviceObj != null) { - String xsds = req.getParameter("xsd"); - if (xsds != null && !"".equals(xsds)) { - // a schema name (perhaps with path) is present - AxisService axisService = (AxisService)serviceObj; - ArrayList schemas = axisService.getSchema(); - for (Object rootSchema : axisService.getSchema()) { - XmlSchema schema = getSchema(((XmlSchema)rootSchema), xsds); - if (schema != null) { - // found the schema - res.setContentType("text/xml"); - OutputStream out = res.getOutputStream(); - schema.write(new OutputStreamWriter(out, "UTF8")); - out.flush(); - out.close(); - return; - } - } - } - } - } - } - - // in all other cases, delegate to the Axis2 code - super.processListService(req, res); - } - - private XmlSchema getSchema(XmlSchema parentSchema, String name) { - for (Iterator iter = parentSchema.getIncludes().getIterator(); iter.hasNext();) { - Object obj = iter.next(); - if (obj instanceof XmlSchemaExternal) { - XmlSchemaExternal extSchema = (XmlSchemaExternal)obj; - if (extSchema.getSchemaLocation().endsWith(name)) { - return extSchema.getSchema(); - } else { - XmlSchema schema = getSchema(extSchema.getSchema(), name); - if (schema != null) { - return schema; - } - } - } - } - return null; - } - - private String findAxisServiceName(String path) { - HashMap services = configContext.getAxisConfiguration().getServices(); - if (services == null) { - return null; - } - String[] parts = path.split("/"); - String serviceName = ""; - for (int i=parts.length-1; i>=0; i--) { - serviceName = parts[i] + serviceName; - if (services.containsKey(serviceName)) { - return serviceName; - } - serviceName = "/" + serviceName; - if (services.containsKey(serviceName)) { - return serviceName; - } - } - - return null; - } - - /** - * Hack for Tuscany to get ?wsdl working with Tuscany service names - * Can go once moved up to Axis2 1.3 - */ - private void setContextRoot(String filePart, String serviceName) { - String contextRoot = configContext.getContextRoot(); - if (contextRoot != null && contextRoot.length() > 0) { - if (contextRoot.equals("/")) { - configContext.setServicePath("/"); - } else { - int i = filePart.indexOf(contextRoot) + contextRoot.length(); - int j = filePart.lastIndexOf(serviceName); - if (i>=j || (i+1 == j)) { - configContext.setServicePath("/"); - } else { - String mapping = filePart.substring(i+1, j); - configContext.setServicePath(mapping); - } - } - configContext.setContextRoot(contextRoot); - } - } - - private static String setIPAddress(String wsdlURI, String requestURI) { - try { - URI wsdlURIObj = new URI(wsdlURI); - String wsdlHost = wsdlURIObj.getHost(); - int wsdlPort = wsdlURIObj.getPort(); - String wsdlAddr = wsdlHost + (wsdlPort != -1 ? ":" + Integer.toString(wsdlPort) : ""); - URI requestURIObj = new URI(requestURI); - String ipAddr = HttpUtils.getIpAddress(); - int requestPort = requestURIObj.getPort(); - String newAddr = ipAddr + (requestPort != -1 ? ":" + Integer.toString(requestPort) : ""); - return wsdlURI.replace(wsdlAddr, newAddr); - } catch (Exception e) { - // URI string not in expected format, so return the WSDL URI unmodified - return wsdlURI; - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configurator/Axis2BindingBasicAuthenticationConfigurator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configurator/Axis2BindingBasicAuthenticationConfigurator.java deleted file mode 100644 index eba7a01798..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configurator/Axis2BindingBasicAuthenticationConfigurator.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.configurator; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.security.auth.Subject; - -import org.apache.axiom.om.util.Base64; -import org.apache.axis2.client.OperationClient; -import org.apache.axis2.context.MessageContext; -import org.apache.axis2.transport.http.HTTPConstants; -import org.apache.axis2.transport.http.HttpTransportProperties; -import org.apache.axis2.transport.http.HttpTransportProperties.Authenticator; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.security.SecurityUtil; -import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy; -import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPrincipal; -import org.oasisopen.sca.ServiceRuntimeException; - -/** - * Policy handler to handle PolicySet that contain Axis2ConfigParamPolicy instances - * - * @version $Rev$ $Date$ - */ -public class Axis2BindingBasicAuthenticationConfigurator { - - - public static void setOperationOptions(OperationClient operationClient, Message msg, BasicAuthenticationPolicy policy) { - String username = null; - String password = null; - - // get the security context - Subject subject = SecurityUtil.getSubject(msg); - BasicAuthenticationPrincipal principal = SecurityUtil.getPrincipal(subject, - BasicAuthenticationPrincipal.class); - - // could use the security principal to look up basic auth credentials - if ( principal != null ) { - username = ((BasicAuthenticationPrincipal)principal).getName(); - password = ((BasicAuthenticationPrincipal)principal).getPassword(); - } - - if (username == null || password == null ){ - throw new ServiceRuntimeException("Basic authentication username or password is null"); - } - - HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); - List<String> auth = new ArrayList<String>(); - auth.add(Authenticator.BASIC); - authenticator.setAuthSchemes(auth); - authenticator.setPreemptiveAuthentication(true); - authenticator.setUsername(username); - authenticator.setPassword(password); - - operationClient.getOptions().setProperty(HTTPConstants.AUTHENTICATE, - authenticator); - } - - public static void parseHTTPHeader(MessageContext messageContext, Message msg, BasicAuthenticationPolicy policy) { - - Map httpHeaderProperties = (Map)messageContext.getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS); - - String basicAuthString = (String)httpHeaderProperties.get("Authorization"); - String decodedBasicAuthString = null; - String username = null; - String password = null; - - if (basicAuthString != null) { - basicAuthString = basicAuthString.trim(); - - if (basicAuthString.startsWith("Basic ")) { - decodedBasicAuthString = new String(Base64.decode(basicAuthString.substring(6))); - } - - int collonIndex = decodedBasicAuthString.indexOf(':'); - - if (collonIndex == -1){ - username = decodedBasicAuthString; - } else { - username = decodedBasicAuthString.substring(0, collonIndex); - password = decodedBasicAuthString.substring(collonIndex + 1); - } - } - - // get the security context - Subject subject = SecurityUtil.getSubject(msg); - BasicAuthenticationPrincipal principal = new BasicAuthenticationPrincipal(username, - password); - subject.getPrincipals().add(principal); - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configurator/Axis2BindingHeaderConfigurator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configurator/Axis2BindingHeaderConfigurator.java deleted file mode 100644 index 647f934c02..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configurator/Axis2BindingHeaderConfigurator.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.policy.configurator; - - - -import javax.xml.namespace.QName; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.soap.SOAPEnvelope; -import org.apache.axiom.soap.SOAPHeader; -import org.apache.axis2.context.MessageContext; -import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicyUtil; -import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2SOAPHeader; -import org.apache.tuscany.sca.invocation.Message; - - -/** - * Policy handler to handle PolicySet that contain Axis2ConfigParamPolicy instances - * - * @version $Rev$ $Date$ - */ -public class Axis2BindingHeaderConfigurator { - - - public static void setHeader(MessageContext messageContext, Message msg, QName headerQName) { - - if (headerQName != null){ - SOAPEnvelope envelope = messageContext.getEnvelope(); - OMFactory factory = envelope.getOMFactory(); - SOAPHeader soapHeader = envelope.getHeader(); - - Axis2SOAPHeader header = Axis2HeaderPolicyUtil.getHeader(msg, headerQName) ; - - if (header != null){ - soapHeader.addChild(header.getAsSOAPHeaderBlock(factory)); - } - } - } - - public static void getHeader(MessageContext messageContext, Message msg, QName headerQName, Axis2SOAPHeader header) { - - SOAPEnvelope sev = messageContext.getEnvelope(); - SOAPHeader sh = sev.getHeader(); - OMElement omHeader = sh.getFirstChildWithName(headerQName); - - header.setAsSOAPHeaderBlock(omHeader); - - msg.getHeaders().add(header); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions deleted file mode 100644 index 91a24cc1b4..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-org/apache/tuscany/sca/binding/ws/axis2/definitions.xml
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory deleted file mode 100644 index a48ff54c77..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Implementation class for the binding extension
-org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory;model=org.apache.tuscany.sca.binding.ws.WebServiceBinding
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml deleted file mode 100644 index f8b5b2063c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<!-- $Rev$ $Date$ -->
-
-<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
-
- <sca:bindingType type="sca:binding.ws" mayProvide="SOAP SOAP.1_1 SOAP.1_2 MTOM" alwaysProvides=""/>
-
- <!-- PolicyIntents defined by the SCA Runtime Extension for WS Binding Axis 2 -->
- <sca:intent name="SOAP" constrains="sca:binding.ws">
- <sca:description>
- Communication through this binding requires SOAP
- </sca:description>
- </sca:intent>
-
- <sca:intent name="SOAP.1_1">
- <sca:description>
- Communication through this binding requires SOAP 1.1
- </sca:description>
- </sca:intent>
-
- <sca:intent name="SOAP.1_2">
- <sca:description>
- Communication through this binding requires SOAP 1.2
- </sca:description>
- </sca:intent>
-
- <sca:intent name="MTOM" constrains="sca:binding.ws">
- <sca:description>
- Communication through this binding requires MTOM support
- </sca:description>
- </sca:intent>
- </sca:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml deleted file mode 100644 index ea32836f2a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml +++ /dev/null @@ -1,504 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> - -<axisconfig name="AxisJava2.0"> - <!-- ================================================= --> - <!-- Parameters --> - <!-- ================================================= --> - <parameter name="hotdeployment">true</parameter> - <parameter name="hotupdate">false</parameter> - <parameter name="enableMTOM">false</parameter> - <parameter name="enableSwA">false</parameter> - - <!-- Customized by Tuscany --> - <!-- parameter name="OutflowSecurity"> - <action> - <items>Timestamp</items> - </action> - </parameter--> - - <!--Uncomment if you want to enable file caching for attachments --> - <!--parameter name="cacheAttachments">true</parameter> - <parameter name="attachmentDIR"></parameter> - <parameter name="sizeThreshold">4000</parameter--> - - <!--This will give out the timout of the configuration contexts, in milliseconds--> - <parameter name="ConfigContextTimeoutInterval">30000</parameter> - - <!--During a fault, stacktrace can be sent with the fault message. The following flag will control --> - <!--that behavior.--> - - <!-- Customized by Tuscany --> - <parameter name="sendStacktraceDetailsWithFaults">true</parameter> - - <!--If there aren't any information available to find out the fault reason, we set the message of the exception--> - <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be --> - <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag--> - <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.--> - <parameter name="DrillDownToRootCauseForFaultReason">false</parameter> - - <parameter name="userName">admin</parameter> - <parameter name="password">axis2</parameter> - - <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.--> - <!--ServicesDirectory only works on the following cases--> - <!---File based configurator and in that case the value should be a file URL (http:// not allowed)--> - <!---When creating URL Based configurator with URL “file://†--> - <!--- War based configurator with expanded case , --> - - <!--All the other scenarios it will be ignored.--> - <!--<parameter name="ServicesDirectory">service</parameter>--> - <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path--> - <!--<parameter name="ModulesDirectory">modules</parameter>--> - - - - <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context--> - <!--root which can configured using the following contextRoot parameter--> - <!--<parameter name="contextRoot">axis2</parameter>--> - - <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints--> - <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this --> - <!--context path to proper Axis2 servlets--> - - <!-- Customized by Tuscany --> - <parameter name="servicePath">/</parameter> - - <!--<parameter name="restPath">rest</parameter>--> - - <!-- Following parameter will completely disable REST handling in Axis2--> - - <parameter name="disableREST" locked="true">false</parameter> - - <!--POJO deployer , this will alow users to drop .class file and make that into a service--> - <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/> - - <!-- Following parameter will set the host name for the epr--> - <!--<parameter name="hostname" locked="true">myhost.com</parameter>--> - - <!-- If you have a frontend host which exposes this webservice using a different public URL --> - <!-- use this parameter to override autodetected url --> - <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>--> - - - <!-- The way of adding listener to the system--> - <!-- <listener class="org.apache.axis2.ObserverIMPL">--> - <!-- <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>--> - <!-- </listener>--> - - <!-- ================================================= --> - <!-- Message Receivers --> - <!-- ================================================= --> - <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for --> - <!--all the other MEP implement it and add the correct entry to here , so that you can refer from--> - <!--any operation --> - <!--Note : You can ovrride this for a particular service by adding the same element with your requirement--> - <messageReceivers> - - <!-- Added by Tuscany --> - <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" - class="org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceInMessageReceiver"/> - - <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" - class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/> - <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" - class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/> - - <!-- Added by Tuscany --> - <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" - class="org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceInOutSyncMessageReceiver"/> - - <!-- Added by Tuscany --> - <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only" - class="org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceInMessageReceiver"/> - - <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only" - class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/> - <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out" - class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/> - - <!-- Added by Tuscany --> - <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out" - class="org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceInOutSyncMessageReceiver"/> - - </messageReceivers> - <!-- ================================================= --> - <!-- Message Formatter --> - <!-- ================================================= --> - <!--Following content type to message formatter mapping can be used to implement support for different message --> - <!--format serialization in Axis2. These message formats are expected to be resolved based on the content type. --> - <messageFormatters> - <messageFormatter contentType="application/x-www-form-urlencoded" - class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/> - <messageFormatter contentType="multipart/form-data" - class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/> - <messageFormatter contentType="application/xml" - class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/> - </messageFormatters> - - <!-- ================================================= --> - <!-- Message Builders --> - <!-- ================================================= --> - <!--Following content type to builder mapping can be used to implement support for different message --> - <!--formats in Axis2. These message formats are expected to be resolved based on the content type. --> - <messageBuilders> - <messageBuilder contentType="application/xml" - class="org.apache.axis2.builder.ApplicationXMLBuilder"/> - <messageBuilder contentType="application/x-www-form-urlencoded" - class="org.apache.axis2.builder.XFormURLEncodedBuilder"/> - <messageBuilder contentType="multipart/form-data" - class="org.apache.axis2.builder.MultipartFormDataBuilder"/> - </messageBuilders> - - <!-- ================================================= --> - <!-- Transport Ins --> - <!-- ================================================= --> - <transportReceiver name="http" - class="org.apache.axis2.transport.http.SimpleHTTPServer"> - - <!-- Customized by Tuscany --> - <parameter name="port" locked="false">6060</parameter> - - <!-- Here is the complete list of supported parameters (see example settings further below): - port: the port to listen on (default 6060) - hostname: if non-null, url prefix used in reply-to endpoint references (default null) - originServer: value of http Server header in outgoing messages (default "Simple-Server/1.1") - requestTimeout: value in millis of time that requests can wait for data (default 20000) - requestTcpNoDelay: true to maximize performance and minimize latency (default true) - false to minimize bandwidth consumption by combining segments - requestCoreThreadPoolSize: number of threads available for request processing (unless queue fills up) (default 25) - requestMaxThreadPoolSize: number of threads available for request processing if queue fills up (default 150) - note that default queue never fills up: see HttpFactory - threadKeepAliveTime: time to keep threads in excess of core size alive while inactive (default 180) - note that no such threads can exist with default unbounded request queue - threadKeepAliveTimeUnit: TimeUnit of value in threadKeepAliveTime (default SECONDS) (default SECONDS) - --> - <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> --> - <!-- <parameter name="originServer">My-Server/1.1</parameter> --> - <!-- <parameter name="requestTimeout">10000</parameter> --> - <!-- <parameter name="requestTcpNoDelay">false</parameter> --> - <!-- <parameter name="requestCoreThreadPoolSize">50</parameter> --> - <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter> --> - <!-- <parameter name="threadKeepAliveTime">240000</parameter> --> - <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter> --> - </transportReceiver> - - <!-- Added by Tuscany --> - <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener"> - <!-- These configuation parameters now come from the binding.ws uri - or from a policy set - <parameter name="myTopicConnectionFactory"> - <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> - <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> - <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter> - </parameter> - - <parameter name="myQueueConnectionFactory"> - <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> - <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> - <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter> - </parameter> - - <parameter name="default"> - <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> - <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> - <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter> - </parameter> - --> - </transportReceiver> - - <!-- ================================================= --> - <!-- Non-blocking http/s Transport Listener --> - - <!-- the non blocking http transport based on HttpCore + NIO extensions - <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener"> - <parameter name="port" locked="false">9000</parameter> - <parameter name="non-blocking" locked="false">true</parameter> - </transportReceiver>--> - - <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions - <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener"> - <parameter name="port" locked="false">9002</parameter> - <parameter name="non-blocking" locked="false">true</parameter> - <parameter name="keystore" locked="false"> - <KeyStore> - <Location>identity.jks</Location> - <Type>JKS</Type> - <Password>password</Password> - <KeyPassword>password</KeyPassword> - </KeyStore> - </parameter> - <parameter name="truststore" locked="false"> - <TrustStore> - <Location>trust.jks</Location> - <Type>JKS</Type> - <Password>password</Password> - </TrustStore> - </parameter>--> - <!--<parameter name="SSLVerifyClient">require</parameter> - supports optional|require or defaults to none --> - <!--</transportReceiver>--> - - <!-- ================================================= --> - <!-- Mail Transport Listener --> - <!-- This is a sample configuration. It assumes a mail server running in localhost. - Listener pops messages that comes to the email address red@localhost. Users - password is red. Listener connect to the server every 3000 milliseconds. - Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. - http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html - --> - <!-- ================================================= --> - <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener"> - <parameter name="mail.pop3.host">localhost</parameter> - <parameter name="mail.pop3.user">red</parameter> - <parameter name="mail.store.protocol">pop3</parameter> - <parameter name="transport.mail.pop3.password">red</parameter> - <parameter name="transport.mail.replyToAddress">red@localhost</parameter> - <parameter name="transport.listener.interval">3000</parameter> - </transportReceiver>--> - - <!--Uncomment if you want to have TCP transport support--> - <!--transportReceiver name="tcp" - class="org.apache.axis2.transport.tcp.TCPServer"> - <parameter name="port">6060</parameter-->> - <!--If you want to give your own host address for EPR generation--> - <!--uncomment the following paramter , and set it as you required.--> - <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>--> - <!-- /transportReceiver --> - - <!-- ================================================= --> - <!-- Transport Outs --> - <!-- ================================================= --> - - <transportSender name="tcp" - class="org.apache.axis2.transport.tcp.TCPTransportSender"/> - <transportSender name="local" - class="org.apache.axis2.transport.local.LocalTransportSender"/> - <transportSender name="http" - class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> - <parameter name="PROTOCOL">HTTP/1.1</parameter> - <parameter name="Transfer-Encoding">chunked</parameter> - - <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages --> - <!-- <parameter name="OmitSOAP12Action">true</parameter> --> - </transportSender> - - <transportSender name="https" - class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> - <parameter name="PROTOCOL">HTTP/1.1</parameter> - <parameter name="Transfer-Encoding">chunked</parameter> - </transportSender> - <transportSender name="jms" - class="org.apache.axis2.transport.jms.JMSSender"/> - - <!-- ================================================= --> - <!-- Non-blocking http/s Transport Sender --> - - <!-- the non-blocking http transport sender based on HttpCore + NIO extensions - <transportSender name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender"> - <parameter name="non-blocking" locked="false">true</parameter> - </transportSender>--> - - <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions - <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender"> - <parameter name="non-blocking" locked="false">true</parameter> - <parameter name="keystore" locked="false"> - <KeyStore> - <Location>identity.jks</Location> - <Type>JKS</Type> - <Password>password</Password> - <KeyPassword>password</KeyPassword> - </KeyStore> - </parameter> - <parameter name="truststore" locked="false"> - <TrustStore> - <Location>trust.jks</Location> - <Type>JKS</Type> - <Password>password</Password> - </TrustStore> - </parameter>--> - <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter> - supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified --> - <!--</transportSender>--> - - <!-- ================================================= --> - <!-- Mail Transport Sender --> - <!--Only need to uncomment the sender. Configuration is achieved with every client. - At any instant mail host should be given. Sample configuration has been given. - http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html - --> - <!-- ================================================= --> - <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender"> - <parameter name="mail.smtp.host">localhost</parameter> - </transportSender>--> - - <!-- ================================================= --> - <!-- Global Modules --> - <!-- ================================================= --> - <!-- Comment this to disable Addressing --> - - <!-- Commented out by Tuscany - <module ref="addressing"/> - --> - - <!-- Added by Tuscany --> - <!-- - <module ref="rampart"/> - --> - - <!-- wsp:Policy wsu:Id="UTOverTransport" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" /> - </wsp:Policy> - </sp:SignedSupportingTokens> - - <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> - <ramp:user>TuscanyWsUser</ramp:user> - <ramp:passwordType>PasswordText</ramp:passwordType> - <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.ClientPWCBHandler</ramp:passwordCallbackClass> - </ramp:RampartConfig> - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy--> - - <!--Configuring module , providing parameters for modules whether they refer or not--> - <!--<moduleConfig name="addressing">--> - <!--<parameter name="addressingPara">N/A</parameter>--> - <!--</moduleConfig>--> - - <!-- ================================================= --> - <!-- Clustering --> - <!-- ================================================= --> - <!-- Configure and uncomment following for preparing Axis2 to a clustered environment --> - <!-- - <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager"> - <parameter name="param1">value1</parameter> - <parameter name="domain">apache.axis2.domain</parameter> - <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager"> - <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/> - </configurationManager> - <contextManager class="org.apache.axis2.cluster.context.TribesContextManager"> - <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/> - </contextManager> - </cluster> - --> - - <!-- ================================================= --> - <!-- Phases --> - <!-- ================================================= --> - <phaseOrder type="InFlow"> - <!-- System pre defined phases --> - <phase name="Transport"> - - <!-- Added by Tuscany --> - <handler name="TuscanyDispatcher" - class="org.apache.tuscany.sca.binding.ws.axis2.TuscanyDispatcher"> - <order phase="Transport"/> - </handler> - - <handler name="RequestURIBasedDispatcher" - class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"> - <order phase="Transport"/> - </handler> - <handler name="SOAPActionBasedDispatcher" - class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"> - <order phase="Transport"/> - </handler> - </phase> - <phase name="Addressing"> - <handler name="AddressingBasedDispatcher" - class="org.apache.axis2.dispatchers.AddressingBasedDispatcher"> - <order phase="Addressing"/> - </handler> - </phase> - <phase name="Security"/> - <phase name="PreDispatch"/> - <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase"> - <handler name="RequestURIBasedDispatcher" - class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/> - <handler name="SOAPActionBasedDispatcher" - class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/> - <handler name="RequestURIOperationDispatcher" - class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/> - <handler name="SOAPMessageBodyBasedDispatcher" - class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/> -<!-- - <handler name="HTTPLocationBasedDispatcher" - class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/> ---> - </phase> - <phase name="RMPhase"/> - <!-- System pre defined phases --> - <!-- After Postdispatch phase module author or service author can add any phase he want --> - <phase name="OperationInPhase"/> - <phase name="soapmonitorPhase"/> - </phaseOrder> - <phaseOrder type="OutFlow"> - <!-- user can add his own phases to this area --> - <phase name="soapmonitorPhase"/> - <phase name="OperationOutPhase"/> - <!--system predefined phase--> - <!--these phase will run irrespective of the service--> - <phase name="RMPhase"/> - <phase name="PolicyDetermination"/> - <phase name="MessageOut"/> - <phase name="Security"/> - </phaseOrder> - <phaseOrder type="InFaultFlow"> - <phase name="Addressing"> - <handler name="AddressingBasedDispatcher" - class="org.apache.axis2.dispatchers.AddressingBasedDispatcher"> - <order phase="Addressing"/> - </handler> - </phase> - <phase name="Security"/> - <phase name="PreDispatch"/> - <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase"> - <handler name="RequestURIBasedDispatcher" - class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/> - <handler name="SOAPActionBasedDispatcher" - class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/> - <handler name="RequestURIOperationDispatcher" - class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/> - <handler name="SOAPMessageBodyBasedDispatcher" - class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/> -<!-- - <handler name="HTTPLocationBasedDispatcher" - class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/> ---> - </phase> - <phase name="RMPhase"/> - <!-- user can add his own phases to this area --> - <phase name="OperationInFaultPhase"/> - <phase name="soapmonitorPhase"/> - </phaseOrder> - <phaseOrder type="OutFaultFlow"> - <!-- user can add his own phases to this area --> - <phase name="soapmonitorPhase"/> - <phase name="OperationOutFaultPhase"/> - <phase name="RMPhase"/> - <phase name="PolicyDetermination"/> - <phase name="MessageOut"/> - <phase name="Security"/> - </phaseOrder> -</axisconfig> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list deleted file mode 100644 index e6e70dfd4b..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list +++ /dev/null @@ -1 +0,0 @@ -rampart-1.4.mar
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.4.mar b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.4.mar Binary files differdeleted file mode 100644 index ec870734a5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.4.mar +++ /dev/null diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/services/services.list b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/services/services.list deleted file mode 100644 index e69de29bb2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/services/services.list +++ /dev/null diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java deleted file mode 100644 index 2ce23bf2c4..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import junit.framework.TestCase; - -public class Axis2ReferenceTestCase extends TestCase { - - public void testInvokeService() throws Exception { -// Axis2ReferenceBinding axis2Reference = createAxis2Reference("testWebAppName", "testServiceName"); -// ServiceContract contract = new JavaServiceContract(); -// Operation operation = new Operation<Type>("sayHi", null, null, null, false, null, NO_CONVERSATION); -// TargetInvoker targetInvoker = axis2Reference.createTargetInvoker(contract, operation); -// assertNotNull(targetInvoker); -// assertFalse(targetInvoker instanceof Axis2AsyncTargetInvoker); - } - - public void testAsyncTargetInvoker() throws Exception { -// Axis2ReferenceBinding axis2Reference = createAxis2Reference("testWebAppName", "testServiceName"); -// //Create a mocked InboundWire, make the call of ServiceBindingExtension.getInterface() returns a Class -// Wire inboundWire = EasyMock.createNiceMock(Wire.class); -// JavaServiceContract contract = new JavaServiceContract(Greeter.class); -// contract.setCallbackName(""); -// contract.setCallbackClass(GreetingCallback.class); -// Operation<Type> callbackOp = -// new Operation<Type>("sayHiCallback", null, null, null, true, null, NO_CONVERSATION); -// HashMap<String, Operation<Type>> callbackOps = new HashMap<String, Operation<Type>>(); -// callbackOps.put("sayHiCallback", callbackOp); -// contract.setCallbackOperations(callbackOps); -// EasyMock.expect(inboundWire.getTargetContract()).andReturn(contract).anyTimes(); -// EasyMock.replay(inboundWire); -// -// axis2Reference.setWire(inboundWire); -// Operation operation = new Operation<Type>("sayHi", null, null, null, true, null, NO_CONVERSATION); -// TargetInvoker asyncTargetInvoker = axis2Reference.createTargetInvoker(contract, operation); -// assertNotNull(asyncTargetInvoker); -// assertTrue(asyncTargetInvoker instanceof Axis2AsyncTargetInvoker); - } - -// @SuppressWarnings("unchecked") -// private Axis2ReferenceBinding createAxis2Reference(String webAppName, String serviceName) throws Exception { -// //Create WebServiceBindingDefinition -// String wsdlLocation = "/wsdl/hello_world_doc_lit.wsdl"; -// URL url = getClass().getResource(wsdlLocation); -// assertNotNull("Could not find wsdl " + url.toString(), url); -// -// WSDLFactory factory = WSDLFactory.newInstance(); -// WSDLReader reader = factory.newWSDLReader(); -// reader.setFeature("javax.wsdl.verbose", false); -// InputSource input = new InputSource(url.openStream()); -// Definition wsdlDef = reader.readWSDL(url.toString(), input); -// Service wsdlService = wsdlDef.getService(new QName("http://objectweb.org/hello_world_soap_http", -// "SOAPService")); -// Port port = wsdlService.getPort("SoapPort"); -// WebServiceBindingDefinition wsBinding = -// new WebServiceBindingDefinition(wsdlDef, port, "uri", "portURI", wsdlService); -// //Create a mocked WireService, make the call of ServiceBindingExtension.getServiceInstance() returns a proxy instance. -// // TODO figure out what to do with the service contract -// ServiceContract<?> contract = new WSDLServiceContract(); -// contract.setInterfaceClass(Greeter.class); -// return new Axis2ReferenceBinding(URI.create(serviceName), -// wsBinding, -// contract, -// null, -// null); -// } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java deleted file mode 100644 index d4d20414e5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -import junit.framework.TestCase; - -public class Axis2ServiceTestCase extends TestCase { - - public void testInvokeService() throws Exception { -// TestServletHost tomcatHost = new TestServletHost(); -// Axis2ServiceBinding axis2Service = createAxis2Service("testServiceName", tomcatHost, false); -// axis2Service.start(); -// -// if (true) return; -// Servlet servlet = tomcatHost.getMapping("testWebAppName/serviceBindings/testServiceName"); -// assertNotNull(servlet); -// -// //Create mocked HttpRequest and HttpResponse object to test the Axis2Servlet -// //To be done: - - } - - public void testAsyncMessageReceiver() throws Exception { - -// TestServletHost tomcatHost = new TestServletHost(); -// Axis2ServiceBinding axis2Service = createAxis2Service("testServiceName", tomcatHost, true); -// axis2Service.start(); - } - -// @SuppressWarnings("unchecked") -// private Axis2ServiceBinding createAxis2Service(String serviceName, ServletHost tomcatHost, boolean callback) -// throws Exception { -// //Create WebServiceBindingDefinition -// String wsdlLocation = "/wsdl/hello_world_doc_lit.wsdl"; -// URL url = getClass().getResource(wsdlLocation); -// assertNotNull("Could not find wsdl " + url.toString(), url); -// -// WSDLFactory factory = WSDLFactory.newInstance(); -// WSDLReader reader = factory.newWSDLReader(); -// reader.setFeature("javax.wsdl.verbose", false); -// InputSource input = new InputSource(url.openStream()); -// Definition wsdlDef = reader.readWSDL(url.toString(), input); -// Service wsdlService = wsdlDef.getService(new QName("http://objectweb.org/hello_world_soap_http", -// "SOAPService")); -// Port port = wsdlService.getPort("SoapPort"); -// WebServiceBindingDefinition wsBinding = new WebServiceBindingDefinition(wsdlDef, port, "uri", "portURI", wsdlService); -// -// //Create a mocked WireService, make the call of ServiceBindingExtension.getServiceInstance() returns a proxy instance. -//// WireService wireService = EasyMock.createNiceMock(WireService.class); -//// wireService.createProxy(EasyMock.isA(Class.class), EasyMock.isA(Wire.class)); -//// EasyMock.expectLastCall().andReturn(null); -//// EasyMock.replay(wireService); -// -// //Create a mocked InboundWire, make the call of ServiceBindingExtension.getInterface() returns a Class -// Wire inboundWire = EasyMock.createNiceMock(Wire.class); -// JavaServiceContract contract = new JavaServiceContract(Greeter.class); -// Map<String, Operation<Type>> opMap = new HashMap<String, Operation<Type>>(); -// for (Method m : Greeter.class.getMethods()) { -// opMap.put(m.getName(), new Operation<Type>(m.getName(), null, null, null)); -// } -// contract.setOperations(opMap); -// EasyMock.expect(inboundWire.getTargetContract()).andReturn(contract).anyTimes(); -// if (callback) { -// contract.setCallbackName(""); -// } -// EasyMock.replay(inboundWire); -// -// Wire outboundWire = EasyMock.createNiceMock(Wire.class); -// Map<Operation<?>, InvocationChain> map = new HashMap<Operation<?>, InvocationChain>(); -// EasyMock.expect(outboundWire.getInvocationChains()).andReturn(map).once(); -// EasyMock.replay(outboundWire); -// -// TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator(); -// ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext(); -// Axis2ServiceBinding axis2Service = -// new Axis2ServiceBinding(URI.create(serviceName), -// contract, -// null, -// wsBinding, -// tomcatHost, -// configurationContext, null); -// axis2Service.setWire(inboundWire); -//// axis2Service.setOutboundWire(outboundWire); -// -// return axis2Service; -// } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java deleted file mode 100644 index 767f59646f..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -public interface Greeter { - - String sayHi(); - - String greetMe(String requestType); - - void greetMeOneWay(String requestType); - - void greetMeWithCallback(String requestType); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java deleted file mode 100644 index e5e76af0b7..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2; - -public interface GreetingCallback { - - void greetMeCallback(String greetMeResponse); -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java deleted file mode 100644 index 40d769d83a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java +++ /dev/null @@ -1,34 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * Test ?wsdl works and that the returned WSDL has the correct endpoint
- *
- * @version $Rev$ $Date$
- */
-@Remotable
-public interface Account {
-
- CustomerProfileData getCustomerProfile(String loginID);
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java deleted file mode 100644 index 5edb4ddc5a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java +++ /dev/null @@ -1,33 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests;
-
-/**
- * Test ?wsdl works and that the returned WSDL has the correct endpoint
- *
- * @version $Rev$ $Date$
- */
-public class AccountService implements Account {
-
- public CustomerProfileData getCustomerProfile(String loginID) {
- return new CustomerProfileData(loginID);
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java deleted file mode 100644 index 2dc7d8dee4..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import java.io.Serializable; - -public class Bar implements Serializable { - private static final long serialVersionUID = 1249963611910502668L; - - private String s; - private int x; - private Integer y; - - private Boolean b; - - public Boolean getB() { - return b; - } - public void setB(Boolean b) { - this.b = b; - } - public String getS() { - return s; - } - public void setS(String s) { - this.s = s; - } - public int getX() { - return x; - } - public void setX(int x) { - this.x = x; - } - public Integer getY() { - return y; - } - public void setY(Integer y) { - this.y = y; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java deleted file mode 100644 index 5c1ee6a435..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java +++ /dev/null @@ -1,103 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests;
-
-/**
- * Test ?wsdl works and that the returned WSDL has the correct endpoint
- *
- * @version $Rev$ $Date$
- */
-public class CustomerProfileData {
-
- private String firstName;
- private String lastName;
- private String address;
- private String email;
- private String loginID;
- private String password;
- private int id;
-
- public CustomerProfileData(String loginID) {
- firstName = "John";
- lastName = "Doe";
- address = "345 Main Street";
- email = "john@doe.org";
- this.loginID = loginID;
- password = "hello";
- id = 1234;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String firstName) {
- this.lastName = lastName;
- }
-
- public String getAddress() {
- return address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getLoginID() {
- return loginID;
- }
-
- public void setLoginID(String loginID) {
- this.loginID = loginID;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java deleted file mode 100644 index 4e1e7dbdad..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Echo { - - Foo echoFoo(Foo foo); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java deleted file mode 100644 index 3e96480c20..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.oasisopen.sca.annotation.Reference; - -public class EchoComponent implements Echo { - - @Reference - public Echo echoWS; - - public Foo echoFoo(Foo foo) { - return echoWS.echoFoo(foo); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java deleted file mode 100644 index d028ced69e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - - -public class EchoImpl implements Echo { - - public Foo echoFoo(Foo foo) { - return foo; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java deleted file mode 100644 index c7b503af17..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import java.io.Serializable; - -public class Foo implements Serializable { - private static final long serialVersionUID = 4879476066850018458L; - - private Bar[] bars; - - public Bar[] getBars() { - return bars; - } - - public void setBars(Bar[] bars) { - this.bars = bars; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java deleted file mode 100644 index 3ac30780b3..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorld { - - String getGreetings(String s); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java deleted file mode 100644 index 0dd6e90c72..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldComponent implements HelloWorld { - - @Reference - public HelloWorld helloWorldWS; - - public String getGreetings(String s) { - return helloWorldWS.getGreetings(s); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java deleted file mode 100644 index f30286feea..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; - -public class HelloWorldMultiService implements HelloWorldOM, HelloWorldOM2 { - - public OMElement getGreetings(OMElement requestOM) { - String name = requestOM.getFirstElement().getText(); - - OMFactory omFactory = OMAbstractFactory.getOMFactory(); - OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld"); - OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld"); - responseOM.addChild(param); - param.addChild(omFactory.createOMText("Hello " + name)); - - return responseOM; - } - - public OMElement getGreetings2(OMElement requestOM) { - String name = requestOM.getFirstElement().getText(); - - OMFactory omFactory = OMAbstractFactory.getOMFactory(); - OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld"); - OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld"); - responseOM.addChild(param); - param.addChild(omFactory.createOMText("Hello2 " + name)); - - return responseOM; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java deleted file mode 100644 index 09b414b2d8..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests ; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class HelloWorldNoWSDLTestCase extends TestCase { - - private Node node; - - public void testHelloWorld() throws Exception { - HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent"); - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - - /** - * Test a a WS call with a complex type - */ - public void testEchoFoo() throws Exception { - Echo echo = node.getService(Echo.class, "EchoComponent"); - - Foo f = new Foo(); - Bar b1 = new Bar(); - b1.setS("petra"); - b1.setX(1); - b1.setY(new Integer(2)); - b1.setB(Boolean.TRUE); - Bar b2 = new Bar(); - b2.setS("beate"); - b2.setX(3); - b2.setY(new Integer(4)); - b2.setB(Boolean.FALSE); - f.setBars(new Bar[] { b1, b2} ); - - Foo f2 = echo.echoFoo(f); - - assertEquals("petra", f2.getBars()[0].getS()); - assertEquals(1, f2.getBars()[0].getX()); - assertEquals(2, f2.getBars()[0].getY().intValue()); - assertTrue(f2.getBars()[0].getB().booleanValue()); - assertEquals("beate", f2.getBars()[1].getS()); - assertEquals(3, f2.getBars()[1].getX()); - assertEquals(4, f2.getBars()[1].getY().intValue()); - assertFalse(f2.getBars()[1].getB().booleanValue()); - - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite", new Contribution("test", contribution)); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java deleted file mode 100644 index 13a16c8e8a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.apache.axiom.om.OMElement; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldOM { - - OMElement getGreetings(OMElement parmE); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java deleted file mode 100644 index 0e50781061..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.apache.axiom.om.OMElement; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldOM2 { - - OMElement getGreetings2(OMElement parmE); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java deleted file mode 100644 index 82f61bd7c2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.apache.axiom.om.OMElement; -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldOMComponent implements HelloWorldOM { - - @Reference - public HelloWorldOM helloWorldWS; - - public OMElement getGreetings(OMElement om) { - return helloWorldWS.getGreetings(om); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java deleted file mode 100644 index 71d7bf68fb..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; - -public class HelloWorldOMService implements HelloWorldOM { - - public OMElement getGreetings(OMElement requestOM) { - System.out.println(" **** getGreetings **** "); - String name = requestOM.getFirstElement().getText(); - - OMFactory omFactory = OMAbstractFactory.getOMFactory(); - OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld"); - OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld"); - responseOM.addChild(param); - param.addChild(omFactory.createOMText("Hello " + name)); - - return responseOM; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java deleted file mode 100644 index 4bb5bdb87d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class HelloWorldOMTestCase extends TestCase { - - private Node node; - private HelloWorldOM helloWorld; - - public void testHelloWorld() throws Exception { - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld"); - OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld"); - requestOM.addChild(parmE); - parmE.addChild(fac.createOMText("petra")); - OMElement responseOM = helloWorld.getGreetings(requestOM); - OMElement child = (OMElement)responseOM.getFirstElement(); - Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText()); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite", new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java deleted file mode 100644 index 017d9bb478..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -public class HelloWorldService implements HelloWorld { - - public String getGreetings(String s) { - return "Hello " + s; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java deleted file mode 100644 index b7146098ec..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class HelloWorldTestCase extends TestCase { - - private Node node; - private HelloWorld helloWorld; - - public void testCalculator() throws Exception { - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite", new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java deleted file mode 100644 index a239d95c3a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-public class HelloWorldWSDLMergedTestCase extends TestCase {
-
- private Node node;
- private HelloWorldOM helloWorld;
-
- public void testHelloWorld() throws Exception {
- OMFactory fac = OMAbstractFactory.getOMFactory();
- OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
- OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
- requestOM.addChild(parmE);
- parmE.addChild(fac.createOMText("petra"));
- OMElement responseOM = helloWorld.getGreetings(requestOM);
- OMElement child = (OMElement)responseOM.getFirstElement();
- Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
- }
-
- @Override
- protected void setUp() throws Exception {
- String contribution = ContributionLocationHelper.getContributionLocation(getClass());
- node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite", new Contribution("test", contribution));
- node.start();
- helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- node.destroy();
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java deleted file mode 100644 index 15807c76de..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java +++ /dev/null @@ -1,104 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.List;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-/**
- * Test ?wsdl works and that the returned WSDL has the correct endpoint
- *
- * @version $Rev$ $Date$
- */
-public class QuestionMarkWSDLImportTestCase extends TestCase {
-
- private Node node;
-
- /**
- * Tests ?wsdl works and returns the correct port endpoint from the WSDL
- */
- public void testWSDLImportPortEndpoint() throws Exception {
- InputStream inp = new URL("http://localhost:8086/AccountService?wsdl").openStream();
- BufferedReader br = new BufferedReader(new InputStreamReader(inp));
- String line;
- while((line = br.readLine()) != null) {
- System.out.println(line);
- }
- br.close();
-
- WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- wsdlReader.setFeature("javax.wsdl.verbose", false);
- wsdlReader.setFeature("javax.wsdl.importDocuments", true);
-
- Definition definition = wsdlReader.readWSDL("http://localhost:8086/AccountService?wsdl");
- assertNotNull(definition);
- // TODO - EPR - $promoted$ no longer used
- //Service service = definition.getService(new QName("http://account2/AccountService/$promoted$ep1", "AccountService"));
- Service service = definition.getService(new QName("http://account2/AccountService/Account", "AccountService"));
- Port port = service.getPort("AccountSoapPort");
-
- String endpoint = getEndpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8086/AccountService", endpoint);
- }
-
- private String getEndpoint(Port port) {
- List wsdlPortExtensions = port.getExtensibilityElements();
- for (final Object extension : wsdlPortExtensions) {
- if (extension instanceof SOAPAddress) {
- return ((SOAPAddress) extension).getLocationURI();
- }
- }
- throw new RuntimeException("no SOAPAddress");
- }
-
- @Override
- protected void setUp() throws Exception {
- String contribution = ContributionLocationHelper.getContributionLocation(getClass());
- node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite", new Contribution("test", contribution));
- node.start();
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- node.destroy();
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java deleted file mode 100644 index fd95ff7473..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java +++ /dev/null @@ -1,104 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.List;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-/**
- * Test ?wsdl works and that the returned WSDL has the correct endpoint
- *
- * @version $Rev: 660340 $ $Date: 2008-05-27 01:08:32 +0100 (Tue, 27 May 2008) $
- */
-public class QuestionMarkWSDLIncludeTestCase extends TestCase {
-
- private Node node;
-
- /**
- * Tests ?wsdl works and returns the correct port endpoint from the WSDL
- */
- public void testWSDLIncludePortEndpoint() throws Exception {
- InputStream inp = new URL("http://localhost:8085/AccountService?wsdl").openStream();
- BufferedReader br = new BufferedReader(new InputStreamReader(inp));
- String line;
- while((line = br.readLine()) != null) {
- System.out.println(line);
- }
- br.close();
-
- WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- wsdlReader.setFeature("javax.wsdl.verbose", false);
- wsdlReader.setFeature("javax.wsdl.importDocuments", true);
-
- Definition definition = wsdlReader.readWSDL("http://localhost:8085/AccountService?wsdl");
- assertNotNull(definition);
- // TODO - EPR - $promoted$ no longer used
- //Service service = definition.getService(new QName("http://accounts/AccountService/$promoted$ep1", "AccountService"));
- Service service = definition.getService(new QName("http://accounts/AccountService/Account", "AccountService"));
- Port port = service.getPort("AccountSoapPort");
-
- String endpoint = getEndpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/AccountService", endpoint);
- }
-
- private String getEndpoint(Port port) {
- List wsdlPortExtensions = port.getExtensibilityElements();
- for (final Object extension : wsdlPortExtensions) {
- if (extension instanceof SOAPAddress) {
- return ((SOAPAddress) extension).getLocationURI();
- }
- }
- throw new RuntimeException("no SOAPAddress");
- }
-
- @Override
- protected void setUp() throws Exception {
- String contribution = ContributionLocationHelper.getContributionLocation(getClass());
- node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite", new Contribution("test", contribution));
- node.start();
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- node.destroy();
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java deleted file mode 100644 index bbec9dd342..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.util.List; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.axis2.transport.http.server.HttpUtils; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * Test ?wsdl works and that the returned WSDL has the correct endpoint - * - * @version $Rev$ $Date$ - */ -public class QuestionMarkWSDLTestCase extends TestCase { - - private Node node; - - /** - * Tests ?wsdl works and returns the correct port endpoint from the WSDL - */ - public void testWSDLPortEndpoint() throws Exception { - InputStream inp = new URL("http://localhost:8085/services/HelloWorldWebService?wsdl").openStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(inp)); - String line; - while((line = br.readLine()) != null) { - System.out.println(line); - } - br.close(); - - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/services/HelloWorldWebService?wsdl"); - assertNotNull(definition); - // TODO - EPR - $promoted$ no longer used - //Service service = definition.getService(new QName("http://helloworld/HelloWorldService/$promoted$ep1", - // "HelloWorldService")); - Service service = definition.getService(new QName("http://helloworld/HelloWorldService/HelloWorld", - "HelloWorldService")); - Port port = service.getPort("HelloWorldSoapPort"); - - String endpoint = getEndpoint(port); - String ip = HttpUtils.getIpAddress(); - assertEquals("http://" + ip + ":8085/services/HelloWorldWebService", endpoint); - } - - /** - * Tests ?wsdl works and returns the correct port endpoint from binding.ws with a custom URI - */ - public void testCustomEndpoint() throws Exception { - InputStream inp = new URL("http://localhost:8085/foo/bar?wsdl").openStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(inp)); - String line; - while((line = br.readLine()) != null) { - System.out.println(line); - } - br.close(); - - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/foo/bar?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName("http://itests.axis2.ws.binding.sca.tuscany.apache.org/", - "HelloWorldService")); - Port port = service.getPort("HelloWorldPort"); - - String endpoint = getEndpoint(port); - String ip = HttpUtils.getIpAddress(); - assertEquals("http://" + ip + ":8085/foo/bar", endpoint); - } - - protected String getEndpoint(Port port) { - List wsdlPortExtensions = port.getExtensibilityElements(); - for (final Object extension : wsdlPortExtensions) { - if (extension instanceof SOAPAddress) { - return ((SOAPAddress) extension).getLocationURI(); - } - } - throw new RuntimeException("no SOAPAddress"); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite", new Contribution("test", contribution)); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java deleted file mode 100644 index 01abbd5382..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.oasisopen.sca.ServiceRuntimeException; - -/** - * This test verifies that the Endpoint URI specified in the wsdl takes precedence over the URI specified - * in binding. Ref: WS Binding Specification V1.00 - Section 2.1.1 - * - * @version $Rev$ $Date$ - */ -public class UriPrecedenceTestCase extends TestCase { - - private Node node; - private HelloWorldOM helloWorld; - - public void testUriPrecedence() throws Exception { - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-prec", "helloworld"); - OMElement parmE = fac.createOMElement("name", "http://helloworld-prec", "helloworld"); - requestOM.addChild(parmE); - parmE.addChild(fac.createOMText("petra")); - try { - OMElement responseOM = helloWorld.getGreetings(requestOM); - OMElement child = (OMElement)responseOM.getFirstElement(); - Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText()); - } catch (ServiceRuntimeException e) { - fail("Endpoint URI from wsdl did not take precedence over URI in binding."); - } - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite", new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java deleted file mode 100644 index a41e0fd2c9..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; -import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public abstract class AbstractHelloWorldOMTestCase extends TestCase { - - private Node node; - private HelloWorldOM helloWorld; - - public void testCalculator() throws Exception { - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld"); - OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld"); - requestOM.addChild(parmE); - parmE.addChild(fac.createOMText("petra")); - OMElement responseOM = helloWorld.getGreetings(requestOM); - OMElement child = (OMElement)responseOM.getFirstElement(); - Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText()); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - - protected String getCompositeName() { - String className = this.getClass().getName(); - return className.substring(0, className.length() - 8).replace('.', '/') + ".composite"; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java deleted file mode 100644 index 661afdddad..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints; - -public class DefaultMultiServiceTestCase extends AbstractHelloWorldOMTestCase { - // super class does it all getting composite based on this class name -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java deleted file mode 100644 index 9b2e0eafa0..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints; - -public class DefaultSingleServiceTestCase extends AbstractHelloWorldOMTestCase { - // super class does it all getting composite based on this class name -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java deleted file mode 100644 index 98d9a73926..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints; - -public class WSDLExplicitURITestCase extends AbstractHelloWorldOMTestCase { - // super class does it all getting composite based on this class name -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java deleted file mode 100644 index 201d11a79f..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints; - -public class WSDLRelativeURITestCase extends AbstractHelloWorldOMTestCase { - // super class does it all getting composite based on this class name -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java deleted file mode 100644 index 23dcd5ff6d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.epr; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class HelloWorldTestCase extends TestCase { - - private Node node; - private HelloWorld helloWorld; - - public void testCalculator() throws Exception { - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite", new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java deleted file mode 100644 index 5aefaac9ee..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java +++ /dev/null @@ -1,36 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
-
-import javax.activation.DataHandler;
-import org.oasisopen.sca.annotation.Reference;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * locate the FileTransfer service and invoke it.
- */
-public class FileTransferClient implements FileTransferService {
-
- @Reference
- public FileTransferService fileTransferWS;
-
- public String uploadFile(DataHandler attachment) throws Exception {
- return fileTransferWS.uploadFile(attachment);
- }
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java deleted file mode 100644 index f14229c541..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java +++ /dev/null @@ -1,81 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
-
-import javax.activation.DataHandler;
-import javax.activation.FileDataSource;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
-import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
-
-// Removed imports of old host.embedded function
-// import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- *
- * Modified by Mike Edwards, 4th Dec 2008, to adjust to new interfaces in the 2.0 stream.
- *
- */
-public class FileTransferMTOMTestCaseOFF extends TestCase {
-
- // private SCADomain domain;
- protected NodeLauncher launcher;
- protected Node node;
-
- public void testFileTransfer() throws Exception {
- // For testing purpose lets try uploading FileTransferClient.java file.
- DataHandler dataHandler = new DataHandler(new FileDataSource("FileTransferClient.java"));
- FileTransferService filetransfer = node.getService(FileTransferService.class, "FileTransferServiceComponent");
- assertEquals("File uploaded Sucessfully", filetransfer.uploadFile(dataHandler));
- }
-
- @Override
- protected void setUp() throws Exception {
- // domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite");
- // Tuscany specific code which starts the contribution holding the test
- launcher = NodeLauncher.newInstance();
- node = launcher.createNode("filetransferservice.composite", // testConfiguration.getComposite(),
- new Contribution("FileTransferMTOMTestCase", getContributionURI()));
- }
-
- @Override
- protected void tearDown() throws Exception {
- //domain.close();
- if (node != null) {
- node.stop();
- node.destroy();
- }
- if (launcher != null) {
- launcher.destroy();
- }
- }
-
- protected String getContributionURI() {
- Class<?> clazz = getClass();
- String location = ContributionLocationHelper.getContributionLocation(clazz);
- return location;
-
- } // end getContributionURI()
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java deleted file mode 100644 index 457e80ebdb..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java +++ /dev/null @@ -1,32 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
-
-import org.oasisopen.sca.annotation.Remotable;
-import javax.activation.DataHandler;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface FileTransferService {
-
- public String uploadFile(DataHandler attachment) throws Exception;
-}
-
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java deleted file mode 100644 index d947b0db0b..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
-
-import javax.activation.DataHandler;
-
-import org.oasisopen.sca.annotation.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(FileTransferService.class)
-public class FileTransferServiceImpl implements FileTransferService {
-
- public String uploadFile(DataHandler attachment) throws Exception {
-
- //OMText binaryNode = (OMText) (attachment.getFirstElement()).getFirstOMChild();
- //DataHandler dataHandler = (DataHandler) binaryNode.getDataHandler();
-
- // Use this code to save the file we have received.
- /*DataHandler dataHandler = attachment;
-
- File file = new File("transferedfile.java");
- FileOutputStream fileOutputStream = new FileOutputStream(file);
- dataHandler.writeTo(fileOutputStream);
- fileOutputStream.flush();
- fileOutputStream.close();*/
-
- System.out.println(attachment.getContentType());
-
- return "File uploaded Sucessfully";
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java deleted file mode 100644 index 8c1e6b68da..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo; - -//import java.io.Serializable; - -public class Data { - - private Data2[] a = null; - private int b = 0; - private float c = 0.0f; - - public Data2[] getA() { - return this.a; - } - - public void setA(Data2[] a) { - this.a = a; - } - - public int getB() { - return this.b; - } - - public void setB(int b) { - this.b = b; - } - - public float getC() { - return this.c; - } - - public void setC(float c) { - this.c = c; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java deleted file mode 100644 index 25954a0603..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo; - -public class Data2 { - - private String[] asdf = null; - - public String[] getAsdf() { - return this.asdf; - } - - public void setAsdf(String[] asdf) { - this.asdf = asdf; - } - - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java deleted file mode 100644 index 3dcbe0d6f2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.Test; - -public class POJOWSTestCase { - - @Test - public void testWS() throws Exception { - - String location = ContributionLocationHelper.getContributionLocation(TestService.class); - Contribution contrib = new Contribution("c1", location); - Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite", contrib); - node.start(); - -// try { -// System.out.println("Test server started (press enter to shutdown)"); -// System.in.read(); -// } -// catch (IOException e) { -// System.err.println(e); -// e.printStackTrace(); -// } - - node.stop(); - System.out.println("Test server stopped"); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java deleted file mode 100644 index c055d4909f..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo; - -import org.oasisopen.sca.annotation.Remotable; - - -@Remotable -public interface TestService { - - public boolean printData(Data data); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java deleted file mode 100644 index 4eec594a47..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo; - -import java.util.Arrays; - -import org.oasisopen.sca.annotation.Service; - -@Service(TestService.class) -public class TestServiceImpl implements TestService { - - public boolean printData(Data data) { - if (data == null) { - System.out.println("data is null"); - return false; - } - - StringBuilder sb = new StringBuilder(256); - sb.append("Data:\n"); - Data2[] a = data.getA(); - if (a != null) { - for (int i = 0; i < a.length; i++) { - sb.append(" a["); - sb.append(i); - sb.append("] = "); - sb.append(Arrays.asList(a[i].getAsdf())); - sb.append("\n"); - } - } else { - sb.append(" a = null"); - } - sb.append("\n b = "); - sb.append(data.getB()); - sb.append("\n c = "); - sb.append(data.getC()); - sb.append("\n"); - - System.out.println(sb.toString()); - - return true; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java deleted file mode 100644 index 9224baae29..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@javax.xml.bind.annotation.XmlSchema(namespace="http://test/server") -package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo; - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java deleted file mode 100644 index 351cb87760..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java +++ /dev/null @@ -1,70 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-public abstract class AbstractHelloWorldOMTestCaseOFF extends TestCase {
-
- private Node node;
- private HelloWorldOM helloWorld;
-
- public void testHelloWorld() throws Exception {
- OMFactory fac = OMAbstractFactory.getOMFactory();
- OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
- OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
- requestOM.addChild(parmE);
- parmE.addChild(fac.createOMText("petra"));
- OMElement responseOM = helloWorld.getGreetings(requestOM);
- OMElement child = (OMElement)responseOM.getFirstElement();
- Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
- }
-
- @Override
- protected void setUp() throws Exception {
- String contribution = ContributionLocationHelper.getContributionLocation(getClass());
- node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
- node.start();
- helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- node.destroy();
- }
-
- protected String getCompositeName() {
- String className = this.getClass().getName();
- return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java deleted file mode 100644 index 67d6f1c56e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- *
- * @version $Rev$ $Date$
- */
-public class ClientPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Client UserId/Password Handler .... ");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- pwcb.setPassword("TuscanyWsUserPasswd");
- }
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java deleted file mode 100644 index 45c5472100..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- *
- * @version $Rev$ $Date$
- */
-public class IntegrityPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Integrity Password Handler .... ");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- pwcb.setPassword("TuscanyWsUserPasswd");
- }
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java deleted file mode 100644 index 7a4b50cc2c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- *
- * @version $Rev$ $Date$
- */
-public class ServerPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Server User/Passwd Handler....");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- pwcb.setPassword("TuscanyWsUserPasswd");
- }
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java deleted file mode 100644 index 5ddfe359a5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java +++ /dev/null @@ -1,24 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-public class WSSecurityAuthenticationTestCaseFIXME extends AbstractHelloWorldOMTestCaseOFF {
- // super class does it all getting composite based on this class name
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java deleted file mode 100644 index 15eda714f0..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java +++ /dev/null @@ -1,42 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-import java.security.Provider;
-import java.security.Security;
-
-public class WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue extends AbstractHelloWorldOMTestCaseOFF {
-
- /**
- * @see org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.AbstractHelloWorldOMTestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception {
- // Workaround an issue with IBM JDK
- Provider jce = Security.getProvider("IBMJCE");
- if (jce != null) {
- // Make sure IBMJCE is used first
- Security.removeProvider("IBMJCE");
- Security.insertProviderAt(jce, 1);
- }
- super.setUp();
- }
- // super class does it all getting composite based on this class name
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java deleted file mode 100644 index fcb317013c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java +++ /dev/null @@ -1,24 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
-
-public class WSSecurityIntegrityTestCaseOFF extends AbstractHelloWorldOMTestCaseOFF {
- // super class does it all getting composite based on this class name
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java deleted file mode 100644 index a6223a3ccc..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed; - -import junit.framework.Assert; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; -import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public abstract class AbstractHelloWorldOMTestCaseOFF { - - private Node node; - private HelloWorldOM helloWorld; - - @Test - public void testHelloWorld() throws Exception { - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld"); - OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld"); - requestOM.addChild(parmE); - parmE.addChild(fac.createOMText("petra")); - OMElement responseOM = helloWorld.getGreetings(requestOM); - OMElement child = (OMElement)responseOM.getFirstElement(); - Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText()); - } - - @Before - public void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - - protected String getCompositeName() { - String className = this.getClass().getName(); - return className.substring(0, className.length() - 8).replace('.', '/') + ".composite"; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java deleted file mode 100644 index 88fc0d63fa..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - * - * @version $Rev$ $Date$ - */ -public class ClientPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Client UserId/Password Handler .... "); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - - System.out.println(" **** 1. UserId : " + pwcb.getIdentifer()); - System.out.println(" **** 2. Passwd : " + pwcb.getPassword()); - System.out.println(" **** 3. Usage : " + pwcb.getUsage()); - - pwcb.setPassword("TuscanyWsUserPasswd"); - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java deleted file mode 100644 index 0d8914156f..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - * - * @version $Rev$ $Date$ - */ -public class IntegrityPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Integrity Password Handler .... "); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - - System.out.println(" **** 1. UserId : " + pwcb.getIdentifer()); - System.out.println(" **** 2. Passwd : " + pwcb.getPassword()); - System.out.println(" **** 3. Usage : " + pwcb.getUsage()); - - pwcb.setPassword("TuscanyWsUserPasswd"); - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java deleted file mode 100644 index 5840f71057..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - * - * @version $Rev$ $Date$ - */ -public class ServerPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Server User/Passwd Handler...."); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println(" **** 1. UserId : " + pwcb.getIdentifer()); - System.out.println(" **** 2. Passwd : " + pwcb.getPassword()); - System.out.println(" **** 3. Usage : " + pwcb.getUsage()); - - pwcb.setPassword("TuscanyWsUserPasswd"); - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java deleted file mode 100644 index cdf96bdb58..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed; - -import org.junit.Ignore; - -@Ignore("Temporarily ignore rampart module validation failure") -public class WSSecurityMixedTestCase extends AbstractHelloWorldOMTestCaseOFF { - // super class does it all getting composite based on this class name -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java deleted file mode 100644 index 5f6824669a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java +++ /dev/null @@ -1,70 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-
-public abstract class AbstractHelloWorldOMTestCaseOFF extends TestCase {
-
- private Node node;
- private HelloWorldOM helloWorld;
-
- public void testHelloWorld() throws Exception {
- OMFactory fac = OMAbstractFactory.getOMFactory();
- OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
- OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
- requestOM.addChild(parmE);
- parmE.addChild(fac.createOMText("petra"));
- OMElement responseOM = helloWorld.getGreetings(requestOM);
- OMElement child = (OMElement)responseOM.getFirstElement();
- Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
- }
-
- @Override
- protected void setUp() throws Exception {
- String contribution = ContributionLocationHelper.getContributionLocation(getClass());
- node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
- node.start();
- helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- node.destroy();
- }
-
- protected String getCompositeName() {
- String className = this.getClass().getName();
- return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java deleted file mode 100644 index cf342653c7..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- *
- * @version $Rev$ $Date$
- */
-public class ClientPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Client UserId/Password Handler .... ");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- pwcb.setPassword("TuscanyWsUserPasswd");
- }
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java deleted file mode 100644 index 84b64d3902..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- *
- * @version $Rev$ $Date$
- */
-public class IntegrityPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Integrity Password Handler .... ");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- pwcb.setPassword("TuscanyWsUserPasswd");
- }
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java deleted file mode 100644 index 04825b6b56..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-/**
- * Sample userid passwd generation class
- *
- * @version $Rev$ $Date$
- */
-public class ServerPWCBHandler implements CallbackHandler {
-
- public void handle(Callback[] callbacks) throws IOException,
- UnsupportedCallbackException {
- for (int i = 0; i < callbacks.length; i++) {
- System.out.println("*** Calling Server User/Passwd Handler....");
- WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
- pwcb.setPassword("TuscanyWsUserPasswd");
- }
- }
-
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java deleted file mode 100644 index 355fa657f0..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java +++ /dev/null @@ -1,27 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import org.junit.Ignore;
-
-@Ignore("Temporarily ignore rampart module validation failure")
-public class WSSecurityAuthenticationTestCaseOFF extends AbstractHelloWorldOMTestCaseOFF {
- // super class does it all getting composite based on this class name
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java deleted file mode 100644 index 3d514e5624..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java +++ /dev/null @@ -1,42 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import java.security.Provider;
-import java.security.Security;
-
-public class WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue extends AbstractHelloWorldOMTestCaseOFF {
-
- /**
- * @see org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.AbstractHelloWorldOMTestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception {
- // Workaround an issue with IBM JDK
- Provider jce = Security.getProvider("IBMJCE");
- if (jce != null) {
- // Make sure IBMJCE is used first
- Security.removeProvider("IBMJCE");
- Security.insertProviderAt(jce, 1);
- }
- super.setUp();
- }
- // super class does it all getting composite based on this class name
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java deleted file mode 100644 index 6a5ff8e231..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java +++ /dev/null @@ -1,27 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
-
-import org.junit.Ignore;
-
-@Ignore("Temporarily ignore rampart module validation failure")
-public class WSSecurityIntegrityTestCaseOFF extends AbstractHelloWorldOMTestCaseOFF {
- // super class does it all getting composite based on this class name
-}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java deleted file mode 100644 index 45c0a6932a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.soap12 ; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class HelloWorldSOAP12TestCaseOFF extends TestCase { - - private Node node; - - public void testHelloWorld() throws Exception { - HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClient"); - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - public void testHelloWorldSOAP() throws Exception { - HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP"); - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - public void testHelloWorldSOAP11() throws Exception { - HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP11"); - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - public void testHelloWorldSOAP12() throws Exception { - HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP12"); - assertEquals("Hello petra", helloWorld.getGreetings("petra")); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite", new Contribution("test", contribution)); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java deleted file mode 100644 index c74ffee695..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.axis2.itests.soap12; - -import java.util.List; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.axis2.transport.http.server.HttpUtils; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * Test ?wsdl works and that the returned WSDL has the correct endpoint - * - * @version $Rev$ $Date$ - */ -public class QuestionMarkWSDLTestCaseOFF extends TestCase { - - private static boolean newGenerator = true; - private Node node; - - /** - * Tests ?wsdl returns a soap 1.1 port by default - */ - public void testSOAPDefault() throws Exception { - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/ep1?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName( - "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""), - newGenerator ? "HelloWorldService" : "HelloWorld")); - Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http"); - - String endpoint = getSOAP11Endpoint(port); - String ip = HttpUtils.getIpAddress(); - assertEquals("http://" + ip + ":8085/ep1", endpoint); - } - - /** - * Tests ?wsdl returns a soap 1.1 port when binding uses requires="SOAP.1_1" - */ - public void testSOAP11Endpoint() throws Exception { - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/ep2?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName( - "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""), - newGenerator ? "HelloWorldService" : "HelloWorld")); - Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http"); - - String endpoint = getSOAP11Endpoint(port); - String ip = HttpUtils.getIpAddress(); - assertEquals("http://" + ip + ":8085/ep2", endpoint); - } - - /** - * Tests ?wsdl returns a soap 1.2 port when binding uses requires="SOAP.1_2" - */ - public void testSOAP12Endpoint() throws Exception { - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/ep3?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName( - "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""), - newGenerator ? "HelloWorldService" : "HelloWorld")); - Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP12port_http"); - - String endpoint = getSOAP12Endpoint(port); - String ip = HttpUtils.getIpAddress(); - assertEquals("http://" + ip + ":8085/ep3", endpoint); - } - - protected String getSOAP11Endpoint(Port port) { - List wsdlPortExtensions = port.getExtensibilityElements(); - for (final Object extension : wsdlPortExtensions) { - if (extension instanceof SOAPAddress) { - return ((SOAPAddress) extension).getLocationURI(); - } - } - throw new RuntimeException("no SOAPAddress"); - } - - protected String getSOAP12Endpoint(Port port) { - List wsdlPortExtensions = port.getExtensibilityElements(); - for (final Object extension : wsdlPortExtensions) { - if (extension instanceof SOAP12Address) { - return ((SOAP12Address) extension).getLocationURI(); - } - } - throw new RuntimeException("no SOAPAddress"); - } - - @Override - protected void setUp() throws Exception { - String contribution = ContributionLocationHelper.getContributionLocation(getClass()); - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite", new Contribution("test", contribution)); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - node.destroy(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index 9f9d98d861..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures
-# handler classname;qname=<policy intent addressed>;model=<policy model class>
-org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicyHandler;intent=http://tuscany.apache.org/xmlns/sca/1.1#wsAuthentication,model=org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite deleted file mode 100644 index 061b68450c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorld">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
- <service name="HelloWorld">
- <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)">
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/services/HelloWorldWebService</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
- </reference>
- </component>
-
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite deleted file mode 100644 index 992d4463de..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorldNoWSDL">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
- <service name="HelloWorld" >
- <binding.ws uri="http://localhost:8085/helloWorld"/>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS" >
- <binding.ws uri="http://localhost:8085/helloWorld"/>
- </reference>
- </component>
-
- <component name="EchoService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.EchoImpl"/>
- <service name="Echo">
- <binding.ws uri="http://localhost:8085/Echo"/>
- </service>
- </component>
-
- <component name="EchoComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.EchoComponent"/>
- <reference name="echoWS">
- <binding.ws uri="http://localhost:8085/Echo"/>
- </reference>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd deleted file mode 100644 index f09ed09b6a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<xsd:schema elementFormDefault="qualified"
- targetNamespace="http://accounts"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="CustomerProfileData">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string" />
- <xsd:element name="lastName" type="xsd:string" />
- <xsd:element name="address" type="xsd:string" />
- <xsd:element name="email" type="xsd:string" />
- <xsd:element name="loginID" type="xsd:string" />
- <xsd:element name="password" type="xsd:string" />
- <xsd:element name="id" type="xsd:int" />
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd deleted file mode 100644 index ec67b84851..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<xsd:schema elementFormDefault="qualified"
- targetNamespace="http://accounts"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:include schemaLocation="customerdata.xsd" />
- <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd" />
-
-</xsd:schema>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd deleted file mode 100644 index 7c903c6394..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<xsd:schema elementFormDefault="qualified"
- targetNamespace="http://accounts"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="CustomerProfileInfo">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string" />
- <xsd:element name="lastName" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite deleted file mode 100644 index 0c5646e888..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint1">
-
- <!--
- exposing a component which has multiple services with a WS binding,
- endpoint should be <componentURI>/<serviceName> so for this composite:
- http://localhost:8085/HelloWorldService/service1
- -->
-
-
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldMultiService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"
- wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/HelloWorldService/helloWorld"/>
- </reference>
- </component>
-
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite deleted file mode 100644 index 5778f98593..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint1">
-
- <!--
- exposing a component with a WS binding, endpoint should be <componentURI>/<serviceName>
- unless the component has just a single service in which case its just <componentURI>
- so for this composite: http://localhost:8085/HelloWorldService
- -->
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"
- wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/HelloWorldService/helloWorld"/>
- </reference>
- </component>
-
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite deleted file mode 100644 index 990093bc8c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
- </component>
-
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite deleted file mode 100644 index ea598f8e23..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint4">
-
- <!--
- exposing a component with a WS binding using a WSDL port with a relative URL
- so for this composite the service is: http://localhost:8085/HelloWorldService/myRelativeURI
- -->
-
-
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-om-relative-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-relative-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-om-relative-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-relative-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/HelloWorldService/helloWorld/myRelativeURI"/>
- </reference>
- </component>
-
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl deleted file mode 100644 index fe68755c47..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld-om-relative-uri" xmlns:tns="http://helloworld-om-relative-uri" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld-om"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-relative-uri" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/HelloWorldService/helloWorld/myRelativeURI"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite deleted file mode 100644 index ef012f1803..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorld">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
- <service name="HelloWorld">
- <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
- <binding.ws>
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/myService</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS">
- <binding.ws>
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/myService</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- </reference>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl deleted file mode 100644 index 7bf47bc412..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld-om-merged" xmlns:tns="http://helloworld-om-merged" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld-om-bindings"> - - <wsdl:import namespace="http://helloworld-om-merged" - location="helloworld-om-porttype.wsdl"/> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://endpoint.not.used"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite deleted file mode 100644 index 023f392085..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorldOM-Merged">
-
-
- <component name="HelloWorldMergedService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
- </service>
- </component>
-
- <component name="HelloWorldWSDLMergedComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld" />
- </reference>
- </component>
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl deleted file mode 100644 index c66fa51c34..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions targetNamespace="http://helloworld-om-merged" xmlns:tns="http://helloworld-om-merged" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld-om-porttype">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-merged" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- </schema>
- </wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <wsdl:part element="tns:getGreetings" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
- </wsdl:operation>
- </wsdl:portType>
-
-</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl deleted file mode 100644 index baa223f41c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld-om-uri" xmlns:tns="http://helloworld-om-uri" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld-om"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-uri" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/myExplicitURI"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite deleted file mode 100644 index ccd3082f88..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorldOM">
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld" />
- </reference>
- </component>
-
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl deleted file mode 100644 index 73ca02246d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld-om" xmlns:tns="http://helloworld-om" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld-om"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://endpoint.not.used"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite deleted file mode 100644 index 91175c476c..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<!-- $Rev$ $Date$ -->
-
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorldPrec">
-
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- <service name="HelloWorldOM">
- <interface.wsdl interface="http://helloworld-prec#wsdl.interface(HelloWorld)" />
- <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
- </service>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS">
- <interface.wsdl interface="http://helloworld-prec#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-prec#wsdl.port(HelloWorldService/HelloWorldSoapPort)"
- uri="http://INVALID.END.POINT" />
- </reference>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl deleted file mode 100644 index 5908c43e7d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> - -<!-- $Rev$ $Date$ --> - -<wsdl:definitions targetNamespace="http://helloworld-prec" xmlns:tns="http://helloworld-prec" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld-prec"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld-prec" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/HelloWorldService/helloWorld"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl deleted file mode 100644 index 1a2272d7ee..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/> - </wsdl:port> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2"> - <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/> - </wsdl:port> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3"> - <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl deleted file mode 100644 index 1c67a1b26a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions
- targetNamespace="http://filetransfer"
- xmlns:tns="http://filetransfer"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="filetransfer">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="uploadFile">
- <complexType>
- <sequence>
- <element name="attachment" type="xsd:base64Binary"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="uploadFileResponse">
- <complexType>
- <sequence>
- <element name="uploadFileReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- </schema>
- </wsdl:types>
-
- <wsdl:message name="uploadFileRequest">
- <wsdl:part element="tns:uploadFile" name="parameters"/>
- </wsdl:message>
-
- <wsdl:message name="uploadFileResponse">
- <wsdl:part element="tns:uploadFileResponse" name="parameters"/>
- </wsdl:message>
-
- <wsdl:portType name="FileTransfer">
- <wsdl:operation name="uploadFile">
- <wsdl:input message="tns:uploadFileRequest" name="uploadFileRequest"/>
- <wsdl:output message="tns:uploadFileResponse" name="uploadFileResponse"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="FileTransferSoapBinding" type="tns:FileTransfer">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="uploadFile">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="uploadFileRequest">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="uploadFileResponse">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="FileTransferService">
- <wsdl:port binding="tns:FileTransferSoapBinding" name="FileTransferSoapPort">
- <wsdlsoap:address location="http://localhost:8085/FileTransferServiceComponent"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF deleted file mode 100644 index 3dcef5ab46..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://filetransfer"
- xmlns:hw="http://filetransfer"
- name="filetransferws">
-
- <component name="FileTransferServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferServiceImpl" />
- <service name="FileTransferService">
- <interface.wsdl interface="http://filetransfer#wsdl.interface(FileTransfer)" />
- <binding.ws uri="http://localhost:8085/FileTransferService"/>
- </service>
- </component>
-
- <component name="FileTransferClientComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferClient"/>
- <reference name="fileTransferWS" />
- </component>
-
- <reference name="fileTransferWS" promote="FileTransferClientComponent/fileTransferWS">
- <binding.ws uri="http://localhost:8085/FileTransferService"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite deleted file mode 100644 index d1f0cc1ff5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://test"
- xmlns:hw="http://helloworld"
- name="test">
- <component name="TestServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.pojo.TestServiceImpl" />
- <service name="TestService">
- <interface.java interface="org.apache.tuscany.sca.binding.ws.axis2.itests.pojo.TestService" />
- <binding.ws uri="http://localhost:8085/testService"/>
- </service>
- </component>
-</composite>
-
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF deleted file mode 100644 index 60673ab103..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
- <service name="helloWorld" promote="HelloWorldService" requires="authentication">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="tuscany:wsClientAuthenticationPolicy">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF deleted file mode 100644 index bc3107c388..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
- <service name="helloWorld" promote="HelloWorldService" requires="confidentiality">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" requires="confidentiality">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF deleted file mode 100644 index ae07495cf3..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
- <service name="helloWorld" promote="HelloWorldService" requires="integrity">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" requires="integrity">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml deleted file mode 100644 index 1eadd01b81..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
-
- <!-- WS Security POLICY SETS -->
- <sca:policySet name="wsAuthenticationPolicy"
- provides="sca:authentication"
- appliesTo="//sca:binding.ws"
- >
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>UsernameToken</items>
- <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.ServerPWCBHandler</passwordCallbackClass>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
- <sca:policySet name="wsClientAuthenticationPolicy"
- provides="tuscany:wsAuthentication"
- appliesTo="//sca:binding.ws">
- <tuscany:wsConfigParam>
- <parameter name="OutflowSecurity">
- <action>
- <items>UsernameToken</items>
- <user>TuscanyWsUser</user>
- <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.ClientPWCBHandler</passwordCallbackClass>" +
- <passwordType>PasswordText</passwordType>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
- <sca:policySet name="wsIntegrityPolicy"
- provides="sca:integrity"
- appliesTo="//sca:binding.ws">
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>Timestamp Signature</items>
- <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
- </action>
- </parameter>
- <parameter name="OutflowSecurity">
- <action>
- <items>Timestamp Signature</items>
- <user>TuscanyWsUser</user>
- <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
- <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.IntegrityPWCBHandler</passwordCallbackClass>" +
- <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
- <sca:policySet name="wsConfidentialityPolicy"
- provides="sca:confidentiality"
- appliesTo="//sca:binding.ws">
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>Timestamp Signature Encrypt</items>
- <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.IntegrityPWCBHandler</passwordCallbackClass>
- <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
- </action>
- </parameter>
- <parameter name="OutflowSecurity">
- <action>
- <items>Timestamp Signature Encrypt</items>
- <user>TuscanyWsUser</user>
- <encryptionUser>TuscanyWsUser</encryptionUser>
- <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.IntegrityPWCBHandler</passwordCallbackClass>
- <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
- <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
- <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
- </sca:definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties deleted file mode 100644 index 592edf183b..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties +++ /dev/null @@ -1,20 +0,0 @@ -## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
-org.apache.ws.security.crypto.merlin.keystore.type=jks
-org.apache.ws.security.crypto.merlin.keystore.password=TuscanyWsUserPasswd
-org.apache.ws.security.crypto.merlin.file=org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks Binary files differdeleted file mode 100644 index 307edb9b37..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks +++ /dev/null diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml deleted file mode 100644 index 778fb96128..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
-
- <sca:intent name="wsAuthentication"
- constrains="sca:binding.ws">
- <description>
- Communitcation thro this binding required Authentication.
- </description>
- </sca:intent>
-
- </sca:definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF deleted file mode 100644 index 712948c77a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2" - name="endpoint3"> - - <!-- - exposing a component with a WS binding using a WSDL port with an explicit URL - so for this composite the service is: http://localhost:8085/myExplicitURI - --> - - <service name="helloWorld" promote="HelloWorldService" - policySets="tuscany:serverWsPolicyForAuthentication"> - <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" /> - <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" /> - </service> - - <component name="HelloWorldService"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/> - </component> - - <component name="HelloWorldComponent"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/> - <reference name="helloWorldWS" /> - </component> - - <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" - policySets="tuscany:clientWsPolicyForAuthentication"> - <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" /> - <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)" - uri="http://localhost:8085/myExplicitURI"/> - </reference> - -</composite> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml deleted file mode 100644 index fb08fee447..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml +++ /dev/null @@ -1,323 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> - - <!-- WS Security POLICY SETS --> - <sca:policySet name="wsAuthenticationPolicy" - provides="sca:authentication" - appliesTo="//sca:binding.ws" - > - <tuscany:wsConfigParam> - <parameter name="InflowSecurity"> - <action> - <items>UsernameToken</items> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</passwordCallbackClass> - </action> - </parameter> - </tuscany:wsConfigParam> - </sca:policySet> - - <sca:policySet name="wsClientAuthenticationPolicy" - provides="tuscany:wsAuthentication" - appliesTo="//sca:binding.ws"> - <tuscany:wsConfigParam> - <parameter name="OutflowSecurity"> - <action> - <items>UsernameToken</items> - <user>TuscanyWsUser</user> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ClientPWCBHandler</passwordCallbackClass>" + - <passwordType>PasswordText</passwordType> - </action> - </parameter> - </tuscany:wsConfigParam> - </sca:policySet> - - <sca:policySet name="wsMixedReceiverIntegrityPolicy" - provides="sca:integrity" - appliesTo="//sca:binding.ws"> - <tuscany:wsConfigParam> - <parameter name="InflowSecurity"> - <action> - <items>Signature</items> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile> - </action> - </parameter> - </tuscany:wsConfigParam> - </sca:policySet> - - <sca:policySet name="wsMixedSenderIntegrityPolicy" - provides="sca:integrity" - appliesTo="//sca:binding.ws"> - <tuscany:wsConfigParam> - <parameter name="OutflowSecurity"> - <action> - <items>Signature</items> - <user>TuscanyWsUser</user> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.IntegrityPWCBHandler</passwordCallbackClass> - <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier> - </action> - </parameter> - </tuscany:wsConfigParam> - </sca:policySet> - - <sca:policySet name="wsServerAuthenticationIntegrityPolicy" - provides="sca:authentication sca:integrity" - appliesTo="//sca:binding.ws" - > - <tuscany:wsConfigParam> - <parameter name="InflowSecurity"> - <action> - <items>UsernameToken Signature</items> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</passwordCallbackClass> - </action> - </parameter> - <parameter name="OutflowSecurity"> - <action> - <items>Signature</items> - <user>TuscanyWsUser</user> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</passwordCallbackClass> - <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier> - </action> - </parameter> - </tuscany:wsConfigParam> - </sca:policySet> - - <sca:policySet name="wsClientAuthenticationIntegrityPolicy" - provides="tuscany:wsAuthentication" - appliesTo="//sca:binding.ws"> - <tuscany:wsConfigParam> - <parameter name="InflowSecurity"> - <action> - <items>Signature</items> - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile> - </action> - </parameter> - <parameter name="OutflowSecurity"> - <action> - <items>UsernameToken Signature</items> - <user>TuscanyWsUser</user> - <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ClientPWCBHandler</passwordCallbackClass>" + - <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile> - <passwordType>PasswordText</passwordType> - <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier> - </action> - </parameter> - </tuscany:wsConfigParam> - </sca:policySet> - - <sca:policySet name="clientWsPolicyForAuthentication" - provides="sca:authentication" - appliesTo="//sca:binding.ws" - > - <wsp:Policy wsu:Id="UTOverTransport" - xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" /> - </wsp:Policy> - </sp:SignedSupportingTokens> - - <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> - <ramp:user>TuscanyWsUser</ramp:user> - <!-- ramp:passwordType>PasswordText</ramp:passwordType--> - <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ClientPWCBHandler</ramp:passwordCallbackClass> - </ramp:RampartConfig> - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> - </sca:policySet> - - <sca:policySet name="serverWsPolicyForAuthentication" - provides="sca:authentication" - appliesTo="//sca:binding.ws" - > - <wsp:Policy wsu:Id="UTOverTransport" - xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" /> - </wsp:Policy> - </sp:SignedSupportingTokens> - - <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> - <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</ramp:passwordCallbackClass> - </ramp:RampartConfig> - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> - </sca:policySet> - - <!-- A policyset that uses WS Policy --> - <sca:policySet name="serverWsPolicyForIntegrity" - provides="sca:integrity" - appliesTo="//sca:binding.ws"> - <wsp:Policy wsu:Id="SignOnly" - xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:InitiatorToken> - <wsp:Policy> - <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> - <wsp:Policy> - <sp:WssX509V3Token10/> - </wsp:Policy> - </sp:X509Token> - </wsp:Policy> - </sp:InitiatorToken> - <sp:RecipientToken> - <wsp:Policy> - <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"> - <wsp:Policy> - <sp:WssX509V3Token10/> - </wsp:Policy> - </sp:X509Token> - </wsp:Policy> - </sp:RecipientToken> - <sp:AlgorithmSuite> - <wsp:Policy> - <sp:TripleDesRsa15/> - </wsp:Policy> - </sp:AlgorithmSuite> - <sp:Layout> - <wsp:Policy> - <sp:Strict/> - </wsp:Policy> - </sp:Layout> - <sp:IncludeTimestamp/> - <sp:OnlySignEntireHeadersAndBody/> - </wsp:Policy> - </sp:AsymmetricBinding> - <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:MustSupportRefKeyIdentifier/> - <sp:MustSupportRefIssuerSerial/> - </wsp:Policy> - </sp:Wss10> - <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <sp:Body/> - </sp:SignedParts> - - <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> - <ramp:user>TuscanyWsUser</ramp:user> - <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser> - <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.IntegrityPWCBHandler</ramp:passwordCallbackClass> - - <ramp:signatureCrypto> - <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin"> - <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property> - <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property> - <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property> - </ramp:crypto> - </ramp:signatureCrypto> - </ramp:RampartConfig> - - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> - </sca:policySet> - - - <!-- A policyset that uses WS Policy --> - <!-- sca:policySet name="tuscany:wsSecurityPolicyForIntegritys" - provides="sca:integrity" - appliesTo="sca:binding.ws"> - <wsp:Policy wsu:Id="SignOnly" - xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:InitiatorToken> - <wsp:Policy> - <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> - <wsp:Policy> - <sp:WssX509V3Token10/> - </wsp:Policy> - </sp:X509Token> - </wsp:Policy> - </sp:InitiatorToken> - <sp:RecipientToken> - <wsp:Policy> - <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"> - <wsp:Policy> - <sp:WssX509V3Token10/> - </wsp:Policy> - </sp:X509Token> - </wsp:Policy> - </sp:RecipientToken> - <sp:AlgorithmSuite> - <wsp:Policy> - <sp:TripleDesRsa15/> - </wsp:Policy> - </sp:AlgorithmSuite> - <sp:Layout> - <wsp:Policy> - <sp:Strict/> - </wsp:Policy> - </sp:Layout> - <sp:IncludeTimestamp/> - <sp:OnlySignEntireHeadersAndBody/> - </wsp:Policy> - </sp:AsymmetricBinding> - <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:MustSupportRefKeyIdentifier/> - <sp:MustSupportRefIssuerSerial/> - </wsp:Policy> - </sp:Wss10> - <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <sp:Body/> - </sp:SignedParts> - - <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> - <ramp:user>TuscanyWsUser</ramp:user> - <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser> - <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.IntegrityPWCBHandler</ramp:passwordCallbackClass> - - <ramp:signatureCrypto> - <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin"> - <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property> - <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks</ramp:property> - <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property> - </ramp:crypto> - </ramp:signatureCrypto> - </ramp:RampartConfig> - - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> - </sca:policySet--> - </sca:definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties deleted file mode 100644 index cb188e6676..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties +++ /dev/null @@ -1,20 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=TuscanyWsUserPasswd -org.apache.ws.security.crypto.merlin.file=org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks Binary files differdeleted file mode 100644 index 307edb9b37..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks +++ /dev/null diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF deleted file mode 100644 index 780130e699..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
- <service name="helloWorld" promote="HelloWorldService" policySets="tuscany:wsSecurityPolicyForAuthentication">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="tuscany:wsSecurityPolicyForAuthentication">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF deleted file mode 100644 index dd0a102476..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
- <service name="helloWorld" promote="HelloWorldService" policySets="wsSecurityPolicyForConfidentiality">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="wsSecurityPolicyForConfidentiality">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF deleted file mode 100644 index 904c0b469e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="endpoint3">
-
- <!--
- exposing a component with a WS binding using a WSDL port with an explicit URL
- so for this composite the service is: http://localhost:8085/myExplicitURI
- -->
-
- <service name="helloWorld" promote="HelloWorldService" policySets="tuscany:wsSecurityPolicyForIntegrity">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
- </component>
-
- <component name="HelloWorldComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="tuscany:wsSecurityPolicyForIntegrity">
- <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
- uri="http://localhost:8085/myExplicitURI"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml deleted file mode 100644 index 12f4a6febd..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml +++ /dev/null @@ -1,203 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
-
- <!-- WS Security POLICY SETS -->
- <!-- A policyset that uses WS Policy -->
- <sca:policySet name="wsSecurityPolicyForAuthentication"
- provides="sca:authentication"
- appliesTo="sca:binding.ws">
- <wsp:Policy wsu:Id="UTOverTransport"
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
- </wsp:Policy>
- </sp:SignedSupportingTokens>
-
- <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- <ramp:user>TuscanyWsUser</ramp:user>
- <ramp:passwordType>PasswordText</ramp:passwordType>
- <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.ClientPWCBHandler</ramp:passwordCallbackClass>
- </ramp:RampartConfig>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- </sca:policySet>
-
- <!-- A policyset that uses WS Policy -->
- <sca:policySet name="wsSecurityPolicyForIntegrity"
- provides="sca:integrity"
- appliesTo="sca:binding.ws">
- <wsp:Policy wsu:Id="SignOnly"
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:InitiatorToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:InitiatorToken>
- <sp:RecipientToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:RecipientToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:TripleDesRsa15/>
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Strict/>
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp/>
- <sp:OnlySignEntireHeadersAndBody/>
- </wsp:Policy>
- </sp:AsymmetricBinding>
- <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:MustSupportRefKeyIdentifier/>
- <sp:MustSupportRefIssuerSerial/>
- </wsp:Policy>
- </sp:Wss10>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body/>
- </sp:SignedParts>
-
- <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- <ramp:user>TuscanyWsUser</ramp:user>
- <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
- <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.IntegrityPWCBHandler</ramp:passwordCallbackClass>
-
- <ramp:signatureCrypto>
- <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
- </ramp:crypto>
- </ramp:signatureCrypto>
- </ramp:RampartConfig>
-
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- </sca:policySet>
-
- <!-- A policyset that uses WS Policy -->
- <sca:policySet name="wsSecurityPolicyForConfidentiality"
- provides="sca:confidentiality"
- appliesTo="sca:binding.ws">
- <wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:InitiatorToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:InitiatorToken>
- <sp:RecipientToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
- <wsp:Policy>
- <sp:WssX509V3Token10/>
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:RecipientToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:TripleDesRsa15/>
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Strict/>
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp/>
- <sp:OnlySignEntireHeadersAndBody/>
- </wsp:Policy>
- </sp:AsymmetricBinding>
- <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:MustSupportRefKeyIdentifier/>
- <sp:MustSupportRefIssuerSerial/>
- </wsp:Policy>
- </sp:Wss10>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body/>
- </sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body/>
- </sp:EncryptedParts>
-
- <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- <ramp:user>TuscanyWsUser</ramp:user>
- <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
- <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.IntegrityPWCBHandler</ramp:passwordCallbackClass>
- <ramp:signatureCrypto>
- <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
- </ramp:crypto>
- </ramp:signatureCrypto>
-
- <ramp:encryptionCypto>
- <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
- <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
- </ramp:crypto>
- </ramp:encryptionCypto>
- </ramp:RampartConfig>
-
- </wsp:All>
- </wsp:ExactlyOne>
-</wsp:Policy>
- </sca:policySet>
-
- </sca:definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks Binary files differdeleted file mode 100644 index 307edb9b37..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks +++ /dev/null diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl deleted file mode 100644 index 41a491361f..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions targetNamespace="http://account3"
- xmlns:tns="http://account3"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="questionmark-import-nested">
-
- <wsdl:types>
- <xsd:schema elementFormDefault="qualified"
- targetNamespace="http://account3"
- xmlns:account="http://accounts"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:import namespace="http://accounts" schemaLocation="customerdefs.xsd" />
-
- <xsd:element name="getCustomerProfile">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="loginID" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="getCustomerProfileResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="customerProfile"
- type="account:CustomerProfileData" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- </xsd:schema>
- </wsdl:types>
-
- <wsdl:message name="getCustomerProfileRequest">
- <wsdl:part element="tns:getCustomerProfile" name="parameters" />
- </wsdl:message>
-
- <wsdl:message name="getCustomerProfileResponse">
- <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" />
- </wsdl:message>
-
- <wsdl:portType name="Account">
- <wsdl:operation name="getCustomerProfile">
- <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" />
- <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" />
- </wsdl:operation>
- </wsdl:portType>
-
-</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl deleted file mode 100644 index 99a8c6d81d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://account2" - xmlns:tns="http://account2" - xmlns:account3="http://account3" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="questionmark-import"> - - <wsdl:import namespace="http://account3" location="/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl" /> - - <wsdl:binding name="AccountSoapBinding" type="account3:Account"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getCustomerProfile"> - <wsdlsoap:operation soapAction="" /> - <wsdl:input name="getCustomerProfileRequest"> - <wsdlsoap:body use="literal" /> - </wsdl:input> - <wsdl:output name="getCustomerProfileResponse"> - <wsdlsoap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="AccountService"> - <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort"> - <wsdlsoap:address location="http://localhost:8086/AccountService" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl deleted file mode 100644 index 80e4b62801..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://accounts" - xmlns:tns="http://accounts" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="questionmark-include"> - - <wsdl:types> - <xsd:schema elementFormDefault="qualified" - targetNamespace="http://accounts" - xmlns:account="http://accounts" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd" /> - - <xsd:element name="getCustomerProfile"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="loginID" type="xsd:string" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - - <xsd:element name="getCustomerProfileResponse"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="customerProfile" - type="xsd:string" /> - <!-- - <xsd:element name="customerProfile" - type="account:CustomerProfileData" /> - --> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - - </xsd:schema> - </wsdl:types> - - <wsdl:message name="getCustomerProfileRequest"> - <wsdl:part element="tns:getCustomerProfile" name="parameters" /> - </wsdl:message> - - <wsdl:message name="getCustomerProfileResponse"> - <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" /> - </wsdl:message> - - <wsdl:portType name="Account"> - <wsdl:operation name="getCustomerProfile"> - <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" /> - <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" /> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="AccountSoapBinding" type="tns:Account"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getCustomerProfile"> - <wsdlsoap:operation soapAction="" /> - <wsdl:input name="getCustomerProfileRequest"> - <wsdlsoap:body use="literal" /> - </wsdl:input> - <wsdl:output name="getCustomerProfileResponse"> - <wsdlsoap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="AccountService"> - <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort"> - <wsdlsoap:address location="http://localhost:8085/AccountService" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite deleted file mode 100644 index a8fd8d4d5d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="QuestionMarkWSDLImport">
-
- <component name="AccountService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.AccountService" />
- <service name="Account">
- <binding.ws wsdlElement="http://account2#wsdl.port(AccountService/AccountSoapPort)" />
- </service>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite deleted file mode 100644 index d795329db0..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="QuestionMarkWSDLInclude">
-
- <component name="AccountService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.AccountService" />
- <service name="Account" promote="AccountService">
- <binding.ws wsdlElement="http://accounts#wsdl.port(AccountService/AccountSoapPort)" />
- </service>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite deleted file mode 100644 index 3ed8b206a7..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2" - name="QuestionMarkWSDLTests"> - - <component name="HelloWorldService"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/> - <service name="HelloWorld"> - <binding.ws name="ep1" uri="http://localhost:8085/foo/bar" /> - <binding.ws name="ep2" wsdlElement="http://helloworld#wsdl.service(HelloWorldService)"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF deleted file mode 100644 index f7caa55fce..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="HelloWorld">
-
- <service name="helloWorld" promote="HelloWorldService">
- <binding.ws uri="http://localhost:8085/helloWorld"/>
- </service>
- <service name="helloWorldSOAP" promote="HelloWorldService">
- <binding.ws requires="SOAP" uri="http://localhost:8085/helloWorldSOAP"/>
- </service>
- <service name="helloWorldSOAP11" promote="HelloWorldService">
- <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/helloWorldSOAP11"/>
- </service>
- <service name="helloWorldSOAP12" promote="HelloWorldService">
- <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/helloWorldSOAP12"/>
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
- </component>
-
- <component name="HelloWorldClient">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS" />
- </component>
- <component name="HelloWorldClientSOAP">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS" />
- </component>
- <component name="HelloWorldClientSOAP11">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS" />
- </component>
- <component name="HelloWorldClientSOAP12">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
- <reference name="helloWorldWS" />
- </component>
-
- <reference name="helloWorldWS" promote="HelloWorldClient/helloWorldWS">
- <binding.ws uri="http://localhost:8085/helloWorld"/>
- </reference>
- <reference name="helloWorldWS" promote="HelloWorldClientSOAP/helloWorldWS">
- <binding.ws uri="http://localhost:8085/helloWorldSOAP" requires="SOAP"/>
- </reference>
- <reference name="helloWorldWS" promote="HelloWorldClientSOAP11/helloWorldWS">
- <binding.ws uri="http://localhost:8085/helloWorldSOAP11" requires="SOAP.1_1"/>
- </reference>
- <reference name="helloWorldWS" promote="HelloWorldClientSOAP12/helloWorldWS">
- <binding.ws uri="http://localhost:8085/helloWorldSOAP12" requires="SOAP.1_2"/>
- </reference>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF deleted file mode 100644 index 6118743da3..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="QuestionMarkWSDLTests">
-
- <service name="ep1" promote="HelloWorldService">
- <binding.ws uri="http://localhost:8085/ep1"/>
- </service>
-
- <service name="ep2" promote="HelloWorldService">
- <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/ep2"/>
- </service>
-
- <service name="ep3" promote="HelloWorldService">
- <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/ep3"/>
- </service>
-
- <component name="HelloWorldService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/LICENSE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/META-INF/MANIFEST.MF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/META-INF/MANIFEST.MF deleted file mode 100644 index 1016f2f40a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/META-INF/MANIFEST.MF +++ /dev/null @@ -1,60 +0,0 @@ -Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.binding.ws.wsdlgen;uses:="org.a
- pache.tuscany.sca.databinding,org.apache.tuscany.sca.interfacedef.uti
- l,org.apache.tuscany.sca.core,org.apache.tuscany.sca.policy,javax.wsd
- l.extensions.schema,javax.xml.namespace,javax.wsdl.xml,javax.wsdl.ext
- ensions,org.apache.tuscany.sca.contribution.resolver,org.oasisopen.sca,org
- .apache.ws.commons.schema,javax.wsdl.factory,org.apache.tuscany.sca.a
- ssembly,javax.wsdl.extensions.soap,javax.xml.parsers,org.apache.tusca
- ny.sca.monitor,org.apache.tuscany.sca.interfacedef.java,org.apache.tu
- scany.sca.interfacedef,org.w3c.dom,javax.wsdl,org.apache.tuscany.sca.
- binding.ws,javax.wsdl.extensions.soap12,org.apache.tuscany.sca.databi
- nding.jaxb,org.apache.tuscany.sca.interfacedef.wsdl,org.apache.ws.com
- mons.schema.utils,org.apache.tuscany.sca.xsd";version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: Apache Tuscany SCA Web Service binding WSDL Generator
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: 2.0.0
-Bnd-LastModified: 1225397303515
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA Web Service binding WSDL Genera
- tor
-Import-Package: javax.jws;resolution:=optional,
- javax.wsdl,
- javax.wsdl.extensions,
- javax.wsdl.extensions.schema,
- javax.wsdl.extensions.soap,
- javax.wsdl.extensions.soap12,
- javax.wsdl.factory,
- javax.wsdl.xml,
- javax.xml.bind.annotation;resolution:=optional,
- javax.xml.namespace,
- javax.xml.parsers,
- javax.xml.ws;resolution:=optional,
- org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.binding.ws;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.wsdlgen;version="2.0.0",
- org.apache.tuscany.sca.contribution;version="2.0.0";resolution:=optional,
- org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
- org.apache.tuscany.sca.core;version="2.0.0",
- org.apache.tuscany.sca.databinding;version="2.0.0",
- org.apache.tuscany.sca.databinding.jaxb;version="2.0.0",
- org.apache.tuscany.sca.interfacedef;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.java;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.java.jaxws;version="2.0.0";resolution:=optional,
- org.apache.tuscany.sca.interfacedef.util;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.wsdl;version="2.0.0",
- org.apache.tuscany.sca.monitor;version="2.0.0",
- org.apache.tuscany.sca.policy;version="2.0.0",
- org.apache.tuscany.sca.xsd;version="2.0.0",
- org.apache.tuscany.sca.xsd.xml;version="2.0.0";resolution:=optional,
- org.apache.ws.commons.schema,
- org.apache.ws.commons.schema.utils,
- org.oasisopen.sca;version="2.0.0",
- org.oasisopen.sca.annotation;version="2.0.0";resolution:=optional,
- org.w3c.dom
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.ws.wsdlgen
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/NOTICE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/NOTICE deleted file mode 100644 index 25bb89c9b2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/pom.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/pom.xml deleted file mode 100644 index 7b9dd0bed1..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>2.0-M3</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tuscany-binding-ws-wsdlgen</artifactId>
- <name>Apache Tuscany SCA Web Service binding WSDL Generator</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws</artifactId>
- <version>2.0-M3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-wsdl</artifactId>
- <version>2.0-M3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-java</artifactId>
- <version>2.0-M3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-java-jaxws</artifactId>
- <version>2.0-M3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-xsd</artifactId>
- <version>2.0-M3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-databinding</artifactId>
- <version>2.0-M3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2-policy</artifactId>
- <version>2.0-M3</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-databinding</artifactId>
- <version>2.0-M3</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java deleted file mode 100644 index b391a66c20..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.wsdl.Definition; -import javax.wsdl.PortType; -import javax.wsdl.WSDLException; -import javax.wsdl.xml.WSDLWriter; -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.AbstractContract; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Contract; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ResolverExtension; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.apache.tuscany.sca.xsd.XSDFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BindingWSDLGenerator { - private static final Logger logger = Logger.getLogger(BindingWSDLGenerator.class.getName()); - private static final QName SOAP12_INTENT = new QName("http://docs.oasis-open.org/ns/opencsa/sca/200903", "SOAP.1_2"); - - public static boolean printWSDL; // external code sets this to print generated WSDL - - private BindingWSDLGenerator() { - // this class has static methods only and cannot be instantiated - } - - /** - * Log a warning message. - * @param problem - */ - private static void logWarning(Problem problem) { - Logger problemLogger = Logger.getLogger(problem.getSourceClassName(), problem.getBundleName()); - if (problemLogger != null){ - problemLogger.logp(Level.WARNING, problem.getSourceClassName(), null, problem.getMessageId(), problem.getMessageParams()); - } else { - logger.severe("Can't get logger " + problem.getSourceClassName()+ " with bundle " + problem.getBundleName()); - } - } - - /** - * Report a warning. - * @param message - * @param binding - * @param parameters - */ - private static void warning(Monitor monitor, String message, WebServiceBinding wsBinding, String... messageParameters) { - Problem problem = monitor.createProblem(BindingWSDLGenerator.class.getName(), "wsdlgen-validation-messages", Severity.WARNING, wsBinding, message, (Object[])messageParameters); - if (monitor != null) { - monitor.problem(problem); - } else { - logWarning(problem); - } - } - - /** - * Report an error. - * @param message - * @param binding - * @param parameters - */ - private static void error(Monitor monitor, String message, WebServiceBinding wsBinding, String... messageParameters) { - Problem problem = monitor.createProblem(BindingWSDLGenerator.class.getName(), "wsdlgen-validation-messages", Severity.ERROR, wsBinding, message, (Object[])messageParameters); - if (monitor != null) { - monitor.problem(problem); - } else { - throw new WSDLGenerationException(problem.toString(), null, problem); - } - } - - /** - * Report an exception error. - * @param message - * @param binding - * @param exception - */ - private static void error(Monitor monitor, String message, WebServiceBinding wsBinding, Exception ex) { - Problem problem = monitor.createProblem(BindingWSDLGenerator.class.getName(), "wsdlgen-validation-messages", Severity.ERROR, wsBinding, message, ex); - if (monitor != null) { - monitor.problem(problem); - } else { - throw new WSDLGenerationException(problem.toString(), ex, problem); - } - } - - /** - * Report a fatal error. - * @param message - * @param binding - * @param exception - */ - private static void fatal(Monitor monitor, String message, WebServiceBinding wsBinding, String... messageParameters) { - Problem problem = monitor.createProblem(BindingWSDLGenerator.class.getName(), "wsdlgen-validation-messages", Severity.ERROR,wsBinding, message, (Object[])messageParameters); - throw new WSDLGenerationException(problem.toString(), null, problem); - } - - /** - * Report a fatal exception error. - * @param message - * @param binding - * @param exception - */ - private static void fatal(Monitor monitor, String message, WebServiceBinding wsBinding, Exception ex) { - Problem problem = monitor.createProblem(BindingWSDLGenerator.class.getName(), "wsdlgen-validation-messages", Severity.ERROR, wsBinding, message, ex); - throw new WSDLGenerationException(problem.toString(), ex, problem); - } - - /** - * This method can be called from the binding builder or from the runtime. - * Report problems and exceptions in the most appropriate way for both - * of these cases. - */ - public static void generateWSDL(Component component, - AbstractContract contract, - WebServiceBinding wsBinding, - ExtensionPointRegistry extensionPoints, - Monitor monitor) { - try { - createWSDLDocument(component, contract, wsBinding, extensionPoints, monitor); - } catch (WSDLGenerationException ex) { - if (ex.getProblem() != null) { - warning(monitor, "WsdlGenProblem", wsBinding, component.getName(), contract.getName()); - if (monitor != null) { - monitor.problem(ex.getProblem()); - } else { - throw ex; - } - } else if (ex.getCause() instanceof Exception) { - warning(monitor, "WsdlGenException", wsBinding, component.getName(), contract.getName()); - error(monitor, "UnexpectedException", wsBinding, (Exception)ex.getCause()); - } else { // should never happen - throw new IllegalStateException(ex); - } - } catch (RuntimeException ex) { - warning(monitor, "WsdlGenException", wsBinding, component.getName(), contract.getName()); - error(monitor, "UnexpectedException", wsBinding, ex); - } - } - - private static void createWSDLDocument(Component component, - AbstractContract contract, - WebServiceBinding wsBinding, - ExtensionPointRegistry extensionPoints, - Monitor monitor) { - FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); - DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class); - WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class); - XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class); - - if (((Contract)contract).getInterfaceContract(wsBinding) == null) { - // can happen if incorrect component service name - fatal(monitor, "MissingInterfaceContract", wsBinding, component.getName(), contract.getName()); - } - - InterfaceContract icontract = wsBinding.getBindingInterfaceContract(); - if (icontract == null) { - icontract = ((Contract)contract).getInterfaceContract(wsBinding).makeUnidirectional(false); - if (icontract instanceof JavaInterfaceContract) { - ModelResolver resolver = component instanceof ResolverExtension ? - ((ResolverExtension)component).getModelResolver() : null; - icontract = createWSDLInterfaceContract( - (JavaInterfaceContract)icontract, - requiresSOAP12(wsBinding), - resolver, - dataBindings, - wsdlFactory, - xsdFactory, - monitor); - } else { - try { - //TUSCANY-2316 Cloning the Interface Contract to avoid overriding data binding information - icontract = (InterfaceContract)icontract.clone(); - } catch (Exception e) { - //ignore - } - } - wsBinding.setBindingInterfaceContract(icontract); - } - - // TODO - fix up the conversational flag and operation sequences in case the contract has come from WSDL - // as we don't yet support requires="conversational" or sca:endConversation annotations - // in WSDL interface descriptions (see section 1.5.4 of the Assembly Specification V1.0) - if (contract.getInterfaceContract().getInterface() != null ) { - icontract.getInterface().setConversational(contract.getInterfaceContract().getInterface().isConversational()); - - for (Operation operation : icontract.getInterface().getOperations()){ - Operation serviceOperation = null; - - for (Operation tmpOp : contract.getInterfaceContract().getInterface().getOperations()){ - if (operation.getName().equals(tmpOp.getName())) { - serviceOperation = tmpOp; - break; - } - } - - if (serviceOperation != null ){ - operation.setConversationSequence(serviceOperation.getConversationSequence()); - } - } - } - - /* - // Look at all the Web Service bindings of the SCA service to see if any - // of them have an existing generated WSDL definitions document. If found, - // use it for this binding as well. If not found, generate a new document. - Definition definition = null; - for (Binding binding : contract.getBindings()) { - if (binding instanceof WebServiceBinding) { - definition = ((WebServiceBinding)binding).getWSDLDocument(); - if (definition != null) { - wsBinding.setWSDLDocument(definition); - break; - } - } - } - */ - // The above code is currently not used. Instead, we only look - // for a WSDL definitions document in this binding and don't - // attempt to share the same document across multiple bindings. - - // generate a WSDL definitions document if needed - Definition definition = wsBinding.getWSDLDocument(); - if (definition == null) { - definition = WSDLServiceGenerator.configureWSDLDefinition(wsBinding, component, contract, monitor); - wsBinding.setWSDLDocument(definition); - } - } - - protected static boolean requiresSOAP12(WebServiceBinding wsBinding) { - if (wsBinding instanceof PolicySubject) { - List<Intent> intents = ((PolicySubject)wsBinding).getRequiredIntents(); - for (Intent intent : intents) { - if (SOAP12_INTENT.equals(intent.getName())) { - return true; - } - } - } - return false; - } - - /** - * Create a WSDLInterfaceContract from a JavaInterfaceContract - */ - protected static WSDLInterfaceContract createWSDLInterfaceContract(JavaInterfaceContract contract, - boolean requiresSOAP12, - ModelResolver resolver, - DataBindingExtensionPoint dataBindings, - WSDLFactory wsdlFactory, - XSDFactory xsdFactory, - Monitor monitor) { - - WSDLInterfaceContract wsdlContract = wsdlFactory.createWSDLInterfaceContract(); - WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface(); - wsdlContract.setInterface(wsdlInterface); - - WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition(); - JavaInterface iface = (JavaInterface)contract.getInterface(); - - Definition def = null; - try { - Interface2WSDLGenerator wsdlGenerator = - new Interface2WSDLGenerator(requiresSOAP12, resolver, dataBindings, xsdFactory, monitor); - def = wsdlGenerator.generate(iface, wsdlDefinition); - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - - // for debugging - if (printWSDL) { - try { - System.out.println("Generated WSDL for Java interface " + iface.getName() + " class " + iface.getJavaClass().getName()); - WSDLWriter writer = javax.wsdl.factory.WSDLFactory.newInstance().newWSDLWriter(); - writer.writeWSDL(def, System.out); - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - wsdlDefinition.setDefinition(def); - wsdlInterface.setWsdlDefinition(wsdlDefinition); - wsdlInterface.setRemotable(true); - wsdlInterface.setConversational(contract.getInterface().isConversational()); - wsdlInterface.setUnresolved(false); - wsdlInterface.setRemotable(true); - PortType portType = (PortType)def.getAllPortTypes().values().iterator().next(); - wsdlInterface.setPortType(portType); - - try { - wsdlFactory.createWSDLInterface(wsdlInterface, portType, wsdlDefinition, resolver); - } catch (InvalidInterfaceException e) { - throw new WSDLGenerationException(e); - } - - return wsdlContract; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java deleted file mode 100644 index ee02632096..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ /dev/null @@ -1,841 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import java.lang.reflect.Method; -import java.net.URI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.wsdl.Binding; -import javax.wsdl.BindingOperation; -import javax.wsdl.Definition; -import javax.wsdl.Fault; -import javax.wsdl.Input; -import javax.wsdl.Message; -import javax.wsdl.OperationType; -import javax.wsdl.Output; -import javax.wsdl.Part; -import javax.wsdl.PortType; -import javax.wsdl.Types; -import javax.wsdl.WSDLException; -import javax.wsdl.extensions.schema.Schema; -import javax.wsdl.factory.WSDLFactory; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.databinding.DataBinding; -import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; -import org.apache.tuscany.sca.databinding.XMLTypeHelper; -import org.apache.tuscany.sca.databinding.jaxb.JAXBDataBinding; -import org.apache.tuscany.sca.interfacedef.DataType; -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaOperation; -import org.apache.tuscany.sca.interfacedef.util.ElementInfo; -import org.apache.tuscany.sca.interfacedef.util.JavaXMLMapper; -import org.apache.tuscany.sca.interfacedef.util.TypeInfo; -import org.apache.tuscany.sca.interfacedef.util.WrapperInfo; -import org.apache.tuscany.sca.interfacedef.util.XMLType; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.xsd.XSDFactory; -import org.apache.tuscany.sca.xsd.XSDefinition; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaCollection; -import org.apache.ws.commons.schema.XmlSchemaException; -import org.apache.ws.commons.schema.utils.NamespaceMap; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * @version $Rev: 670103 $ $Date: 2008-06-21 01:35:00 +0100 (Sat, 21 Jun 2008) $ - */ -public class Interface2WSDLGenerator { - private static final Logger logger = Logger.getLogger(Interface2WSDLGenerator.class.getName()); - private static final String SCHEMA_NS = "http://www.w3.org/2001/XMLSchema"; - private static final String SCHEMA_NAME = "schema"; - private static final QName SCHEMA_QNAME = new QName(SCHEMA_NS, SCHEMA_NAME); - private static final String XMLNS_NS = "http://www.w3.org/2000/xmlns/"; - - private static final String ANYTYPE_NAME = "anyType"; - private static final QName ANYTYPE_QNAME = new QName(SCHEMA_NS, ANYTYPE_NAME); - - - private WSDLFactory factory; - private DataBindingExtensionPoint dataBindings; - private WSDLDefinitionGenerator definitionGenerator; - private boolean requiresSOAP12; - private ModelResolver resolver; - private XSDFactory xsdFactory; - private Monitor monitor; - - public Interface2WSDLGenerator(boolean requiresSOAP12, - ModelResolver resolver, - DataBindingExtensionPoint dataBindings, - XSDFactory xsdFactory, - Monitor monitor) throws WSDLException { - super(); - this.requiresSOAP12 = requiresSOAP12; - this.resolver = resolver; - definitionGenerator = new WSDLDefinitionGenerator(requiresSOAP12); - this.dataBindings = dataBindings; - this.xsdFactory = xsdFactory; - this.monitor = monitor; - this.factory = WSDLFactory.newInstance(); - } - - /** - * Log a warning message. - * @param problem - */ - private static void logWarning(Problem problem) { - Logger problemLogger = Logger.getLogger(problem.getSourceClassName(), problem.getBundleName()); - if (problemLogger != null){ - problemLogger.logp(Level.WARNING, problem.getSourceClassName(), null, problem.getMessageId(), problem.getMessageParams()); - } else { - logger.severe("Can't get logger " + problem.getSourceClassName()+ " with bundle " + problem.getBundleName()); - } - } - - /** - * Report a warning. - * @param message - * @param binding - * @param parameters - */ - private void warning(String message, Interface interfaze, String... messageParameters) { - Problem problem = monitor.createProblem(this.getClass().getName(), "wsdlgen-validation-messages", Severity.WARNING, interfaze, message, (Object[])messageParameters); - if (monitor != null) { - monitor.problem(problem); - } else { - logWarning(problem); - } - } - - /** - * Report a fatal error. - * @param message - * @param binding - * @param parameters - */ - private void fatal(String message, Interface interfaze, String... messageParameters) { - Problem problem = monitor.createProblem(this.getClass().getName(), "wsdlgen-validation-messages", Severity.ERROR, interfaze, message, (Object[])messageParameters); - throw new WSDLGenerationException(problem.toString(), null, problem); - } - - private XMLTypeHelper getTypeHelper(DataType type, Map<String, XMLTypeHelper> helpers) { - if (type == null) { - return null; - } - String db = type.getDataBinding(); - if (db == null) { - return null; - } - if ("java:array".equals(db)) { - DataType dt = (DataType)type.getLogical(); - db = dt.getDataBinding(); - } - return helpers.get(db); - } - - private boolean inputTypesCompatible(DataType wrapperType, DataType<List<DataType>> inputType, Map<String, XMLTypeHelper> helpers) { - XMLTypeHelper wrapperHelper = getTypeHelper(wrapperType, helpers); - for (DataType dt : inputType.getLogical()) { - if (getTypeHelper(dt, helpers) != wrapperHelper) { - return false; - } - } - return true; - } - - private boolean outputTypeCompatible(DataType wrapperType, DataType outputType, Map<String, XMLTypeHelper> helpers) { - if (getTypeHelper(outputType, helpers) != getTypeHelper(wrapperType, helpers)) { - return false; - } else { - return true; - } - } - - private void addDataType(Map<XMLTypeHelper, List<DataType>> map, DataType type, Map<String, XMLTypeHelper> helpers) { - if (type == null) { - return; - } - String db = type.getDataBinding(); - if (db == null) { - return; - } - if ("java:array".equals(db)) { - DataType dt = (DataType)type.getLogical(); - db = dt.getDataBinding(); - } - XMLTypeHelper helper = helpers.get(db); - List<DataType> types = map.get(helper); - if (types == null) { - types = new ArrayList<DataType>(); - map.put(helper, types); - } - types.add(type); - } - - private Map<XMLTypeHelper, List<DataType>> getDataTypes(Interface intf, boolean useWrapper, Map<String, XMLTypeHelper> helpers) { - Map<XMLTypeHelper, List<DataType>> dataTypes = new HashMap<XMLTypeHelper, List<DataType>>(); - for (Operation op : intf.getOperations()) { - WrapperInfo wrapper = op.getWrapper(); - DataType dt1 = null; - boolean useInputWrapper = useWrapper & wrapper != null; - if (useInputWrapper) { - dt1 = wrapper.getInputWrapperType(); - useInputWrapper &= inputTypesCompatible(dt1, op.getInputType(), helpers); - } - if (useInputWrapper) { - addDataType(dataTypes, dt1, helpers); - } else { - for (DataType dt : op.getInputType().getLogical()) { - addDataType(dataTypes, dt, helpers); - } - } - - DataType dt2 = null; - boolean useOutputWrapper = useWrapper & wrapper != null; - if (useOutputWrapper) { - dt2 = wrapper.getOutputWrapperType(); - useOutputWrapper &= outputTypeCompatible(dt2, op.getOutputType(), helpers); - } - if (useOutputWrapper) { - addDataType(dataTypes, dt2, helpers); - } else { - dt2 = op.getOutputType(); - addDataType(dataTypes, dt2, helpers); - } - - for (DataType<DataType> dt3 : op.getFaultTypes()) { - DataType dt4 = dt3.getLogical(); - addDataType(dataTypes, dt4, helpers); - } - } - return dataTypes; - } - - - public Definition generate(Interface interfaze, WSDLDefinition wsdlDefinition) throws WSDLException { - if (interfaze == null) { - return null; - } - if (interfaze instanceof WSDLInterface) { - return ((WSDLInterface)interfaze).getWsdlDefinition().getDefinition(); - } - JavaInterface iface = (JavaInterface)interfaze; - if (!interfaze.isRemotable()) { - fatal("InterfaceNotRemotable", interfaze, iface.getName()); - } - QName name = getQName(iface); - Definition definition = factory.newDefinition(); - if (requiresSOAP12) { - definition.addNamespace("SOAP12", "http://schemas.xmlsoap.org/wsdl/soap12/"); - } else { - definition.addNamespace("SOAP", "http://schemas.xmlsoap.org/wsdl/soap/"); - } - definition.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/"); - definition.addNamespace("xs", SCHEMA_NS); - - String namespaceURI = name.getNamespaceURI(); - definition.setTargetNamespace(namespaceURI); - definition.setQName(new QName(namespaceURI, name.getLocalPart() + "Service", name.getPrefix())); - definition.addNamespace(name.getPrefix(), namespaceURI); - - PortType portType = definition.createPortType(); - portType.setQName(name); - Binding binding = definitionGenerator.createBinding(definition, portType); - Map<String, XMLTypeHelper> helpers = new HashMap<String, XMLTypeHelper>(); - Map<QName, List<ElementInfo>> wrappers = new HashMap<QName, List<ElementInfo>>(); - for (Operation op : interfaze.getOperations()) { - javax.wsdl.Operation operation = generateOperation(definition, op, helpers, wrappers); - portType.addOperation(operation); - String action = ((JavaOperation)op).getAction(); - if ((action == null || "".equals(action)) && !op.isWrapperStyle() && op.getWrapper() == null) { - // Bare style - action = "urn:" + op.getName(); - } - BindingOperation bindingOp = definitionGenerator.createBindingOperation(definition, operation, action); - binding.addBindingOperation(bindingOp); - } - portType.setUndefined(false); - definition.addPortType(portType); - binding.setUndefined(false); - definition.addBinding(binding); - wsdlDefinition.setBinding(binding); - - // call each helper in turn to populate the wsdl.types element - XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); - - for (Map.Entry<XMLTypeHelper, List<DataType>> en: getDataTypes(interfaze, false, helpers).entrySet()) { - XMLTypeHelper helper = en.getKey(); - if (helper == null) { - continue; - } - List<XSDefinition> xsDefinitions = helper.getSchemaDefinitions(xsdFactory, resolver, en.getValue()); - for (XSDefinition xsDef: xsDefinitions) { - addSchemaExtension(xsDef, schemaCollection, wsdlDefinition, definition); - } - } - - // remove global wrapper elements with schema definitions from generation list - for (QName wrapperName: new HashSet<QName>(wrappers.keySet())) { - if (wsdlDefinition.getXmlSchemaElement(wrapperName) != null) { - wrappers.remove(wrapperName); - } - } - - // generate schema elements for wrappers that aren't defined in the schemas - if (wrappers.size() > 0) { - int i = 0; - int index = 0; - Map<String, XSDefinition> wrapperXSDs = new HashMap<String, XSDefinition>(); - Map<Element, Map<String, String>> prefixMaps = new HashMap<Element, Map<String, String>>(); - for (Map.Entry<QName, List<ElementInfo>> entry: wrappers.entrySet()) { - String targetNS = entry.getKey().getNamespaceURI(); - Document schemaDoc = null; - Element schema = null; - XSDefinition xsDef = wrapperXSDs.get(targetNS); - if (xsDef != null) { - schemaDoc = xsDef.getDocument(); - schema = schemaDoc.getDocumentElement(); - } else { - schemaDoc = createDocument(); - schema = schemaDoc.createElementNS(SCHEMA_NS, "xs:schema"); - // The elementFormDefault should be set to unqualified, see TUSCANY-2388 - schema.setAttribute("elementFormDefault", "unqualified"); - schema.setAttribute("attributeFormDefault", "qualified"); - schema.setAttribute("targetNamespace", targetNS); - schema.setAttributeNS(XMLNS_NS, "xmlns:xs", SCHEMA_NS); - schemaDoc.appendChild(schema); - Schema schemaExt = createSchemaExt(definition); - schemaExt.setElement(schema); - prefixMaps.put(schema, new HashMap<String, String>()); - xsDef = xsdFactory.createXSDefinition(); - xsDef.setUnresolved(true); - xsDef.setNamespace(targetNS); - xsDef.setDocument(schemaDoc); - // TUSCANY-2465: Set the system id to avoid schema conflict - xsDef.setLocation(URI.create("xsd_" + index + ".xsd")); - index++; - wrapperXSDs.put(targetNS, xsDef); - } - Element wrapper = schemaDoc.createElementNS(SCHEMA_NS, "xs:element"); - schema.appendChild(wrapper); - wrapper.setAttribute("name", entry.getKey().getLocalPart()); - if (entry.getValue().size() == 1 && entry.getValue().get(0).getQName() == null) { - // special case for global fault element - QName typeName = entry.getValue().get(0).getType().getQName(); - String nsURI = typeName.getNamespaceURI(); - if ("".equals(nsURI)) { - wrapper.setAttribute("type", typeName.getLocalPart()); - addSchemaImport(schema, "", schemaDoc); - } else if (targetNS.equals(nsURI)) { - wrapper.setAttribute("type", typeName.getLocalPart()); - } else if (SCHEMA_NS.equals(nsURI)) { - wrapper.setAttribute("type", "xs:" + typeName.getLocalPart()); - } else { - Map<String, String> prefixMap = prefixMaps.get(schema); - String prefix = prefixMap.get(nsURI); - if (prefix == null) { - prefix = "ns" + i++; - prefixMap.put(nsURI, prefix); - schema.setAttributeNS(XMLNS_NS, "xmlns:" + prefix, nsURI); - addSchemaImport(schema, nsURI, schemaDoc); - } - wrapper.setAttribute("type", prefix + ":" + typeName.getLocalPart()); - } - } else { - // normal wrapper containing type definition inline - Element complexType = schemaDoc.createElementNS(SCHEMA_NS, "xs:complexType"); - wrapper.appendChild(complexType); - if (entry.getValue().size() > 0) { - Element sequence = schemaDoc.createElementNS(SCHEMA_NS, "xs:sequence"); - complexType.appendChild(sequence); - for (ElementInfo element: entry.getValue()) { - Element xsElement = schemaDoc.createElementNS(SCHEMA_NS, "xs:element"); - if (element.isMany()) { - xsElement.setAttribute("maxOccurs", "unbounded"); - } - xsElement.setAttribute("minOccurs", "0"); - xsElement.setAttribute("name", element.getQName().getLocalPart()); - if (element.isNillable()) { - xsElement.setAttribute("nillable", "true"); - } - QName typeName = element.getType().getQName(); - String nsURI = typeName.getNamespaceURI(); - if ("".equals(nsURI)) { - xsElement.setAttribute("type", typeName.getLocalPart()); - addSchemaImport(schema, "", schemaDoc); - } else if (SCHEMA_NS.equals(nsURI)) { - xsElement.setAttribute("type", "xs:" + typeName.getLocalPart()); - } else { - Map<String, String> prefixMap = prefixMaps.get(schema); - String prefix = prefixMap.get(nsURI); - if (prefix == null) { - if (targetNS.equals(nsURI)) { - prefix = "tns"; - } else { - prefix = "ns" + i++; - addSchemaImport(schema, nsURI, schemaDoc); - } - prefixMap.put(nsURI, prefix); - schema.setAttributeNS(XMLNS_NS, "xmlns:" + prefix, nsURI); - } - xsElement.setAttribute("type", prefix + ":" + typeName.getLocalPart()); - } - sequence.appendChild(xsElement); - } - } - } - } - - // resolve XSDefinitions containing generated wrappers - for (XSDefinition xsDef: wrapperXSDs.values()) { - loadXSD(schemaCollection, xsDef); - wsdlDefinition.getXmlSchemas().add(xsDef); - } - } - - return definition; - } - - private static void addSchemaImport(Element schema, String nsURI, Document schemaDoc) { - Element imp = schemaDoc.createElementNS(SCHEMA_NS, "xs:import"); - if (!"".equals(nsURI)) { - imp.setAttribute("namespace", nsURI); - } - NodeList childNodes = schema.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node childNode = childNodes.item(i); - if (childNode instanceof Element) { - schema.insertBefore(imp, childNode); - imp = null; - break; - } - } - if (imp != null) { - schema.appendChild(imp); - } - } - - private void addSchemaExtension(XSDefinition xsDef, - XmlSchemaCollection schemaCollection, - WSDLDefinition wsdlDefinition, - Definition definition) throws WSDLException { - if (xsDef.getAggregatedDefinitions() != null) { - for (XSDefinition xsd: xsDef.getAggregatedDefinitions()) { - addSchemaExtension(xsd, schemaCollection, wsdlDefinition, definition); - } - } else { - String nsURI = xsDef.getNamespace(); - Document document = xsDef.getDocument(); - if (document == null) { - try { - NamespaceMap prefixMap = new NamespaceMap(); - prefixMap.add("xs", SCHEMA_NS); - prefixMap.add("tns", nsURI); - XmlSchema schemaDef = xsDef.getSchema(); - schemaDef.setNamespaceContext(prefixMap); - Document[] docs = schemaDef.getAllSchemas(); - document = docs[docs.length-1]; - document.setDocumentURI(xsDef.getLocation().toString()); - xsDef.setDocument(document); - } catch (XmlSchemaException e) { - throw new RuntimeException(e); - } - } - loadXSD(schemaCollection, xsDef); - wsdlDefinition.getXmlSchemas().add(xsDef); - Element schema = document.getDocumentElement(); - Schema schemaExt = createSchemaExt(definition); - schemaExt.setDocumentBaseURI(document.getDocumentURI()); - schemaExt.setElement(schema); - } - } - - private static void loadXSD(XmlSchemaCollection schemaCollection, XSDefinition definition) { - if (definition.getSchema() != null) { - return; - } - if (definition.getDocument() != null) { - String uri = null; - if (definition.getLocation() != null) { - uri = definition.getLocation().toString(); - } - XmlSchema schema = schemaCollection.read(definition.getDocument(), uri, null); - if (definition.getSchemaCollection() == null) { - definition.setSchemaCollection(schemaCollection); - } - if (definition.getSchema() == null) { - definition.setSchema(schema); - } - } - } - - public Schema createSchemaExt(Definition definition) throws WSDLException { - Types types = definition.getTypes(); - if (types == null) { - types = definition.createTypes(); - definition.setTypes(types); - } - - Schema schemaExt = createSchema(definition); - types.addExtensibilityElement(schemaExt); - - return schemaExt; - } - - public Schema createSchema(Definition definition) throws WSDLException { - return (Schema)definition.getExtensionRegistry().createExtension(Types.class, SCHEMA_QNAME); - } - - private DocumentBuilderFactory documentBuilderFactory; - - public Document createDocument() { - Document document; - try { - if (documentBuilderFactory == null) { - documentBuilderFactory = DocumentBuilderFactory.newInstance(); - documentBuilderFactory.setNamespaceAware(true); - } - document = documentBuilderFactory.newDocumentBuilder().newDocument(); - } catch (ParserConfigurationException ex) { - throw new WSDLGenerationException(ex); - } - // document.setDocumentURI("http://"); - return document; - } - - protected QName getQName(Interface interfaze) { - JavaInterface iface = (JavaInterface)interfaze; - QName qname = iface.getQName(); - if (qname != null) { - return qname; - } else { - Class<?> javaClass = iface.getJavaClass(); - return new QName(JavaXMLMapper.getNamespace(javaClass), javaClass.getSimpleName(), "tns"); - } - } - - public javax.wsdl.Operation generateOperation(Definition definition, - Operation op, - Map<String, XMLTypeHelper> helpers, - Map<QName, List<ElementInfo>> wrappers) - throws WSDLException { - javax.wsdl.Operation operation = definition.createOperation(); - operation.setName(op.getName()); - operation.setUndefined(false); - - Input input = definition.createInput(); - Message inputMsg = definition.createMessage(); - String namespaceURI = definition.getQName().getNamespaceURI(); - QName inputMsgName = new QName(namespaceURI, op.getName()); - inputMsg.setQName(inputMsgName); - inputMsg.setUndefined(false); - definition.addMessage(inputMsg); - - List<ElementInfo> elements = null; - // FIXME: By default, java interface is mapped to doc-lit-wrapper style WSDL - if (op.getWrapper() != null) { - // Generate doc-lit-wrapper style - inputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, true)); - } else { - // Bare style - int i = 0; - for (DataType d : op.getInputType().getLogical()) { - inputMsg.addPart(generatePart(definition, d, "arg" + i)); - elements = new ArrayList<ElementInfo>(); - ElementInfo element = getElementInfo(d.getPhysical(), d, null, helpers); - elements.add(element); - QName elementName = ((XMLType)d.getLogical()).getElementName(); - wrappers.put(elementName, elements); - i++; - } - } - input.setMessage(inputMsg); - operation.setInput(input); - - if (!op.isNonBlocking()) { - Output output = definition.createOutput(); - Message outputMsg = definition.createMessage(); - QName outputMsgName = new QName(namespaceURI, op.getName() + "Response"); - outputMsg.setQName(outputMsgName); - outputMsg.setUndefined(false); - definition.addMessage(outputMsg); - - if (op.getWrapper() != null) { - outputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, false)); - } else { - DataType outputType = op.getOutputType(); - outputMsg.addPart(generatePart(definition, outputType, "return")); - if (outputType != null) { - elements = new ArrayList<ElementInfo>(); - ElementInfo element = getElementInfo(outputType.getPhysical(), outputType, null, helpers); - elements.add(element); - QName elementName = ((XMLType)outputType.getLogical()).getElementName(); - wrappers.put(elementName, elements); - } - } - output.setMessage(outputMsg); - - operation.setOutput(output); - operation.setStyle(OperationType.REQUEST_RESPONSE); - } else { - operation.setStyle(OperationType.ONE_WAY); - } - - for (DataType<DataType> faultType: op.getFaultTypes()) { - Fault fault = definition.createFault(); - QName faultName = ((XMLType)faultType.getLogical().getLogical()).getElementName(); - fault.setName(faultName.getLocalPart()); - Message faultMsg = definition.getMessage(faultName); - if (faultMsg == null) { - faultMsg = definition.createMessage(); - faultMsg.setQName(faultName); - faultMsg.setUndefined(false); - definition.addMessage(faultMsg); - faultMsg.addPart(generatePart(definition, faultType.getLogical(), faultName.getLocalPart())); - } - fault.setMessage(faultMsg); - operation.addFault(fault); - if (faultType.getLogical().getPhysical() != faultType.getPhysical()) { - // create special wrapper for type indirection to real fault bean - DataType logical = faultType.getLogical(); - elements = new ArrayList<ElementInfo>(); - elements.add(getElementInfo(logical.getPhysical(), logical, null, helpers)); - } else { - // convert synthesized fault bean to a wrapper type - for (DataType<XMLType> propDT: op.getFaultBeans().get(faultName)) { - XMLType logical = propDT.getLogical(); - elements = new ArrayList<ElementInfo>(); - elements.add(getElementInfo(propDT.getPhysical(), propDT, logical.getElementName(), helpers)); - } - } - wrappers.put(faultName, elements); - } - - operation.setUndefined(false); - return operation; - } - - public Part generatePart(Definition definition, DataType arg, String partName) { - Part part = definition.createPart(); - part.setName(partName); - if (arg != null && arg.getLogical() instanceof XMLType) { - XMLType xmlType = (XMLType)arg.getLogical(); - QName elementName = xmlType.getElementName(); - part.setElementName(elementName); - addNamespace(definition, elementName); - if (xmlType.getElementName() == null) { - QName typeName = xmlType.getTypeName(); - part.setTypeName(typeName); - addNamespace(definition, typeName); - } - } - return part; - } - - public Part generateWrapperPart(Definition definition, - Operation operation, - Map<String, XMLTypeHelper> helpers, - Map<QName, List<ElementInfo>> wrappers, - boolean input) throws WSDLException { - Part part = definition.createPart(); - String partName = input ? operation.getName() : (operation.getName() + "Response"); - part.setName(partName); - WrapperInfo opWrapper = operation.getWrapper(); - if (opWrapper != null) { - ElementInfo elementInfo = - input ? opWrapper.getInputWrapperElement() : opWrapper.getOutputWrapperElement(); - List<ElementInfo> elements = - input ? opWrapper.getInputChildElements() : opWrapper.getOutputChildElements(); - QName wrapperName = elementInfo.getQName(); - part.setElementName(wrapperName); - addNamespace(definition, wrapperName); - wrappers.put(wrapperName, elements); - - // FIXME: [rfeng] Ideally, we should try to register the wrappers only. But we are - // expriencing the problem that we cannot handle XSD imports - /* - Class<?> wrapperClass = input ? opWrapper.getInputWrapperClass() : opWrapper.getOutputWrapperClass(); - DataType wrapperDT = input ? opWrapper.getInputWrapperType() : opWrapper.getOutputWrapperType(); - if (wrapperClass != null) { - getElementInfo(wrapperClass, wrapperDT, wrapperName, helpers); - return part; - } - */ - - Method method = ((JavaOperation)operation).getJavaMethod(); - if (input) { - Class<?>[] paramTypes = method.getParameterTypes(); - for (int i = 0; i < paramTypes.length; i++) { - DataType dataType = operation.getInputType().getLogical().get(i); - elements.set(i, getElementInfo(paramTypes[i], dataType, elements.get(i).getQName(), helpers)); - } - } else { - Class<?> returnType = method.getReturnType(); - if (returnType != Void.TYPE) { - DataType dataType = operation.getOutputType(); - elements.set(0, getElementInfo(returnType, dataType, elements.get(0).getQName(), helpers)); - } - } - } - return part; - } - - private ElementInfo getElementInfo(Class javaType, - DataType dataType, - QName name, - Map<String, XMLTypeHelper> helpers) { - String db = dataType.getDataBinding(); - while ("java:array".equals(db)) { - dataType = (DataType)dataType.getLogical(); - db = dataType.getDataBinding(); - } - XMLTypeHelper helper = helpers.get(db); - if (helper == null) { - DataBinding dataBinding = dataBindings.getDataBinding(db); - if (dataBinding == null) { - QName element = name; - if (element == null || dataType.getLogical() instanceof XMLType) { - XMLType xmlType = (XMLType)dataType.getLogical(); - if (xmlType.getElementName() != null) { - element = xmlType.getElementName(); - } - } - return new ElementInfo(element, new TypeInfo(ANYTYPE_QNAME, false, null)); - // throw new ServiceRuntimeException("No data binding for " + db); - } - - helper = dataBinding.getXMLTypeHelper(); - if (helper == null) { - // Default to JAXB - helper = helpers.get(JAXBDataBinding.NAME); - if (helper == null) { - helper = dataBindings.getDataBinding(JAXBDataBinding.NAME).getXMLTypeHelper(); - helpers.put(JAXBDataBinding.NAME, helper); - } - } - helpers.put(db, helper); - } - TypeInfo typeInfo = helper.getTypeInfo(javaType.isArray() ? javaType.getComponentType() : javaType, - dataType.getLogical()); - ElementInfo element = new ElementInfo(name, typeInfo); - element.setMany(byte[].class != javaType && javaType.isArray()); - element.setNillable(!javaType.isPrimitive()); - return element; - } - - private static void addNamespace(Definition definition, QName name) { - String namespace = name.getNamespaceURI(); - if (definition.getPrefix(namespace) == null) { - definition.addNamespace("ns" + definition.getNamespaces().size(), namespace); - } - } - - /* - // currently not using the next three methods - public XmlSchemaType getXmlSchemaType(DataType type) { - return null; - } - - // FIXME: WE need to add databinding-specific Java2XSD generation - public Element generateXSD(DataType dataType) { - DataBinding dataBinding = dataBindings.getDataBinding(dataType.getDataBinding()); - if (dataBinding != null) { - // return dataBinding.generateSchema(dataType); - } - return null; - } - - public void generateWrapperElements(Operation op) { - XmlSchemaCollection collection = new XmlSchemaCollection(); - String ns = getQName(op.getInterface()).getNamespaceURI(); - XmlSchema schema = new XmlSchema(ns, collection); - schema.setAttributeFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED)); - schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED)); - - XmlSchemaElement inputElement = new XmlSchemaElement(); - inputElement.setQName(new QName(ns, op.getName())); - XmlSchemaComplexType inputType = new XmlSchemaComplexType(schema); - inputType.setName(""); - XmlSchemaSequence inputSeq = new XmlSchemaSequence(); - inputType.setParticle(inputSeq); - List<DataType> argTypes = op.getInputType().getLogical(); - for (DataType argType : argTypes) { - XmlSchemaElement child = new XmlSchemaElement(); - Object logical = argType.getLogical(); - if (logical instanceof XMLType) { - child.setName(((XMLType)logical).getElementName().getLocalPart()); - XmlSchemaType type = getXmlSchemaType(argType); - child.setType(type); - } - inputSeq.getItems().add(child); - } - inputElement.setType(inputType); - - XmlSchemaElement outputElement = new XmlSchemaElement(); - outputElement.setQName(new QName(ns, op.getName() + "Response")); - XmlSchemaComplexType outputType = new XmlSchemaComplexType(schema); - outputType.setName(""); - XmlSchemaSequence outputSeq = new XmlSchemaSequence(); - outputType.setParticle(outputSeq); - DataType returnType = op.getOutputType(); - XmlSchemaElement child = new XmlSchemaElement(); - Object logical = returnType.getLogical(); - if (logical instanceof XMLType) { - child.setName(((XMLType)logical).getElementName().getLocalPart()); - XmlSchemaType type = getXmlSchemaType(returnType); - child.setType(type); - } - outputSeq.getItems().add(child); - outputElement.setType(outputType); - - schema.getElements().add(inputElement.getQName(), inputElement); - schema.getElements().add(outputElement.getQName(), outputElement); - - } - */ - - public WSDLFactory getFactory() { - return factory; - } - - public void setFactory(WSDLFactory factory) { - this.factory = factory; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java deleted file mode 100644 index d0b79f9b0e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import java.util.Iterator; - -import javax.wsdl.Binding; -import javax.wsdl.BindingFault; -import javax.wsdl.BindingInput; -import javax.wsdl.BindingOperation; -import javax.wsdl.BindingOutput; -import javax.wsdl.Definition; -import javax.wsdl.Fault; -import javax.wsdl.Input; -import javax.wsdl.Operation; -import javax.wsdl.Output; -import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.wsdl.Types; -import javax.wsdl.WSDLException; -import javax.wsdl.extensions.ExtensibilityElement; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap.SOAPBinding; -import javax.wsdl.extensions.soap.SOAPBody; -import javax.wsdl.extensions.soap.SOAPFault; -import javax.wsdl.extensions.soap.SOAPOperation; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.extensions.soap12.SOAP12Binding; -import javax.wsdl.extensions.soap12.SOAP12Body; -import javax.wsdl.extensions.soap12.SOAP12Fault; -import javax.wsdl.extensions.soap12.SOAP12Operation; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.namespace.QName; - -import org.w3c.dom.Element; - -/** - * - * @version $Rev: 668025 $ $Date: 2008-06-16 01:06:34 +0100 (Mon, 16 Jun 2008) $ - */ -public class WSDLDefinitionGenerator { - private static final String SOAP_NS = "http://schemas.xmlsoap.org/wsdl/soap/"; - public static final QName SOAP_ADDRESS = new QName(SOAP_NS, "address"); - private static final QName SOAP_BINDING = new QName(SOAP_NS, "binding"); - private static final QName SOAP_BODY = new QName(SOAP_NS, "body"); - private static final QName SOAP_FAULT = new QName(SOAP_NS, "fault"); - private static final QName SOAP_OPERATION = new QName(SOAP_NS, "operation"); - private static final String SOAP12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/"; - public static final QName SOAP12_ADDRESS = new QName(SOAP12_NS, "address"); - private static final QName SOAP12_BINDING = new QName(SOAP12_NS, "binding"); - private static final QName SOAP12_BODY = new QName(SOAP12_NS, "body"); - private static final QName SOAP12_FAULT = new QName(SOAP12_NS, "fault"); - private static final QName SOAP12_OPERATION = new QName(SOAP12_NS, "operation"); - - private static final String BINDING_SUFFIX = "Binding"; - private static final String SERVICE_SUFFIX = "Service"; - private static final String PORT_SUFFIX = "Port"; - - private boolean requiresSOAP12; - private QName soapAddress; - private QName soapBinding; - private QName soapBody; - private QName soapFault; - private QName soapOperation; - - public WSDLDefinitionGenerator(boolean requiresSOAP12) { - super(); - this.requiresSOAP12 = requiresSOAP12; - soapAddress = requiresSOAP12 ? SOAP12_ADDRESS : SOAP_ADDRESS; - soapBinding = requiresSOAP12 ? SOAP12_BINDING : SOAP_BINDING; - soapBody = requiresSOAP12 ? SOAP12_BODY : SOAP_BODY; - soapFault = requiresSOAP12 ? SOAP12_FAULT : SOAP_FAULT; - soapOperation = requiresSOAP12 ? SOAP12_OPERATION : SOAP_OPERATION; - } - - public Definition cloneDefinition(WSDLFactory factory, Definition definition) throws WSDLException { - Element root = definition.getDocumentationElement(); - root = (Element)root.cloneNode(true); - WSDLReader reader = factory.newWSDLReader(); - return reader.readWSDL(definition.getDocumentBaseURI(), root); - } - - public Types createTypes(Definition definition) { - Types types = definition.createTypes(); - definition.setTypes(types); - return types; - } - - public Binding createBinding(Definition definition, PortType portType) { - try { - Binding binding = definition.createBinding(); - binding.setPortType(portType); - configureBinding(definition, binding, portType); - ExtensibilityElement bindingExtension = - definition.getExtensionRegistry().createExtension(Binding.class, soapBinding); - if (requiresSOAP12) { - ((SOAP12Binding)bindingExtension).setStyle("document"); - ((SOAP12Binding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http"); - } else { - ((SOAPBinding)bindingExtension).setStyle("document"); - ((SOAPBinding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http"); - } - binding.addExtensibilityElement(bindingExtension); - return binding; - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - protected void configureBinding(Definition definition, Binding binding, PortType portType) throws WSDLException { - QName portTypeName = portType.getQName(); - if (portTypeName != null) { - // Choose <porttype>Binding if available. If this name is in use, insert - // separating underscores until there is no clash. - for (String suffix = BINDING_SUFFIX; ; suffix = "_" + suffix) { - QName name = new QName(definition.getTargetNamespace(), portTypeName.getLocalPart() + suffix); - if (definition.getBinding(name) == null) { - binding.setQName(name); - break; - } - } - } - } - - @SuppressWarnings("unchecked") - public void createBindingOperations(Definition definition, Binding binding, PortType portType) { - try { - for (Iterator oi = portType.getOperations().iterator(); oi.hasNext();) { - Operation operation = (Operation)oi.next(); - BindingOperation bindingOperation = - createBindingOperation(definition, operation, "urn:" + operation.getName()); - binding.addBindingOperation(bindingOperation); - } - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - @SuppressWarnings("unchecked") - public BindingOperation createBindingOperation(Definition definition, Operation operation, String action) - throws WSDLException { - BindingOperation bindingOperation = definition.createBindingOperation(); - bindingOperation.setOperation(operation); - configureBindingOperation(bindingOperation, operation); - ExtensibilityElement operationExtension = - definition.getExtensionRegistry().createExtension(BindingOperation.class, soapOperation); - if (requiresSOAP12) { - ((SOAP12Operation)operationExtension).setSoapActionURI(action); - } else { - ((SOAPOperation)operationExtension).setSoapActionURI(action); - } - bindingOperation.addExtensibilityElement(operationExtension); - if (operation.getInput() != null) { - BindingInput bindingInput = definition.createBindingInput(); - configureBindingInput(bindingInput, operation.getInput()); - ExtensibilityElement inputExtension = - definition.getExtensionRegistry().createExtension(BindingInput.class, soapBody); - if (requiresSOAP12) { - ((SOAP12Body)inputExtension).setUse("literal"); - } else { - ((SOAPBody)inputExtension).setUse("literal"); - } - bindingInput.addExtensibilityElement(inputExtension); - bindingOperation.setBindingInput(bindingInput); - } - if (operation.getOutput() != null) { - BindingOutput bindingOutput = definition.createBindingOutput(); - configureBindingOutput(bindingOutput, operation.getOutput()); - ExtensibilityElement outputExtension = - definition.getExtensionRegistry().createExtension(BindingOutput.class, soapBody); - if (requiresSOAP12) { - ((SOAP12Body)outputExtension).setUse("literal"); - } else { - ((SOAPBody)outputExtension).setUse("literal"); - } - bindingOutput.addExtensibilityElement(outputExtension); - bindingOperation.setBindingOutput(bindingOutput); - } - for (Iterator fi = operation.getFaults().values().iterator(); fi.hasNext();) { - Fault fault = (Fault)fi.next(); - BindingFault bindingFault = definition.createBindingFault(); - ExtensibilityElement faultExtension = - definition.getExtensionRegistry().createExtension(BindingFault.class, soapFault); - configureBindingFault(bindingFault, faultExtension, fault); - bindingFault.addExtensibilityElement(faultExtension); - bindingOperation.addBindingFault(bindingFault); - } - return bindingOperation; - } - - protected void configureBindingOperation(BindingOperation bindingOperation, Operation operation) - throws WSDLException { - bindingOperation.setName(operation.getName()); - } - - protected void configureBindingInput(BindingInput bindingInput, Input input) throws WSDLException { - bindingInput.setName(input.getName()); - } - - protected void configureBindingOutput(BindingOutput bindingOutput, Output output) throws WSDLException { - bindingOutput.setName(output.getName()); - } - - protected void configureBindingFault(BindingFault bindingFault, - ExtensibilityElement faultExtension, - Fault fault) - throws WSDLException { - String faultName = fault.getName(); - bindingFault.setName(faultName); - if (requiresSOAP12) { - ((SOAP12Fault)faultExtension).setName(faultName); - ((SOAP12Fault)faultExtension).setUse("literal"); - } else { - ((SOAPFault)faultExtension).setName(faultName); - ((SOAPFault)faultExtension).setUse("literal"); - } - } - - public Service createService(Definition definition, PortType portType) { - try { - Service service = definition.createService(); - configureService(definition, service, portType); - // createPort(definition, binding, service); - definition.addService(service); - return service; - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - public Service createService(Definition definition, Binding binding) { - try { - Service service = definition.createService(); - configureService(definition, service, binding.getPortType()); - // createPort(definition, binding, service); - definition.addService(service); - return service; - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - protected void configureService(Definition definition, Service service, PortType portType) throws WSDLException { - QName portTypeName = portType.getQName(); - if (portTypeName != null) { - // Choose <porttype>Service if available. If this name is in use, insert - // separating underscores until there is no clash. - for (String suffix = SERVICE_SUFFIX; ; suffix = "_" + suffix) { - QName name = new QName(definition.getTargetNamespace(), portTypeName.getLocalPart() + suffix); - if (definition.getService(name) == null) { - service.setQName(name); - break; - } - } - } - } - - public Port createPort(Definition definition, Binding binding, Service service, String uri) { - try { - Port port = definition.createPort(); - port.setBinding(binding); - configurePort(port, binding); - if (uri != null) { - ExtensibilityElement portExtension = - definition.getExtensionRegistry().createExtension(Port.class, soapAddress); - if (requiresSOAP12) { - ((SOAP12Address)portExtension).setLocationURI(uri); - } else { - ((SOAPAddress)portExtension).setLocationURI(uri); - } - port.addExtensibilityElement(portExtension); - } - service.addPort(port); - return port; - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - protected void configurePort(Port port, Binding binding) throws WSDLException { - if (binding.getPortType() != null && binding.getPortType().getQName() != null) { - port.setName(binding.getPortType().getQName().getLocalPart() + PORT_SUFFIX); - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLGenerationException.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLGenerationException.java deleted file mode 100644 index 1a9b26d618..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLGenerationException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import org.apache.tuscany.sca.monitor.Problem; -import org.oasisopen.sca.ServiceRuntimeException; - -public class WSDLGenerationException extends ServiceRuntimeException { - private static final long serialVersionUID = 1L; - private Problem problem; - - public WSDLGenerationException() { - super(); - } - - public WSDLGenerationException(String message, Throwable cause) { - super(message, cause); - } - - public WSDLGenerationException(String message) { - super(message); - } - - public WSDLGenerationException(Throwable cause) { - super(cause); - } - - public WSDLGenerationException(String message, Throwable cause, Problem problem) { - super(message, cause); - this.problem = problem; - } - - public Problem getProblem() { - return problem; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java deleted file mode 100644 index c573f5f62e..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -//FIXME: trim the import list down to what's really needed - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.Import; -import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.wsdl.WSDLException; -import javax.wsdl.extensions.ExtensibilityElement; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap.SOAPBinding; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.extensions.soap12.SOAP12Binding; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLWriter; -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.AbstractContract; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.CompositeService; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Text; - -/** - * WSDLServiceGenerator generates a binding WSDL service document. - * - * @version $Rev$ $Date$ - */ -public class WSDLServiceGenerator { - // the following switch is temporary for debugging - public static boolean printWSDL; // external code sets this to print generated WSDL - - private static final Logger logger = Logger.getLogger(WSDLServiceGenerator.class.getName()); - private static final QName TRANSPORT_JMS_QUALIFIED_INTENT = - new QName("http://docs.oasis-open.org/ns/opencsa/sca/200903", "transport.jms"); - private static final String DEFAULT_QUEUE_CONNECTION_FACTORY = "TuscanyQueueConnectionFactory"; - private static final String ADDRESS = "Address"; - - private WSDLServiceGenerator() { - // this class has static methods only and cannot be instantiated - } - - /** - * Log a warning message. - * @param problem - */ - private static void logWarning(Problem problem) { - Logger problemLogger = Logger.getLogger(problem.getSourceClassName(), problem.getBundleName()); - if (problemLogger != null){ - problemLogger.logp(Level.WARNING, problem.getSourceClassName(), null, problem.getMessageId(), problem.getMessageParams()); - } else { - logger.severe("Can't get logger " + problem.getSourceClassName()+ " with bundle " + problem.getBundleName()); - } - } - - /** - * Report a warning. - * @param message - * @param binding - * @param parameters - */ - private static void warning(Monitor monitor, String message, WebServiceBinding wsBinding, String... messageParameters) { - Problem problem = monitor.createProblem(WSDLServiceGenerator.class.getName(), "wsdlgen-validation-messages", Severity.WARNING, wsBinding, message, (Object[])messageParameters); - if (monitor != null) { - monitor.problem(problem); - } else { - logWarning(problem); - } - } - - /** - * Report an error. - * @param message - * @param binding - * @param parameters - */ - private static void error(Monitor monitor, String message, WebServiceBinding wsBinding, String... messageParameters) { - Problem problem = monitor.createProblem(WSDLServiceGenerator.class.getName(), "wsdlgen-validation-messages", Severity.ERROR, wsBinding, message, (Object[])messageParameters); - if (monitor != null) { - monitor.problem(problem); - } else { - throw new WSDLGenerationException(problem.toString(), null, problem); - } - } - - /** - * Generate a suitably configured WSDL definition - */ - protected static Definition configureWSDLDefinition(WebServiceBinding wsBinding, - Component component, - AbstractContract contract, - Monitor monitor) { - - //[nash] changes to the builder sequence avoid calling this for a CompositeService - assert !(contract instanceof CompositeService); - // TODO - EPR - $promoted$ no longer used - /* - // For every promoted composite service, the underlying component - // gets a copy of the service with the name prefixed by "$promoted$." - String contractName = (contract instanceof CompositeService ? "$promoted$." : "") + contract.getName(); - */ - String contractName = contract.getName(); - - List<Port> ports = new ArrayList<Port>(); - WSDLDefinition wsdlDefinition = wsBinding.getWSDLDefinition(); - if (wsdlDefinition == null) { - error(monitor, "NoWsdlInterface", wsBinding, component.getName(), contract.getName()); - return null; - } - Definition def = wsdlDefinition.getDefinition(); - if (wsdlDefinition.getBinding() == null) { - // The WSDL document was provided by the user. Generate a new - // WSDL document with imports from the user-provided document. - WSDLFactory factory = null; - try { - factory = WSDLFactory.newInstance(); - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - Definition newDef = factory.newDefinition(); - - // Construct a target namespace from the base URI of the user's - // WSDL document (is this what we should be using?) and a path - // computed according to the SCA Web Service binding spec. - String nsName = component.getName() + "/" + contractName; - String namespaceURI = null; - try { - URI userTNS = new URI(def.getTargetNamespace()); - namespaceURI = userTNS.resolve("/" + nsName).toString(); - } catch (URISyntaxException e1) { - throw new WSDLGenerationException(e1); - } catch (IllegalArgumentException e2) { - throw new WSDLGenerationException(e2); - } - - // set name and targetNamespace attributes on the definition - String defsName = component.getName() + "." + contractName; - newDef.setQName(new QName(namespaceURI, defsName)); - newDef.setTargetNamespace(namespaceURI); - newDef.addNamespace("tns", namespaceURI); - - // set wsdl namespace prefix on the definition - newDef.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/"); - - // import the service or reference interface portType - List<WSDLDefinition> imports = new ArrayList<WSDLDefinition>(); - Interface interfaze = wsBinding.getBindingInterfaceContract().getInterface(); - if (interfaze instanceof WSDLInterface) { - PortType portType = ((WSDLInterface)interfaze).getPortType(); - boolean ok = importPortType(portType, wsdlDefinition, newDef, imports); - if (!ok) { - error(monitor, "PortTypeNotFound", wsBinding, portType.getQName().toString(), - component.getName(), contract.getName()); - } - } - - // import an existing binding if specified - Binding binding = wsBinding.getBinding(); - if (binding != null) { - boolean ok = importBinding(binding, wsdlDefinition, newDef, imports); - if (ok) { - boolean ok2 = importPortType(binding.getPortType(), wsdlDefinition, newDef, imports); - if (!ok2) { - error(monitor, "PortTypeNotFound", wsBinding, binding.getPortType().getQName().toString(), - component.getName(), contract.getName()); - } - } else { - error(monitor, "BindingNotFound", wsBinding, binding.getQName().toString(), - component.getName(), contract.getName()); - } - } - - // import bindings and portTypes needed by services and ports - QName serviceQName = wsBinding.getServiceName(); - String portName = wsBinding.getPortName(); - if (serviceQName != null) { - Service service = def.getService(serviceQName); - if (portName != null) { - Port port = service.getPort(portName); - Port newPort = copyPort(newDef, port, wsBinding); - if (newPort != null) { - importBinding(port.getBinding(), wsdlDefinition, newDef, imports); - ports.add(newPort); - } else { - error(monitor, "InvalidPort", wsBinding, serviceQName.toString(), portName, - component.getName(), contract.getName()); - } - } else { - for (Object port : service.getPorts().values()) { - Port newPort = copyPort(newDef, (Port)port, wsBinding); - if (newPort != null) { - importBinding(((Port)port).getBinding(), wsdlDefinition, newDef, imports); - ports.add(newPort); - } else { - // not an error, just ignore the port - warning(monitor, "IgnoringPort", wsBinding, serviceQName.toString(), ((Port)port).getName(), - component.getName(), contract.getName()); - } - } - if (ports.size() == 0) { - error(monitor, "NoValidPorts", wsBinding, serviceQName.toString(), - component.getName(), contract.getName()); - } - } - } - - // replace original WSDL definition by the generated definition - def = newDef; - - } else { - // The WSDL definition was generated by Interface2WSDLGenerator. - // Reuse it instead of creating a new definition here. - } - - // add a service and ports to the generated definition - WSDLDefinitionGenerator helper = - new WSDLDefinitionGenerator(BindingWSDLGenerator.requiresSOAP12(wsBinding)); - WSDLInterface wi = (WSDLInterface)wsBinding.getBindingInterfaceContract().getInterface(); - PortType portType = wi.getPortType(); - Service service = helper.createService(def, portType); - if (wsBinding.getBinding() == null && ports.size() == 0) { - Binding binding = helper.createBinding(def, portType); - if (BindingWSDLGenerator.requiresSOAP12(wsBinding)) { - def.addNamespace("SOAP12", "http://schemas.xmlsoap.org/wsdl/soap12/"); - } else { - def.addNamespace("SOAP11", "http://schemas.xmlsoap.org/wsdl/soap/"); - } - helper.createBindingOperations(def, binding, portType); - binding.setUndefined(false); - def.addBinding(binding); - - String endpointURI = computeActualURI(wsBinding, null); - Port port = helper.createPort(def, binding, service, endpointURI); - wsBinding.setService(service); - wsBinding.setPort(port); - } else { - if (ports.size() > 0) { - // there are one or more user-specified valid ports - for (Port port : ports) { - service.addPort(port); - } - if (ports.size() == 1) { - // only one port, so use it - wsBinding.setPort(ports.get(0)); - } else { - // multiple ports, make them all available - wsBinding.setPort(null); - } - } else { - // no valid user-specified ports, so create a suitably configured port - String endpointURI = computeActualURI(wsBinding, null); - Port port = helper.createPort(def, wsBinding.getBinding(), service, endpointURI); - if (BindingWSDLGenerator.requiresSOAP12(wsBinding)) { - def.addNamespace("SOAP12", "http://schemas.xmlsoap.org/wsdl/soap12/"); - } else { - def.addNamespace("SOAP11", "http://schemas.xmlsoap.org/wsdl/soap/"); - } - wsBinding.setPort(port); - } - wsBinding.setService(service); - } - - // for debugging - if (printWSDL) { - try { - System.out.println("Generated WSDL for " + component.getName() + "/" + contractName); - WSDLWriter writer = javax.wsdl.factory.WSDLFactory.newInstance().newWSDLWriter(); - writer.writeWSDL(def, System.out); - } catch (WSDLException e) { - throw new WSDLGenerationException(e); - } - } - - return def; - } - - private static boolean importPortType(PortType portType, - WSDLDefinition wsdlDef, - Definition newDef, - List<WSDLDefinition> imports) { - return addImport(portType.getQName(), PortType.class, wsdlDef, newDef, imports); - } - - private static boolean importBinding(Binding binding, - WSDLDefinition wsdlDef, - Definition newDef, - List<WSDLDefinition> imports) { - boolean ok = addImport(binding.getQName(), Binding.class, wsdlDef, newDef, imports); - if (ok) { - List bindingExtensions = binding.getExtensibilityElements(); - for (final Object extension : bindingExtensions) { - if (extension instanceof SOAPBinding) { - newDef.addNamespace("SOAP11", "http://schemas.xmlsoap.org/wsdl/soap/"); - } - if (extension instanceof SOAP12Binding) { - newDef.addNamespace("SOAP12", "http://schemas.xmlsoap.org/wsdl/soap12/"); - } - } - } - return ok; - } - - private static boolean addImport(QName name, - Class type, - WSDLDefinition wsdlDef, - Definition newDef, - List<WSDLDefinition> imports) { - String namespace = name.getNamespaceURI(); - if (newDef.getImports(namespace) == null) { - WSDLDefinition impDef = findDefinition(wsdlDef, name, type); - if (impDef != null) { - Import imp = newDef.createImport(); - imp.setNamespaceURI(namespace); - imp.setLocationURI(impDef.getURI().toString()); - imp.setDefinition(impDef.getDefinition()); - newDef.addNamespace("ns" + imports.size(), namespace); - newDef.addImport(imp); - imports.add(impDef); - return true; - } else { - // import was not added because element not found - return false; - } - } - return true; - } - - private static WSDLDefinition findDefinition(WSDLDefinition wsdlDef, QName name, Class type) { - if (wsdlDef == null || name == null) { - return wsdlDef; - } - if (wsdlDef.getURI() != null) { // not a facade - Definition def = wsdlDef.getDefinition(); - Map types = type == PortType.class ? def.getPortTypes() : def.getBindings(); - if (types.get(name) != null) { - return wsdlDef; - } - } - for (WSDLDefinition impDef : wsdlDef.getImportedDefinitions()) { - WSDLDefinition d = findDefinition(impDef, name, type); - if (d != null) { - return d; - } - } - return null; - } - - private static Port copyPort(Definition def, Port port, WebServiceBinding wsBinding) { - Port newPort = def.createPort(); - newPort.setName(port.getName()); - newPort.setBinding(port.getBinding()); - List portExtensions = port.getExtensibilityElements(); - for (final Object extension : portExtensions) { - ExtensibilityElement newExt = null; - if (extension instanceof SOAPAddress) { - def.addNamespace("SOAP11", "http://schemas.xmlsoap.org/wsdl/soap/"); - try { - newExt = def.getExtensionRegistry().createExtension( - Port.class, WSDLDefinitionGenerator.SOAP_ADDRESS); - } catch (WSDLException e) { - } - String uri = computeActualURI(wsBinding, port); - ((SOAPAddress)newExt).setLocationURI(uri); - newPort.addExtensibilityElement(newExt); - } else if (extension instanceof SOAP12Address) { - def.addNamespace("SOAP12", "http://schemas.xmlsoap.org/wsdl/soap12/"); - try { - newExt = def.getExtensionRegistry().createExtension( - Port.class, WSDLDefinitionGenerator.SOAP12_ADDRESS); - } catch (WSDLException e) { - } - String uri = computeActualURI(wsBinding, port); - ((SOAP12Address)newExt).setLocationURI(uri); - newPort.addExtensibilityElement(newExt); - } else { - // we don't support ports with other extensibility elements such as HTTPAddress - return null; - } - } - return newPort; - } - - /** - * Compute the endpoint URI based on section 2.1.1 of the WS binding Specification 1. - * The URIs in the endpoint(s) of the referenced WSDL, which may be relative - * 2. The URI specified by the wsa:Address element of the - * wsa:EndpointReference, which may be relative 3. The explicitly stated URI - * in the "uri" attribute of the binding.ws element, which may be relative, - * 4. The implicit URI as defined by in section 1.7 in the SCA Assembly Specification - * If the <binding.ws> has no wsdlElement but does have a uri attribute then - * the uri takes precedence over any implicitly used WSDL. - * - */ - private static String computeActualURI(WebServiceBinding wsBinding, Port port) { - - URI eprURI = null; - if (wsBinding.getEndPointReference() != null) { - eprURI = getEPR(wsBinding); - } - - URI wsdlURI = null; - if (wsBinding.getServiceName() != null && wsBinding.getBindingName() == null) { - // <binding.ws> explicitly points at a WSDL port, may be a relative URI - wsdlURI = getEndpoint(port); - } - - // if the WSDL port/endpoint has an absolute URI use that - if (wsdlURI != null && wsdlURI.isAbsolute()) { - return wsdlURI.toString(); - } - - // if the wsa:EndpointReference has an address element with an absolute URI use that - if (eprURI != null && eprURI.isAbsolute()) { - return eprURI.toString(); - } - - // either there is no WSDL port endpoint URI or that URI is relative - String actualURI = wsBinding.getURI(); - if (eprURI != null && eprURI.toString().length() != 0) { - // there is a relative URI in the binding EPR - actualURI = actualURI + "/" + eprURI; - } - - if (wsdlURI != null && wsdlURI.toString().length() != 0) { - // there is a relative URI in the WSDL port - actualURI = actualURI + "/" + wsdlURI; - } - - if (actualURI != null) { - actualURI = URI.create(actualURI).normalize().toString(); - } - - return actualURI; - } - - private static URI getEPR(WebServiceBinding wsBinding) { - NodeList nodeList = wsBinding.getEndPointReference().getChildNodes(); - for (int i = 0; i < nodeList.getLength(); i++) { - Node childNode = nodeList.item(i); - if (childNode instanceof Element && ADDRESS.equals(childNode.getLocalName())) { - NodeList addrNodes = childNode.getChildNodes(); - for (int j = 0; j < addrNodes.getLength(); j++) { - Node addrNode = addrNodes.item(j); - if (addrNode instanceof Text) { - return URI.create(((Text)addrNode).getWholeText()); - } - } - } - } - return null; - } - - /** - * Returns the endpoint of a given port. - */ - private static URI getEndpoint(Port wsdlPort) { - if (wsdlPort != null) { - List<?> wsdlPortExtensions = wsdlPort.getExtensibilityElements(); - for (Object extension : wsdlPortExtensions) { - if (extension instanceof SOAPAddress) { - String uri = ((SOAPAddress)extension).getLocationURI(); - return (uri == null || "".equals(uri)) ? null : URI.create(uri); - } - if (extension instanceof SOAP12Address) { - SOAP12Address address = (SOAP12Address)extension; - String uri = address.getLocationURI(); - return (uri == null || "".equals(uri)) ? null : URI.create(uri); - } - } - } - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties deleted file mode 100644 index 1450fa94a1..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties +++ /dev/null @@ -1,31 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -WsdlGenProblem = Unable to generate WSDL for {0}/{1} -WsdlGenException = Exception while generating WSDL for {0}/{1} -UnexpectedException = Exception thrown was: {0} -MissingInterfaceContract = No interface contract for {0}/{1} -InterfaceNotRemotable = Interface not remotable: {0} -IgnoringPort = Port {0}/{1} in {2}/{3} is not supported and was ignored -PortTypeNotFound = PortType {0} in {1}/{2} was not found -BindingNotFound = Binding {0} in {1}/{2} was not found -InvalidPort = Port {0}/{1} in {2}/{3} is not supported -NoValidPorts = No valid ports for service {0} in {1}/{2} -NoWsdlInterface = No WSDL interface definition for {0}/{1} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/Other.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/Other.java deleted file mode 100644 index 7e6a1de546..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/Other.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.other; - -/** - * - * @version $Rev$ $Date$ - */ -public class Other { - private String name; - - public String getName() { - return name; - } - public void setName(String name ) { - this.name = name; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java deleted file mode 100644 index f10a2286e6..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://other.ws.binding.sca.tuscany.apache.org/") -package org.apache.tuscany.sca.binding.ws.other; - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java deleted file mode 100644 index c9bfce5865..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint; -import org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor; -import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint; -import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; -import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSFaultExceptionMapper; -import org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract; -import org.apache.tuscany.sca.xsd.XSDFactory; -import org.apache.tuscany.sca.xsd.xml.XSDModelResolver; -import org.oasisopen.sca.annotation.Remotable; - -/** - * - * @version $Rev$ $Date$ - */ -public class BindingWSDLGeneratorTestCase extends TestCase { - - public void testCreateWSDLInterfaceContract() throws InvalidInterfaceException { - org.apache.tuscany.sca.core.FactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry()); - WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class); - XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class); - JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory(); - JavaInterfaceContract javaIC = factory.createJavaInterfaceContract(); - JavaInterface iface = factory.createJavaInterface(HelloWorld.class); - DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(); - JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null); - new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface); - new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface); - javaIC.setInterface(iface); - WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, null); - assertNotNull(wsdlIC); - WSDLInterface wsdlInterface = (WSDLInterface)wsdlIC.getInterface(); - assertNotNull(wsdlInterface); - assertEquals(1, wsdlInterface.getOperations().size()); - assertEquals("sayHello", wsdlInterface.getOperations().get(0).getName()); - assertNotNull(wsdlInterface.getPortType()); - - JavaInterfaceContract javaIC2 = factory.createJavaInterfaceContract(); - JavaInterface iface2 = factory.createJavaInterface(TestJavaInterface.class); - new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface2); - new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface2); - javaIC2.setInterface(iface2); - WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, null); - assertNotNull(wsdlIC2); - } - -} - -@Remotable -interface HelloWorld { - String sayHello(String s); -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java deleted file mode 100644 index 670c3a4003..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import java.io.StringWriter; - -import javax.wsdl.Definition; -import javax.wsdl.xml.WSDLWriter; - -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint; -import org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor; -import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint; -import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSFaultExceptionMapper; -import org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor; -import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory; -import org.apache.tuscany.sca.xsd.DefaultXSDFactory; -import org.apache.tuscany.sca.xsd.XSDFactory; -import org.apache.tuscany.sca.xsd.xml.XSDModelResolver; -import org.junit.Test; - -/** - * @version $Rev$ $Date$ - */ -public class Interface2WSDLGeneratorTestCase { - - @Test - public void testGenerate() throws Exception { - JavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(); - JavaInterface iface = iFactory.createJavaInterface(TestJavaInterface.class); - DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(); - JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null); - new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface); - new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface); - DefaultFactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry()); - WSDLFactory wFactory = new DefaultWSDLFactory(modelFactories); - WSDLDefinition wsdlDefinition = wFactory.createWSDLDefinition(); - XSDFactory factory = new DefaultXSDFactory(); - Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null), dataBindings, factory, null); - Definition definition = generator.generate(iface, wsdlDefinition); - - // print the generated WSDL file and inline schemas - WSDLWriter writer = generator.getFactory().newWSDLWriter(); - StringWriter sw = new StringWriter(); - writer.writeWSDL(definition, sw); - System.out.println(sw.toString()); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestException.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestException.java deleted file mode 100644 index 1e4f802e01..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestException.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -/** - * - * @version $Rev$ $Date$ - */ -public class TestException extends Exception { - - private String userdata; - - public TestException(String message) { - super(message); - } - - public TestException(String message, String userdata) { - super(message); - this.userdata = userdata; - } - - public String getUserdata() { - return userdata; - } - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestFault.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestFault.java deleted file mode 100644 index da2c285bac..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestFault.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import javax.xml.ws.WebFault; - -/** - * - * @version $Rev$ $Date$ - */ -@WebFault(faultBean="org.apache.tuscany.sca.binding.ws.wsdlgen.TestFaultBean") -public class TestFault extends Exception { - - private TestFaultBean bean; - - public TestFault(TestFaultBean bean, String message) { - super(message); - this.bean = bean; - } - - public TestFault(TestFaultBean bean, String message, Throwable cause) { - super(message, cause); - this.bean = bean; - } - - public TestFaultBean getFaultInfo() { - return bean; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestFaultBean.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestFaultBean.java deleted file mode 100644 index 64cce0e49d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestFaultBean.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -/** - * - * @version $Rev$ $Date$ - */ -public class TestFaultBean { - private String lastName; - private String firstName; - private float age; - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public float getAge() { - return age; - } - - public void setAge(float age) { - this.age = age; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaClass.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaClass.java deleted file mode 100644 index 3fd7361ae1..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaClass.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; -import org.apache.tuscany.sca.binding.ws.other.Other; - -/** - * - * @version $Rev$ $Date$ - */ -public class TestJavaClass { - public Other other; - public String name; - public int number; - public float balance; -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java deleted file mode 100644 index 5278a55d8a..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.wsdlgen; - -import javax.jws.WebMethod; -import javax.jws.WebService; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * - * @version $Rev$ $Date$ - */ -@Remotable -@WebService -public interface TestJavaInterface { - String m1(String str); - - @OneWay - @WebMethod - void m2(int i); - - @WebMethod - String m3(); - - void m4(); - - @WebMethod - String m5(String str, int i); - - @WebMethod(exclude = true) - void dummy(); - - @WebMethod - void m6(TestJavaClass info) throws TestException; - - @WebMethod - void m7(TestJavaClass info) throws TestFault; -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/LICENSE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/META-INF/MANIFEST.MF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/META-INF/MANIFEST.MF deleted file mode 100644 index 95e39b08b9..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/META-INF/MANIFEST.MF +++ /dev/null @@ -1,35 +0,0 @@ -Manifest-Version: 1.0
-Private-Package: org.apache.tuscany.sca.binding.ws.xml;version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: Apache Tuscany SCA WS Binding XML Model
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: 2.0.0
-Bnd-LastModified: 1225397333296
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA WS Binding XML Model
-Import-Package: javax.wsdl,
- javax.xml.namespace,
- javax.xml.parsers,
- javax.xml.stream,
- javax.xml.transform,
- javax.xml.transform.dom,
- org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.assembly.builder;version="2.0.0",
- org.apache.tuscany.sca.assembly.xml;version="2.0.0",
- org.apache.tuscany.sca.binding.ws;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.wsdlgen,
- org.apache.tuscany.sca.contribution.processor;version="2.0.0",
- org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
- org.apache.tuscany.sca.core;version="2.0.0",
- org.apache.tuscany.sca.definitions;version="2.0.0";resolution:=optional,
- org.apache.tuscany.sca.interfacedef;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.wsdl;version="2.0.0",
- org.apache.tuscany.sca.monitor;version="2.0.0",
- org.apache.tuscany.sca.policy;version="2.0.0",
- org.apache.tuscany.sca.xsd;version="2.0.0",
- org.w3c.dom
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.ws.xml
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/NOTICE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/NOTICE deleted file mode 100644 index 25bb89c9b2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/pom.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/pom.xml deleted file mode 100644 index 449f883e22..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>2.0-M3</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-binding-ws-xml</artifactId> - <name>Apache Tuscany SCA WS Binding XML Model</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-contribution</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-assembly-xml</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-wsdlgen</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-interface-wsdl</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-sca-runtime</artifactId> - <version>2.0-M3</version> - <scope>test</scope> - </dependency> - - </dependencies> - -</project> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/BindingBuilderImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/BindingBuilderImpl.java deleted file mode 100644 index f2376231ab..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/BindingBuilderImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.xml; - -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator; -import org.apache.tuscany.sca.assembly.AbstractContract; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.builder.BindingBuilder; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.monitor.Monitor; - -/** - * A factory for the calculated WSDL document needed by Web Service bindings. - * - * @version $Rev$ $Date$ - */ -public class BindingBuilderImpl implements BindingBuilder { - - private ExtensionPointRegistry extensionPoints; - - public BindingBuilderImpl(ExtensionPointRegistry extensionPoints) { - this.extensionPoints = extensionPoints; - } - - /** - * Create a calculated WSDL document and save it in the Web Service binding. - */ - public void build(Component component, AbstractContract contract, Binding binding, Monitor monitor) { - BindingWSDLGenerator.generateWSDL(component, contract, (WebServiceBinding)binding, extensionPoints, monitor); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/EndPointReferenceHelper.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/EndPointReferenceHelper.java deleted file mode 100644 index 9051dc0af7..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/EndPointReferenceHelper.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.xml; - -import static javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; -import javax.xml.transform.dom.DOMSource; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -/** - * Helper methods to read and write a wsa:endpointReference - * TODO: almost direct copy of code for Assembly properties - * must be able to move to a common utility - * - * @version $Rev$ $Date$ - */ -public class EndPointReferenceHelper { - - /** - * Read a wsa:endpointReference into a DOM Element - */ - public static Element readEndPointReference(XMLStreamReader reader) { - try { - - return loadElement(reader); - - } catch (XMLStreamException e) { - throw new RuntimeException(e); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - } - - /** - * Write a wsa:endpointReference from a DOM Element - */ - public static void writeEndPointReference(Element element, XMLStreamWriter writer) { - try { - - saveElement(element, writer); - - } catch (XMLStreamException e) { - throw new RuntimeException(e); - } - } - - private static Element loadElement(XMLStreamReader reader) throws XMLStreamException, ParserConfigurationException { - Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); - Node root = document; - Node current = root; - while (true) { - switch (reader.getEventType()) { - case XMLStreamConstants.START_ELEMENT: - QName name = reader.getName(); - Element child = createElement(document, name); - - // push the new element and make it the current one - current.appendChild(child); - current = child; - - int count = reader.getNamespaceCount(); - for (int i = 0; i < count; i++) { - String prefix = reader.getNamespacePrefix(i); - String ns = reader.getNamespaceURI(i); - declareNamespace(child, prefix, ns); - } - - if(!"".equals(name.getNamespaceURI())) - declareNamespace(child, name.getPrefix(), name.getNamespaceURI()); - - // add the attributes for this element - count = reader.getAttributeCount(); - for (int i = 0; i < count; i++) { - String ns = reader.getAttributeNamespace(i); - String prefix = reader.getAttributePrefix(i); - String qname = reader.getAttributeLocalName(i); - String value = reader.getAttributeValue(i); - if (prefix != null && prefix.length() != 0) { - qname = prefix + ":" + qname; - } - child.setAttributeNS(ns, qname, value); - if (ns != null) { - declareNamespace(child, prefix, ns); - } - } - - break; - case XMLStreamConstants.CDATA: - current.appendChild(document.createCDATASection(reader.getText())); - break; - case XMLStreamConstants.CHARACTERS: - current.appendChild(document.createTextNode(reader.getText())); - break; - case XMLStreamConstants.END_ELEMENT: - // if we are back at the root then we are done - if ("EndpointReference".equals(reader.getName().getLocalPart())) { - return document.getDocumentElement(); - } - - // pop the element off the stack - current = current.getParentNode(); - } - if ( reader.hasNext()) reader.next(); - } - } - - private static Element createElement(Document document, QName name) { - String prefix = name.getPrefix(); - String qname = - (prefix != null && prefix.length() > 0) ? prefix + ":" + name.getLocalPart() : name.getLocalPart(); - return document.createElementNS(name.getNamespaceURI(), qname); - } - - private static void declareNamespace(Element element, String prefix, String ns) { - if (ns == null) { - ns = ""; - } - if (prefix == null) { - prefix = ""; - } - String qname = null; - if ("".equals(prefix)) { - qname = "xmlns"; - } else { - qname = "xmlns:" + prefix; - } - Node node = element; - boolean declared = false; - while (node != null && node.getNodeType() == Node.ELEMENT_NODE) { - NamedNodeMap attrs = node.getAttributes(); - if (attrs == null) { - break; - } - Node attr = attrs.getNamedItem(qname); - if (attr != null) { - declared = ns.equals(attr.getNodeValue()); - break; - } - node = node.getParentNode(); - } - if (!declared) { - org.w3c.dom.Attr attr = element.getOwnerDocument().createAttributeNS(XMLNS_ATTRIBUTE_NS_URI, qname); - attr.setValue(ns); - element.setAttributeNodeNS(attr); - } - } - - private static void saveElement(Element element, XMLStreamWriter writer) throws XMLStreamException{ - - XMLStreamReader reader = - XMLInputFactory.newInstance().createXMLStreamReader(new DOMSource(element)); - - while (reader.hasNext()) { - switch (reader.next()) { - case XMLStreamConstants.START_ELEMENT: - QName name = reader.getName(); - writer.writeStartElement(name.getPrefix(), name.getLocalPart(), name.getNamespaceURI()); - - int namespaces = reader.getNamespaceCount(); - for (int i = 0; i < namespaces; i++) { - String prefix = reader.getNamespacePrefix(i); - String ns = reader.getNamespaceURI(i); - writer.writeNamespace(prefix, ns); - } - - if (!"".equals(name.getNamespaceURI())) { - writer.writeNamespace(name.getPrefix(), name.getNamespaceURI()); - } - - // add the attributes for this element - namespaces = reader.getAttributeCount(); - for (int i = 0; i < namespaces; i++) { - String ns = reader.getAttributeNamespace(i); - String prefix = reader.getAttributePrefix(i); - String qname = reader.getAttributeLocalName(i); - String value = reader.getAttributeValue(i); - - writer.writeAttribute(prefix, ns, qname, value); - } - - break; - case XMLStreamConstants.CDATA: - writer.writeCData(reader.getText()); - break; - case XMLStreamConstants.CHARACTERS: - writer.writeCharacters(reader.getText()); - break; - case XMLStreamConstants.END_ELEMENT: - writer.writeEndElement(); - break; - } - } - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java deleted file mode 100644 index 3e9b07c4be..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.xml; - -import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; -import static javax.xml.stream.XMLStreamConstants.START_ELEMENT; - -import java.util.Map; - -import javax.wsdl.Binding; -import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; -import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.policy.PolicyFactory; - -/** - * This is the StAXArtifactProcessor for the Web Services Binding. - * - * @version $Rev$ $Date$ - */ -public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServiceBinding>, WebServiceConstants { - - private ExtensionPointRegistry extensionPoints; - private WSDLFactory wsdlFactory; - private WebServiceBindingFactory wsFactory; - private PolicyFactory policyFactory; - private PolicySubjectProcessor policyProcessor; - //private PolicyFactory intentAttachPointTypeFactory; - private Monitor monitor; - - public WebServiceBindingProcessor(ExtensionPointRegistry extensionPoints) { - this.extensionPoints = extensionPoints; - FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); - this.policyFactory = modelFactories.getFactory(PolicyFactory.class); - this.wsFactory = modelFactories.getFactory(WebServiceBindingFactory.class); - this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class); - this.policyProcessor = new PolicySubjectProcessor(policyFactory); - //this.intentAttachPointTypeFactory = modelFactories.getFactory(PolicyFactory.class); - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - if (monitorFactory != null) { - this.monitor = monitorFactory.createMonitor(); - } - } - - /** - * Report a warning. - * - * @param problems - * @param message - * @param model - */ - private void warning(String message, Object model, Object... messageParameters) { - if (monitor != null) { - Problem problem = monitor.createProblem(this.getClass().getName(), "binding-wsxml-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters); - monitor.problem(problem); - } - } - - /** - * Report a error. - * - * @param problems - * @param message - * @param model - */ - private void error(String message, Object model, Object... messageParameters) { - if (monitor != null) { - Problem problem = monitor.createProblem(this.getClass().getName(), "binding-wsxml-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); - monitor.problem(problem); - } - } - - public WebServiceBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - - // Read a <binding.ws> - WebServiceBinding wsBinding = wsFactory.createWebServiceBinding(); - /*ExtensionType bindingType = intentAttachPointTypeFactory.createBindingType(); - bindingType.setName(getArtifactType()); - bindingType.setUnresolved(true); - ((PolicySubject)wsBinding).setType(bindingType);*/ - wsBinding.setUnresolved(true); - wsBinding.setBuilder(new BindingBuilderImpl(extensionPoints)); - - // Read policies - policyProcessor.readPolicies(wsBinding, reader); - - // Read the binding name - String name = reader.getAttributeValue(null, NAME); - if (name != null) { - wsBinding.setName(name); - } - - // Read URI - String uri = reader.getAttributeValue(null, URI); - if (uri != null) { - wsBinding.setURI(uri); - } - - // Read a qname in the form: - // namespace#wsdl.???(name) - Boolean wsdlElementIsBinding = null; - String wsdlElement = reader.getAttributeValue(null, WSDL_ELEMENT); - if (wsdlElement != null) { - int index = wsdlElement.indexOf('#'); - if (index == -1) { - error("InvalidWsdlElementAttr", reader, wsdlElement); - //throw new ContributionReadException("Invalid WebService binding wsdlElement attribute: " + wsdlElement); - return wsBinding; - } - String namespace = wsdlElement.substring(0, index); - wsBinding.setNamespace(namespace); - String localName = wsdlElement.substring(index + 1); - if (localName.startsWith("wsdl.service")) { - - // Read a wsdl.service - localName = localName.substring("wsdl.service(".length(), localName.length() - 1); - wsBinding.setServiceName(new QName(namespace, localName)); - - } else if (localName.startsWith("wsdl.port")) { - - // Read a wsdl.port - localName = localName.substring("wsdl.port(".length(), localName.length() - 1); - int s = localName.indexOf('/'); - if (s == -1) { - error("InvalidWsdlElementAttr", reader, wsdlElement); - //throw new ContributionReadException("Invalid WebService binding wsdlElement attribute: " + wsdlElement); - } else { - wsBinding.setServiceName(new QName(namespace, localName.substring(0, s))); - wsBinding.setPortName(localName.substring(s + 1)); - } - } else if (localName.startsWith("wsdl.endpoint")) { - - // Read a wsdl.endpoint - localName = localName.substring("wsdl.endpoint(".length(), localName.length() - 1); - int s = localName.indexOf('/'); - if (s == -1) { - error("InvalidWsdlElementAttr", reader, wsdlElement); - //throw new ContributionReadException("Invalid WebService binding wsdlElement attribute: " + wsdlElement); - } else { - wsBinding.setServiceName(new QName(namespace, localName.substring(0, s))); - wsBinding.setEndpointName(localName.substring(s + 1)); - } - } else if (localName.startsWith("wsdl.binding")) { - - // Read a wsdl.binding - localName = localName.substring("wsdl.binding(".length(), localName.length() - 1); - wsBinding.setBindingName(new QName(namespace, localName)); - - wsdlElementIsBinding = true; - - } else { - error("InvalidWsdlElementAttr", reader, wsdlElement); - //throw new ContributionReadException("Invalid WebService binding wsdlElement attribute: " + wsdlElement); - } - } - - // Read wsdlLocation - wsBinding.setLocation(reader.getAttributeValue(WSDLI_NS, WSDL_LOCATION)); - - // Skip to end element - while (reader.hasNext()) { - int event = reader.next(); - switch (event) { - case START_ELEMENT: { - if (END_POINT_REFERENCE.equals(reader.getName().getLocalPart())) { - if (wsdlElement != null && (wsdlElementIsBinding == null || !wsdlElementIsBinding)) { - error("MustUseWsdlBinding", reader, wsdlElement); - throw new ContributionReadException(wsdlElement + " must use wsdl.binding when using wsa:EndpointReference"); - } - wsBinding.setEndPointReference(EndPointReferenceHelper.readEndPointReference(reader)); - } - } - break; - - } - - if (event == END_ELEMENT && BINDING_WS_QNAME.equals(reader.getName())) { - break; - } - } - return wsBinding; - } - - protected void processEndPointReference(XMLStreamReader reader, WebServiceBinding wsBinding) { - } - - public void write(WebServiceBinding wsBinding, XMLStreamWriter writer) throws ContributionWriteException, - XMLStreamException { - - // Write a <binding.ws> - policyProcessor.writePolicyPrefixes(wsBinding, writer); - writer.writeStartElement(SCA11_NS, BINDING_WS); - policyProcessor.writePolicyAttributes(wsBinding, writer); - - // Write binding name - if (wsBinding.getName() != null) { - writer.writeAttribute(NAME, wsBinding.getName()); - } - - // Write binding URI - if (wsBinding.getURI() != null) { - writer.writeAttribute(URI, wsBinding.getURI()); - } - - // Write wsdlElement attribute - if (wsBinding.getPortName() != null) { - - // Write namespace#wsdl.port(service/port) - String wsdlElement = - wsBinding.getServiceName().getNamespaceURI() + "#wsdl.port(" - + wsBinding.getServiceName().getLocalPart() - + "/" - + wsBinding.getPortName() - + ")"; - writer.writeAttribute(WSDL_ELEMENT, wsdlElement); - - } else if (wsBinding.getEndpointName() != null) { - - // Write namespace#wsdl.endpoint(service/endpoint) - String wsdlElement = - wsBinding.getServiceName().getNamespaceURI() + "#wsdl.endpoint(" - + wsBinding.getServiceName().getLocalPart() - + "/" - + wsBinding.getEndpointName() - + ")"; - writer.writeAttribute(WSDL_ELEMENT, wsdlElement); - - } else if (wsBinding.getBindingName() != null) { - - // Write namespace#wsdl.binding(binding) - String wsdlElement = - wsBinding.getBindingName().getNamespaceURI() + "#wsdl.binding(" - + wsBinding.getBindingName().getLocalPart() - + ")"; - writer.writeAttribute(WSDL_ELEMENT, wsdlElement); - - } else if (wsBinding.getServiceName() != null) { - - // Write namespace#wsdl.service(service) - String wsdlElement = - wsBinding.getServiceName().getNamespaceURI() + "#wsdl.service(" - + wsBinding.getServiceName().getLocalPart() - + ")"; - writer.writeAttribute(WSDL_ELEMENT, wsdlElement); - } - - // Write location - if (wsBinding.getLocation() != null) { - writer.writeAttribute(WSDLI_NS, WSDL_LOCATION, wsBinding.getLocation()); - } - - if (wsBinding.getEndPointReference() != null) { - EndPointReferenceHelper.writeEndPointReference(wsBinding.getEndPointReference(), writer); - } - - writer.writeEndElement(); - } - - public void resolve(WebServiceBinding model, ModelResolver resolver) throws ContributionResolveException { - - if (model == null || !model.isUnresolved()) - return; - - WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition(); - wsdlDefinition.setUnresolved(true); - wsdlDefinition.setNamespace(model.getNamespace()); - WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition); - - if (!resolved.isUnresolved()) { - wsdlDefinition.setDefinition(resolved.getDefinition()); - wsdlDefinition.setLocation(resolved.getLocation()); - wsdlDefinition.setURI(resolved.getURI()); - wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions()); - wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas()); - wsdlDefinition.setUnresolved(false); - model.setDefinition(wsdlDefinition); - if (model.getBindingName() != null) { - WSDLObject<Binding> binding = wsdlDefinition.getWSDLObject(Binding.class, model.getBindingName()); - if (binding != null) { - wsdlDefinition.setDefinition(binding.getDefinition()); - model.setBinding(binding.getElement()); - } else { - warning("WsdlBindingDoesNotMatch", wsdlDefinition, model.getBindingName()); - } - } - if (model.getServiceName() != null) { - WSDLObject<Service> service = wsdlDefinition.getWSDLObject(Service.class, model.getServiceName()); - if (service != null) { - wsdlDefinition.setDefinition(service.getDefinition()); - model.setService(service.getElement()); - if (model.getPortName() != null) { - Port port = service.getElement().getPort(model.getPortName()); - if (port != null) { - model.setPort(port); - model.setBinding(port.getBinding()); - } else { - warning("WsdlPortTypeDoesNotMatch", wsdlDefinition, model.getPortName()); - } - } - } else { - warning("WsdlServiceDoesNotMatch", wsdlDefinition, model.getServiceName()); - } - } - - PortType portType = getPortType(model); - if (portType != null) { - WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract(); - WSDLInterface wsdlInterface = null; - try { - wsdlInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver); - } catch (InvalidInterfaceException e) { - warning("InvalidInterfaceException", wsdlFactory, model.getName()); - } - interfaceContract.setInterface(wsdlInterface); - model.setBindingInterfaceContract(interfaceContract); - } - } - } - - private PortType getPortType(WebServiceBinding model) { - PortType portType = null; - if (model.getPort() != null) { - portType = model.getPort().getBinding().getPortType(); - } else if (model.getEndpoint() != null) { - portType = model.getPort().getBinding().getPortType(); - } else if (model.getBinding() != null) { - portType = model.getBinding().getPortType(); - } else if (model.getService() != null) { - // FIXME: How to find the compatible port? - Map ports = model.getService().getPorts(); - if (!ports.isEmpty()) { - Port port = (Port)ports.values().iterator().next(); - portType = port.getBinding().getPortType(); - } - } - return portType; - } - - public QName getArtifactType() { - return WebServiceConstants.BINDING_WS_QNAME; - } - - public Class<WebServiceBinding> getModelType() { - return WebServiceBinding.class; - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceConstants.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceConstants.java deleted file mode 100644 index 46330c13f5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceConstants.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.xml; - -import javax.xml.namespace.QName; - -/** - * Constants for the Web Services Binding. - * - * @version $Rev$ $Date$ - */ -public interface WebServiceConstants { - String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200903"; - - String BINDING_WS = "binding.ws"; - QName BINDING_WS_QNAME = new QName(SCA11_NS, BINDING_WS); - - String WSDL_ELEMENT = "wsdlElement"; - QName WSDL_ELEMENT_QNAME = new QName(SCA11_NS, WSDL_ELEMENT); - - String WSDL_LOCATION = "wsdlLocation"; - String WSDLI_NS = "http://www.w3.org/2004/08/wsdl-instance"; - - QName WSDL_LOCATION_QNAME = new QName(WSDLI_NS, WSDL_LOCATION); - - String NAME = "name"; - String URI = "uri"; - String END_POINT_REFERENCE = "EndpointReference"; - - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 351e436807..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor;qname=http://docs.oasis-open.org/ns/opencsa/sca/200903#binding.ws,model=org.apache.tuscany.sca.binding.ws.WebServiceBinding diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties deleted file mode 100644 index 2dfa5e6133..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -InvalidWsdlElementAttr = Invalid WebService binding wsdlElement attribute: {0} -MustUseWsdlBinding = {0} must use wsdl.binding when using wsa:EndpointReference -InvalidInterfaceException = Exception creating interface from WSDL for binding: {0} -WsdlBindingDoesNotMatch = The #wsdl.binding({0}) does not match with the WSDL Definitions -WsdlServiceDoesNotMatch = The #wsdl.service({0}) does not match with the WSDL Definitions -WsdlPortTypeDoesNotMatch = The #wsdl.port({0}) does not match with the WSDL Definitions - - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java deleted file mode 100644 index 72d0236e46..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.xml; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.fail; - -import java.io.InputStream; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Test reading WSDL interfaces. - * - * @version $Rev$ $Date$ - */ -public class ReadTestCase { - - private static XMLInputFactory inputFactory; - private static StAXArtifactProcessor<Object> staxProcessor; - private static CompositeBuilder compositeBuilder; - - @BeforeClass - public static void setUp() throws Exception { - DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - inputFactory = XMLInputFactory.newInstance(); - StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); - staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null); - compositeBuilder = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); - } - - @Test - public void testReadComponentType() throws Exception { - InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - ComponentType componentType = (ComponentType)staxProcessor.read(reader); - assertNotNull(componentType); - } - - @Test - public void testReadComposite() throws Exception { - InputStream is = getClass().getResourceAsStream("Calculator.composite"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - Composite composite = (Composite)staxProcessor.read(reader); - assertNotNull(composite); - - compositeBuilder.build(composite, null, null); - } - - @Test - public void testReadPolicies() throws Exception { - InputStream is = getClass().getResourceAsStream("PoliciedCalculator.composite"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - Composite composite = (Composite)staxProcessor.read(reader); - assertNotNull(composite); - - compositeBuilder.build(composite, null, null); - - } - - /** - * This test makes sure that an exception is thrown when a bad wsdlElement is present along with EndpointReference. - * - * Ref: Web Service Binding Specification v1.0 - Sec 2.1 - Lines 61 to 65. - * When an EndpointReference is present along with the wsdlElement attribute on the parent element, the wsdlElement attribute value MUST - * be of the 'Binding' form. - */ - @Test - public void testReadBadWsdlElement() throws Exception { - InputStream is = getClass().getResourceAsStream("Calculator-bad-wsdlElement.composite"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - try { - staxProcessor.read(reader); - fail("ContributionReadException expected."); - } catch(ContributionReadException e) { - // Expected - assertNotSame(-1, e.getMessage().indexOf("must use wsdl.binding when using wsa:EndpointReference")); - } - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java deleted file mode 100644 index 2b3f314fb1..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.xml; - -import static org.junit.Assert.assertNotNull; - -import java.io.ByteArrayOutputStream; -import java.io.InputStream; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLOutputFactory; - -import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Test reading/write WSDL interfaces. - * - * @version $Rev$ $Date$ - */ -public class WriteTestCase { - - private static XMLInputFactory inputFactory; - private static XMLOutputFactory outputFactory; - private static StAXArtifactProcessor<Object> staxProcessor; - - @BeforeClass - public static void setUp() throws Exception { - DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - inputFactory = XMLInputFactory.newInstance(); - outputFactory = XMLOutputFactory.newInstance(); - StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); - staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null); - } - - @Test - public void testReadWriteComponentType() throws Exception { - InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType"); - ComponentType componentType = (ComponentType)staxProcessor.read(inputFactory.createXMLStreamReader(is)); - assertNotNull(componentType); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - staxProcessor.write(componentType, outputFactory.createXMLStreamWriter(bos)); - } - - @Test - public void testReadWriteComposite() throws Exception { - InputStream is = getClass().getResourceAsStream("Calculator.composite"); - Composite composite = (Composite)staxProcessor.read(inputFactory.createXMLStreamReader(is)); - assertNotNull(composite); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos)); - System.out.println(bos.toString()); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite deleted file mode 100644 index 5019278210..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:calc="http://sample.calculator"
- targetNamespace="http://calc"
- xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
- name="Calculator-bad-wsdlElement">
-
- <service name="CalculatorService" promote="CalculatorServiceComponent">
- <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
- <binding.ws wsdlElement="http://sample/calculator#wsdl.port(CalculatorService/CalculatorPort)">
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/Calculator</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- </service>
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" target="AddServiceComponent"/>
- <reference name="subtractService" target="SubtractServiceComponent"/>
- <reference name="multiplyService" target="MultiplyServiceComponent"/>
- <reference name="divideService" target="DivideServiceComponent"/>
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite deleted file mode 100644 index 1952d83755..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:calc="http://sample.calculator" - targetNamespace="http://calc" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="Calculator"> - - <service name="CalculatorService" promote="CalculatorServiceComponent"> - <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/> - <binding.ws uri="http://localhost:8085/Calculator" wsdlElement="http://sample/calculator#wsdl.service(CalculatorService)"/> - <binding.ws wsdli:wsdlLocation="http://tempuri.org" wsdlElement="http://sample/calculator#wsdl.binding(CalculatorBinding)"/> - <binding.ws wsdlElement="http://sample/calculator#wsdl.port(CalculatorService/CalculatorPort)"/> - <binding.ws wsdlElement="http://sample/calculator#wsdl.endpoint(CalculatorService/CalculatorEndpoint)"/> - <binding.ws wsdlElement="http://sample/calculator#wsdl.binding(CalculatorBinding)"> - <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> - <wsa:Address>http://localhost:8085/services/HelloWorldWebService</wsa:Address> - </wsa:EndpointReference> - </binding.ws> - </service> - - <component name="CalculatorServiceComponent"> - <implementation.java class="calculator.CalculatorServiceImpl"/> - <reference name="addService" target="AddServiceComponent"/> - <reference name="subtractService" target="SubtractServiceComponent"/> - <reference name="multiplyService" target="MultiplyServiceComponent"/> - <reference name="divideService" target="DivideServiceComponent"/> - </component> - - <component name="AddServiceComponent"> - <implementation.java class="calculator.AddServiceImpl"/> - </component> - - <component name="SubtractServiceComponent"> - <implementation.java class="calculator.SubtractServiceImpl"/> - </component> - - <component name="MultiplyServiceComponent"> - <implementation.java class="calculator.MultiplyServiceImpl"/> - </component> - - <component name="DivideServiceComponent"> - <implementation.java class="calculator.DivideServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType deleted file mode 100644 index 6d36198124..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"> - - <service name="CalculatorService"> - <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/> - <binding.ws uri="http://localhost:8085/Calculator" wsdlElement="http://sample/calculator#wsdl.service(CalculatorService)"/> - <binding.ws wsdli:wsdlLocation="http://tempuri.org" wsdlElement="http://sample/calculator#wsdl.binding(CalculatorBinding)"/> - <binding.ws wsdlElement="http://sample/calculator#wsdl.port(CalculatorService/CalculatorPort)"/> - <binding.ws wsdlElement="http://sample/calculator#wsdl.endpoint(CalculatorService/CalculatorEndpoint)"/> - </service> - - <reference name="divideService"> - <interface.wsdl interface="http://sample/calculator#wsdl.interface(Divide)"/> - <binding.ws uri="tempuri.org" wsdlElement="http://sample/calculator#wsdl.service(DivideService)"/> - <binding.ws uri="tempuri.org" wsdlElement="http://sample/calculator#wsdl.binding(DivideBinding)"/> - <binding.ws uri="tempuri.org" wsdlElement="http://sample/calculator#wsdl.port(DivideService/DividePort)"/> - <binding.ws uri="tempuri.org" wsdlElement="http://sample/calculator#wsdl.endpoint(DivideService/DivideEndpoint)"/> - <binding.ws> - <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> - <wsa:Address>myURI</wsa:Address> - </wsa:EndpointReference> - </binding.ws> - </reference> - -</componentType> -
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite deleted file mode 100644 index b1e3b11e99..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:calc="http://sample.calculator"
- targetNamespace="http://calc"
- xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
- name="Calculator">
-
- <service name="CalculatorService" promote="CalculatorServiceComponent">
- <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
- <binding.ws uri="http://localhost:8085/Calculator" wsdlElement="http://sample/calculator#wsdl.service(CalculatorService)">
- <operation name="add" requires="IntentOne IntentTwo"/>
- </binding.ws>
- <binding.ws wsdli:wsdlLocation="http://tempuri.org" wsdlElement="http://sample/calculator#wsdl.binding(CalculatorBinding)"/>
- <binding.ws wsdlElement="http://sample/calculator#wsdl.port(CalculatorService/CalculatorPort)"/>
- <binding.ws wsdlElement="http://sample/calculator#wsdl.endpoint(CalculatorService/CalculatorEndpoint)"/>
- </service>
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" target="AddServiceComponent"/>
- <reference name="subtractService" target="SubtractServiceComponent"/>
- <reference name="multiplyService" target="MultiplyServiceComponent"/>
- <reference name="divideService" target="DivideServiceComponent"/>
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
-</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl deleted file mode 100644 index 5e8e5dad0d..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://www.example.org" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - name="example"> - - <wsdl:portType name="HelloWorld"> - </wsdl:portType> -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl deleted file mode 100644 index ad81fc7867..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" - xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" - xmlns="http://schemas.xmlsoap.org/wsdl/"> - - <types> - <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2001/XMLSchema"> - <element name="getLastTradePrice1"> - <complexType> - <sequence> - <element name="tickerSymbol" type="string" /> - </sequence> - </complexType> - </element> - <element name="getLastTradePriceResponse"> - <complexType> - <sequence> - <element name="price" type="float" /> - </sequence> - </complexType> - </element> - </schema> - </types> - - <message name="GetLastTradePriceInput"> - <part name="body" element="xsd1:getLastTradePrice" /> - </message> - - <message name="GetLastTradePriceOutput"> - <part name="body" element="xsd1:getLastTradePriceResponse" /> - </message> - - <portType name="StockQuotePortType"> - <operation name="getLastTradePrice"> - <input message="tns:GetLastTradePriceInput" /> - <output message="tns:GetLastTradePriceOutput" /> - </operation> - </portType> - -</definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd deleted file mode 100644 index 241ec15d36..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd +++ /dev/null @@ -1,136 +0,0 @@ -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<schema targetNamespace="http://www.example.com/IPO" - xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ipo="http://www.example.com/IPO"> - - <annotation> - <documentation xml:lang="en"> - International Purchase order schema for Example.com - Copyright 2000 Example.com. All rights reserved. - </documentation> - </annotation> - - - <element name="purchaseOrder" type="ipo:PurchaseOrderType" /> - - <element name="comment" type="string" /> - - <complexType name="PurchaseOrderType"> - <sequence> - <element name="shipTo" type="ipo:Address" /> - <element name="billTo" type="ipo:Address" /> - <element ref="ipo:comment" minOccurs="0" /> - <element name="items" type="ipo:Items" /> - </sequence> - <attribute name="orderDate" type="date" /> - </complexType> - - <complexType name="Items"> - <sequence> - <element name="item" minOccurs="0" maxOccurs="unbounded"> - <complexType> - <sequence> - <element name="productName" type="string" /> - <element name="quantity"> - <simpleType> - <restriction base="positiveInteger"> - <maxExclusive value="100" /> - </restriction> - </simpleType> - </element> - <element name="USPrice" type="decimal" /> - <element ref="ipo:comment" minOccurs="0" /> - <element name="shipDate" type="date" - minOccurs="0" /> - </sequence> - <attribute name="partNum" type="ipo:SKU" - use="required" /> - </complexType> - </element> - </sequence> - </complexType> - - <simpleType name="SKU"> - <restriction base="string"> - <pattern value="\d{3}-[A-Z]{2}" /> - </restriction> - </simpleType> - - <complexType name="Address"> - <sequence> - <element name="name" type="string" /> - <element name="street" type="string" /> - <element name="city" type="string" /> - </sequence> - </complexType> - - <complexType name="USAddress"> - <complexContent> - <extension base="ipo:Address"> - <sequence> - <element name="state" type="ipo:USState" /> - <element name="zip" type="positiveInteger" /> - </sequence> - </extension> - </complexContent> - </complexType> - - <complexType name="UKAddress"> - <complexContent> - <extension base="ipo:Address"> - <sequence> - <element name="postcode" type="ipo:UKPostcode" /> - </sequence> - <attribute name="exportCode" type="positiveInteger" - fixed="1" /> - </extension> - </complexContent> - </complexType> - - <!-- other Address derivations for more countries --> - - <simpleType name="USState"> - <restriction base="string"> - <enumeration value="AK" /> - <enumeration value="AL" /> - <enumeration value="AR" /> - <enumeration value="CA" /> - <enumeration value="PA" /> - <!-- and so on ... --> - </restriction> - </simpleType> - - <simpleType name="Postcode"> - <restriction base="string"> - <length value="7" fixed="true" /> - </restriction> - </simpleType> - - - <simpleType name="UKPostcode"> - <restriction base="ipo:Postcode"> - <pattern value="[A-Z]{2}\d\s\d[A-Z]{2}" /> - </restriction> - </simpleType> - - - -</schema> - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl deleted file mode 100644 index 39cd5547d9..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" - xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" - xmlns="http://schemas.xmlsoap.org/wsdl/"> - - <types> - <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2001/XMLSchema"> - <element name="getLastTradePrice"> - <complexType> - <sequence> - <element name="tickerSymbol" type="string" /> - </sequence> - </complexType> - </element> - <element name="getLastTradePriceResponse"> - <complexType> - <sequence> - <element name="price" type="float" /> - </sequence> - </complexType> - </element> - </schema> - </types> - - <message name="GetLastTradePriceInput"> - <part name="body" element="xsd1:getLastTradePrice" /> - </message> - - <message name="GetLastTradePriceOutput"> - <part name="body" element="xsd1:getLastTradePriceResponse" /> - </message> - - <portType name="StockQuotePortType"> - <operation name="getLastTradePrice"> - <input message="tns:GetLastTradePriceInput" /> - <output message="tns:GetLastTradePriceOutput" /> - </operation> - </portType> - -</definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl deleted file mode 100644 index 8e26f7b4b5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld"> - - <wsdl:import location="test2.wsdl" namespace="http://helloworld"></wsdl:import> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction="" /> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal" /> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal" /> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/sample-helloworldws-1.0-SNAPSHOT/services/HelloWorldWebService" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd deleted file mode 100644 index c2210f4a94..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd +++ /dev/null @@ -1,33 +0,0 @@ -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<schema targetNamespace="http://www.example.com/Customer" xmlns="http://www.w3.org/2001/XMLSchema" - xmlns:ipo="http://www.example.com/IPO" xmlns:tns="http://www.example.com/Customer"> - <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd" /> - - <complexType name="Customer"> - <sequence> - <element name="customerID" type="string"></element> - <element name="name" type="string"></element> - <element name="order" type="ipo:PurchaseOrderType" /> - </sequence> - </complexType> - <element name="customer" type="tns:Customer"></element> - -</schema> - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl deleted file mode 100644 index 529b395fd5..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema"> - - <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd" /> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string" /> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string" /> - </sequence> - </complexType> - </element> - - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters" /> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters" /> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest" /> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse" /> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl deleted file mode 100644 index 666a7e4069..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-xml/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" - xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns="http://schemas.xmlsoap.org/wsdl/"> - - <types> - <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2001/XMLSchema"> - <element name="getLastTradePrice"> - <complexType> - <sequence> - <element name="tickerSymbol" type="string" /> - </sequence> - </complexType> - </element> - <element name="getLastTradePriceResponse"> - <complexType> - <sequence> - <element name="price" type="float" /> - </sequence> - </complexType> - </element> - </schema> - </types> - - <message name="GetLastTradePriceInput1"> - <part name="body" element="xsd1:getLastTradePrice" /> - </message> - - <message name="GetLastTradePriceOutput1"> - <part name="body" element="xsd1:getLastTradePriceResponse" /> - </message> - - <message name="GetLastTradePriceInput2"> - <part name="body" element="xsd1:getLastTradePrice" /> - <part name="other" type="xsd:string"/> - </message> - - <message name="GetLastTradePriceOutput2"> - <part name="body" element="xsd1:getLastTradePriceResponse" /> - </message> - - <portType name="StockQuotePortType"> - <operation name="getLastTradePrice"> - <input message="tns:GetLastTradePriceInput1" /> - <output message="tns:GetLastTradePriceOutput1" /> - </operation> - <operation name="getLastTradePrice1"> - <input message="tns:GetLastTradePriceInput1" /> - <output message="tns:GetLastTradePriceOutput1" /> - </operation> - <operation name="getLastTradePrice2"> - <input message="tns:GetLastTradePriceInput2" /> - <output message="tns:GetLastTradePriceOutput2" /> - </operation> - </portType> - -</definitions>
\ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/LICENSE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/META-INF/MANIFEST.MF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/META-INF/MANIFEST.MF deleted file mode 100644 index 2cfa9195ce..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/META-INF/MANIFEST.MF +++ /dev/null @@ -1,33 +0,0 @@ -Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.binding.ws;version="2.0.0";
- uses:="org.apache.tuscany.sca.assembly,
- org.apache.tuscany.sca.interfacedef.wsdl,
- org.apache.tuscany.sca.assembly.builder,
- org.apache.tuscany.sca.interfacedef,
- org.w3c.dom,
- javax.wsdl,
- javax.xml.namespace",
- org.apache.tuscany.sca.binding.ws.addressing;version="2.0.0";uses:="javax.xml.namespace"
-Private-Package: org.apache.tuscany.sca.binding.ws.impl;version="2.0.0"
-Tool: Bnd-0.0.255
-Bundle-Name: Apache Tuscany SCA WS Binding Model
-Created-By: 1.6.0_07 (Sun Microsystems Inc.)
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: 2.0.0
-Bnd-LastModified: 1225397286828
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA WS Binding Model
-Import-Package: javax.wsdl,
- javax.xml.namespace,
- org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.assembly.builder;version="2.0.0",
- org.apache.tuscany.sca.binding.ws;version="2.0.0",
- org.apache.tuscany.sca.binding.ws.addressing;version="2.0.0",
- org.apache.tuscany.sca.interfacedef;version="2.0.0",
- org.apache.tuscany.sca.interfacedef.wsdl;version="2.0.0",
- org.apache.tuscany.sca.policy;version="2.0.0",
- org.w3c.dom
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.ws
-Bundle-DocURL: http://www.apache.org/
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/NOTICE b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/NOTICE deleted file mode 100644 index 25bb89c9b2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/pom.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/pom.xml deleted file mode 100644 index 2d60420de6..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-modules</artifactId> - <version>2.0-M3</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-binding-ws</artifactId> - <name>Apache Tuscany SCA WS Binding Model</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-assembly</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-interface-wsdl</artifactId> - <version>2.0-M3</version> - </dependency> - - <dependency> - <groupId>wsdl4j</groupId> - <artifactId>wsdl4j</artifactId> - <version>1.6.2</version> - </dependency> - </dependencies> - - <repositories> - <!-- Apache repository for Web Services artifacts --> - <repository> - <id>apache.ws.zone</id> - <name>Apache WS Zone Repository</name> - <url>http://ws.zones.apache.org/repository2</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - -</project> diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java deleted file mode 100644 index 0d07a55a14..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.w3c.dom.Element; - - -/** - * Represents a WebService binding. - * - * @version $Rev$ $Date$ - */ -public interface WebServiceBinding extends Binding, BindingBuilderExtension { - - /** - * Sets the WSDL location. - * @param location the WSDL location - */ - void setLocation(String location); - - /** - * Returns the WSDL location - * @return the WSDL location - */ - String getLocation(); - - /** - * Returns the name of the WSDL service. - * - * @return the name of the WSDL service - */ - QName getServiceName(); - - /** - * Sets the name of the WSDL service. - * - * @param serviceName the name of the WSDL service - */ - void setServiceName(QName serviceName); - - /** - * Returns the name of the WSDL port. - * - * @return the name of the WSDL port - */ - String getPortName(); - - /** - * Sets the name of the WSDL port. - * - * @param portName the name of the WSDL port - */ - void setPortName(String portName); - - /** - * Returns the name of the WSDL binding. - * - * @return the name of the WSDL binding - */ - QName getBindingName(); - - /** - * Sets the name of the WSDL binding. - * - * @param bindingName the name of the WSDL binding - */ - void setBindingName(QName bindingName); - - /** - * Returns the name of the WSDL endpoint. - * - * @return the name of the WSDL endpoint - */ - String getEndpointName(); - - /** - * Sets the name of the WSDL endpoint. - * - * @param endpointName the name of the WSDL endpoint - */ - void setEndpointName(String endpointName); - - /** - * Returns the WSDL service - * @return the WSDL service - */ - Service getService(); - - /** - * Sets the WSDL service. - * @param service the WSDL service - */ - void setService(Service service); - - /** - * Returns the WSDL port - * @return the WSDL port - */ - Port getPort(); - - /** - * Sets the WSDL endpoint - * @param endpoint the WSDL endpoint - */ - void setEndpoint(Port endpoint); - - /** - * Returns the WSDL endpoint - * @return the WSDL endpoint - */ - Port getEndpoint(); - - /** - * Sets the WSDL port - * @param port the WSDL port - */ - void setPort(Port port); - - /** - * Returns the WSDL binding. - * @return the WSDL binding - */ - javax.wsdl.Binding getBinding(); - - /** - * Sets the WSDL binding - * @param binding the WSDL binding - */ - void setBinding(javax.wsdl.Binding binding); - - /** - * Returns the WSDL definition. - * @return the WSDL definition - */ - WSDLDefinition getWSDLDefinition(); - - /** - * Sets the WSDL definition. - * @param wsdlDefinition the WSDL definition - */ - void setDefinition(WSDLDefinition wsdlDefinition); - - /** - * Returns the WSDL namespace. - * @return the WSDL namespace - */ - String getNamespace(); - - /** - * Sets the WSDL namespace - * @param namespace the WSDL namespace - */ - void setNamespace(String namespace); - - /** - * Returns true if the model element is unresolved. - * - * @return true if the model element is unresolved. - */ - boolean isUnresolved(); - - /** - * Sets whether the model element is unresolved. - * - * @param unresolved whether the model element is unresolved - */ - void setUnresolved(boolean unresolved); - - InterfaceContract getBindingInterfaceContract(); - - void setBindingInterfaceContract(InterfaceContract bindingInterfaceContract); - - Element getEndPointReference(); - - void setEndPointReference(Element element); - - /** - * Returns the generated WSDL definitions document. - * @return the generated WSDL definitions document - */ - Definition getWSDLDocument(); - - /** - * Sets the generated WSDL definitions document. - * @param definition the generated WSDL definitions document - */ - void setWSDLDocument(Definition definition); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java deleted file mode 100644 index 1ad38c69e4..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws; - -/** - * Factory for the Web Service binding model. - * - * @version $Rev$ $Date$ - */ -public interface WebServiceBindingFactory { - - /** - * Creates a new WebService binding. - * - * @return a new WebService binding - */ - WebServiceBinding createWebServiceBinding(); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java deleted file mode 100644 index a13584a3c2..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.addressing; - -import java.net.URI; -import java.util.List; - -import javax.xml.namespace.QName; - -/** - * Defines a model for WS-Addressing - * <wsa:EndpointReference> - * <wsa:Address>xs:anyURI</wsa:Address> - * <wsa:ReferenceProperties>... </wsa:ReferenceProperties> ? - * <wsa:ReferenceParameters>... </wsa:ReferenceParameters> ? - * <wsa:PortType>xs:QName</wsa:PortType> ? - * <wsa:ServiceName PortName="xs:NCName"?>xs:QName</wsa:ServiceName> ? - * <wsp:Policy> ... </wsp:Policy>* - * </wsa:EndpointReference> - * @version $Rev$ $Date$ - */ -public interface EndPointReference { - URI getAddress(); - - void setAddress(URI address); - - QName getPortType(); - - void setPortType(QName portType); - - QName getServiceName(); - - void setServiceName(QName serviceName); - - QName getPortName(); - - void setPortName(QName portName); - - List<Object> getReferenceProperties(); - - List<Object> getReferenceParameters(); - - List<Object> getPolicies(); - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java deleted file mode 100644 index 055e2012dc..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.ws.impl; - -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory; - -/** - * A factory for the WSDL model. - * - * @version $Rev$ $Date$ - */ -public class WebServiceBindingFactoryImpl implements WebServiceBindingFactory { - - public WebServiceBinding createWebServiceBinding() { - return new WebServiceBindingImpl(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java deleted file mode 100644 index 45a421e5ff..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.impl; - -import java.util.ArrayList; -import java.util.List; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Extensible; -import org.apache.tuscany.sca.assembly.Extension; -import org.apache.tuscany.sca.assembly.builder.BindingBuilder; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; -import org.w3c.dom.Element; - -/** - * Represents a WebService binding. - * - * @version $Rev$ $Date$ - */ -class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensible { - private String name; - private String uri; - private boolean unresolved; - private List<Object> extensions = new ArrayList<Object>(); - private List<Extension> attributeExtensions = new ArrayList<Extension>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private ExtensionType intentAttachPointType; - private String location; - private Binding binding; - private Service service; - private Port port; - private Port endpoint; - private QName bindingName; - private String portName; - private QName serviceName; - private String endpointName; - private WSDLDefinition wsdlDefinition; - private String wsdlNamespace; - private InterfaceContract bindingInterfaceContract; - private Element endPointReference; - private Definition generatedWSDLDocument; - private BindingBuilder builder; - - protected WebServiceBindingImpl() { - } - - /** - * Provide a meaningful representation of this Binding - */ - public String toString() { - return "Web Service Binding: " + name; - } // end method toString - - public String getName() { - return name; - } - - public String getURI() { - return uri; - } - - public void setName(String name) { - this.name = name; - } - - public void setURI(String uri) { - this.uri = uri; - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public List<Object> getExtensions() { - return extensions; - } - - public List<Extension> getAttributeExtensions() { - return attributeExtensions; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public Binding getBinding() { - if (binding == null) { - if (getWSDLDefinition() != null && wsdlDefinition.getBinding() != null) { - binding = wsdlDefinition.getBinding(); - } - } - return binding; - } - - public QName getBindingName() { - if (isUnresolved()) { - return bindingName; - } else if (binding != null) { - return binding.getQName(); - } else { - return null; - } - } - - public String getEndpointName() { - if (isUnresolved()) { - return endpointName; - } else if (endpoint != null) { - //TODO support WSDL 2.0 - return endpoint.getName(); - } else { - return null; - } - } - - public Port getEndpoint() { - return endpoint; - } - - public Port getPort() { - return port; - } - - public String getPortName() { - if (isUnresolved()) { - return portName; - } else if (port != null) { - return port.getName(); - } else { - return null; - } - } - - public Service getService() { - return service; - } - - public QName getServiceName() { - if (isUnresolved()) { - return serviceName; - } else if (service != null) { - return service.getQName(); - } else { - return null; - } - } - - public void setBinding(Binding binding) { - this.binding = binding; - } - - public void setBindingName(QName bindingName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.bindingName = bindingName; - } - - public void setEndpoint(Port endpoint) { - this.endpoint = endpoint; - } - - public void setEndpointName(String endpointName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.endpointName = endpointName; - } - - public void setPort(Port port) { - this.port = port; - } - - public void setPortName(String portName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.portName = portName; - } - - public void setService(Service service) { - this.service = service; - } - - public void setServiceName(QName serviceName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.serviceName = serviceName; - } - - public WSDLDefinition getWSDLDefinition() { - if (wsdlDefinition == null) { - Interface iface = bindingInterfaceContract.getInterface(); - if (iface instanceof WSDLInterface) { - wsdlDefinition = ((WSDLInterface) iface).getWsdlDefinition(); - } - } - return wsdlDefinition; - } - - public void setDefinition(WSDLDefinition wsdlDefinition) { - this.wsdlDefinition = wsdlDefinition; - } - - public String getNamespace() { - return wsdlNamespace; - } - - public void setNamespace(String namespace) { - this.wsdlNamespace = namespace; - } - - public InterfaceContract getBindingInterfaceContract() { - return bindingInterfaceContract; - } - - public void setBindingInterfaceContract(InterfaceContract bindingInterfaceContract) { - this.bindingInterfaceContract = bindingInterfaceContract; - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public ExtensionType getType() { - return intentAttachPointType; - } - - public void setType(ExtensionType intentAttachPointType) { - this.intentAttachPointType = intentAttachPointType; - } - - public Element getEndPointReference() { - return endPointReference; - } - - public void setEndPointReference(Element epr) { - this.endPointReference = epr; - } - - public Definition getWSDLDocument() { - return generatedWSDLDocument; - } - - public void setWSDLDocument(Definition definition) { - this.generatedWSDLDocument = definition; - } - - public BindingBuilder getBuilder() { - return builder; - } - - public void setBuilder(BindingBuilder builder) { - this.builder = builder; - } -} diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory deleted file mode 100644 index 6d50a24b93..0000000000 --- a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the model factory -org.apache.tuscany.sca.binding.ws.impl.WebServiceBindingFactoryImpl
\ No newline at end of file |