summaryrefslogtreecommitdiffstats
path: root/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding
diff options
context:
space:
mode:
Diffstat (limited to 'tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding')
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java32
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java25
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java53
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java46
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java26
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java48
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java39
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java39
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java48
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java24
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceBuilderTestCase.java379
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java26
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java44
-rw-r--r--tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/SDODataBindingTestCase.java123
14 files changed, 0 insertions, 952 deletions
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java
deleted file mode 100644
index 0600e14f8d..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account;
-
-import java.util.List;
-
-/**
- * @model
- */
-
-public interface AccountReport {
-
- /**
- * @model type="services.account.AccountSummary"
- */
-
- List getAccountSummaries();
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java
deleted file mode 100644
index b605d19f09..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface AccountService {
-
- AccountReport getAccountReport(String customerID);
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java
deleted file mode 100644
index cd3fcfe1f5..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account;
-
-
-import org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata.AccountDataService;
-import org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.stockquote.StockQuoteService;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-
-public class AccountServiceImpl implements AccountService {
-
- @Property
- private String currency = "USD";
- @Reference
- private AccountDataService accountDataService;
- @Reference
- private StockQuoteService stockQuoteService;
-
- public AccountServiceImpl() {
- }
-
- public AccountReport getAccountReport(String customerID) {
- return null;
- }
-
-
- //methods to access the fields
- protected StockQuoteService getStockQuoteService() {
- return stockQuoteService;
- }
- protected AccountDataService getAccountDataService() {
- return accountDataService;
- }
- protected String getCurrency() {
- return currency;
- }
-
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java
deleted file mode 100644
index 9000e4ba19..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account;
-
-/**
- * @model
- */
-
-public interface AccountSummary {
-
- /**
- * @model
- */
- String getAccountNumber();
-
- void setAccountNumber(String accountNumber);
-
- /**
- * @model
- */
- String getAccountType();
-
- void setAccountType(String accountType);
-
- /**
- * @model
- */
- float getBalance();
-
- void setBalance(float balance);
-}
-
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java
deleted file mode 100644
index d2dc72e868..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata;
-
-public interface AccountDataService {
-
- CheckingAccount getCheckingAccount(String customerID);
-
- SavingsAccount getSavingsAccount(String customerID);
-
- StockAccount getStockAccount(String customerID);
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java
deleted file mode 100644
index d945ee1f34..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata;
-
-public class AccountDataServiceImpl implements AccountDataService {
-
- public CheckingAccount getCheckingAccount(String customerID) {
-
- CheckingAccount checkingAccount = new CheckingAccount();
- checkingAccount.setAccountNumber(customerID + "_" + "CHA12345");
- checkingAccount.setBalance(1500.0f);
-
- return checkingAccount;
- }
-
- public SavingsAccount getSavingsAccount(String customerID) {
-
- SavingsAccount savingsAccount = new SavingsAccount();
- savingsAccount.setAccountNumber(customerID + "_" + "SAA12345");
- savingsAccount.setBalance(1500.0f);
-
- return savingsAccount;
- }
-
- public StockAccount getStockAccount(String customerID) {
-
- StockAccount stockAccount = new StockAccount();
- stockAccount.setAccountNumber(customerID + "_" + "STA12345");
- stockAccount.setSymbol("IBM");
- stockAccount.setQuantity(100);
-
- return stockAccount;
- }
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java
deleted file mode 100644
index 6b75194b98..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata;
-
-public class CheckingAccount {
-
- private String accountNumber;
- private float balance;
-
- public String getAccountNumber() {
- return accountNumber;
- }
-
- public void setAccountNumber(String accountNumber) {
- this.accountNumber = accountNumber;
- }
-
- public float getBalance() {
- return balance;
- }
-
- public void setBalance(float balance) {
- this.balance = balance;
- }
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java
deleted file mode 100644
index a37b504829..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata;
-
-public class SavingsAccount {
-
- private String accountNumber;
- private float balance;
-
- public String getAccountNumber() {
- return accountNumber;
- }
-
- public void setAccountNumber(String accountNumber) {
- this.accountNumber = accountNumber;
- }
-
- public float getBalance() {
- return balance;
- }
-
- public void setBalance(float balance) {
- this.balance = balance;
- }
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java
deleted file mode 100644
index 2a5ac5f4a3..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata;
-
-public class StockAccount {
-
- private String accountNumber;
- private String symbol;
- private int quantity;
-
- public String getAccountNumber() {
- return accountNumber;
- }
-
- public void setAccountNumber(String accountNumber) {
- this.accountNumber = accountNumber;
- }
-
- public int getQuantity() {
- return quantity;
- }
-
- public void setQuantity(int quantity) {
- this.quantity = quantity;
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java
deleted file mode 100644
index 021b19d14d..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.stockquote;
-
-public interface StockQuoteService {
-
- float getQuote(String symbol);
-}
-
- \ No newline at end of file
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceBuilderTestCase.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceBuilderTestCase.java
deleted file mode 100644
index d040b87b86..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/builder/ExternalWebServiceBuilderTestCase.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/**
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.builder;
-
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.binding.axis2.assembly.WebServiceBinding;
-import org.apache.tuscany.binding.axis2.externalservice.Axis2OperationInvoker;
-import org.apache.tuscany.binding.axis2.externalservice.Axis2ServiceInvoker;
-import org.apache.tuscany.binding.axis2.util.WebServicePortMetaData;
-import org.apache.tuscany.common.resource.ResourceLoader;
-import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl;
-import org.apache.tuscany.core.extension.ExternalServiceContextFactory;
-import org.apache.tuscany.model.assembly.AssemblyContext;
-import org.apache.tuscany.model.assembly.AssemblyInitializationException;
-import org.apache.tuscany.model.assembly.AssemblyVisitor;
-import org.apache.tuscany.model.assembly.Binding;
-import org.apache.tuscany.model.assembly.Composite;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.OverrideOption;
-import org.apache.tuscany.model.assembly.Part;
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.Service;
-import org.apache.tuscany.model.assembly.ServiceContract;
-
-import commonj.sdo.helper.TypeHelper;
-
-public class ExternalWebServiceBuilderTestCase extends TestCase {
-
- private Definition definition;
-
- private static final QName SERVICE_NAME = new QName("http://helloworldaxis.samples.tuscany.apache.org", "HelloWorldServiceImplService");
-
- private static final String PORTNAME = "helloworld";
-
- private static final QName GET_GREETINGS_QN = new QName(SERVICE_NAME.getNamespaceURI(), "getGreetings");
-
- public void testCreateOperationInvokers() {
- ExternalWebServiceBuilder builder = new ExternalWebServiceBuilder();
-
- Port port = definition.getService(SERVICE_NAME).getPort(PORTNAME);
- WebServicePortMetaData wspmd = new WebServicePortMetaData(definition, port, null, false);
-
- Map<String, Axis2OperationInvoker> invokers = builder.createOperationInvokers(Foo.class, null, getClass().getClassLoader(),wspmd);
- assertNotNull(invokers);
- assertEquals(1, invokers.size());
-
- Axis2OperationInvoker opInvoker = invokers.get(GET_GREETINGS_QN.getLocalPart());
- assertNotNull(opInvoker);
- assertEquals(GET_GREETINGS_QN, opInvoker.getWSDLOperationName());
- }
-
- public void testCreateExternalServiceContextFactory() {
- ExternalWebServiceBuilder builder = new ExternalWebServiceBuilder();
- ExternalService es = createMockExternalService();
- ExternalServiceContextFactory cf = builder.createExternalServiceContextFactory(es);
- assertNotNull(cf);
- Axis2ServiceInvoker si = (Axis2ServiceInvoker) cf.createContext().getHandler();
- assertNotNull(si);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
- reader.setFeature("javax.wsdl.verbose", false);
- URL url = getClass().getResource("helloworld.wsdl");
- this.definition = reader.readWSDL(url.toString());
- }
-
- interface Foo {
- public void getGreetings();
- };
-
- private ExternalService createMockExternalService() {
- ExternalService es = new ExternalService() {
-
- public List<Binding> getBindings() {
- return Arrays.asList(new Binding[] { createMockBinding() });
- }
-
- public OverrideOption getOverrideOption() {
-
- return null;
- }
-
- public void setOverrideOption(OverrideOption value) {
-
- }
-
- public ConfiguredService getConfiguredService() {
- return new ConfiguredService() {
-
- public String getName() {
-
- return null;
- }
-
- public void setName(String name) {
-
- }
-
- public Service getPort() {
- return new Service() {
-
- public ServiceContract getServiceContract() {
- return new ServiceContract() {
-
- public Class getInterface() {
- return Foo.class;
- }
-
- public void setInterface(Class value) {
-
- }
-
- public Class getCallbackInterface() {
-
- return null;
- }
-
- public void setCallbackInterface(Class value) {
-
- }
-
- public Scope getScope() {
-
- return null;
- }
-
- public void setScope(Scope scope) {
-
- }
-
- public List<Object> getExtensibilityElements() {
-
- return null;
- }
-
- public List<Object> getExtensibilityAttributes() {
-
- return null;
- }
-
- public void initialize(AssemblyContext modelContext) throws AssemblyInitializationException {
-
- }
-
- public void freeze() {
-
- }
-
- public boolean accept(AssemblyVisitor visitor) {
-
- return false;
- }
- };
- }
-
- public void setServiceContract(ServiceContract contract) {
-
- }
-
- public String getName() {
-
- return null;
- }
-
- public void setName(String name) {
-
- }
-
- public void initialize(AssemblyContext modelContext) throws AssemblyInitializationException {
-
- }
-
- public void freeze() {
-
- }
-
- public boolean accept(AssemblyVisitor visitor) {
-
- return false;
- }
- };
- }
-
- public void setPort(Service port) {
-
- }
-
- public Part getPart() {
-
- return null;
- }
-
- public void setPart(Part part) {
-
- }
-
- public void initialize(AssemblyContext modelContext) throws AssemblyInitializationException {
-
- }
-
- public void freeze() {
-
- }
-
- public boolean accept(AssemblyVisitor visitor) {
-
- return false;
- }
-
- public void setProxyFactory(Object proxyFactory) {
-
- }
-
- public Object getProxyFactory() {
-
- return null;
- }
- };
- }
-
- public void setConfiguredService(ConfiguredService configuredService) {
-
- }
-
- public String getName() {
-
- return "myService";
- }
-
- public void setName(String value) {
-
- }
-
- public Composite getComposite() {
-
- return null;
- }
-
- public void setComposite(Composite composite) {
-
- }
-
- public List<Object> getExtensibilityElements() {
-
- return null;
- }
-
- public List<Object> getExtensibilityAttributes() {
-
- return null;
- }
-
- public void initialize(AssemblyContext modelContext) throws AssemblyInitializationException {
-
- }
-
- public void freeze() {
-
- }
-
- public boolean accept(AssemblyVisitor visitor) {
-
- return false;
- }
-
- public void setContextFactory(Object contextFactory) {
-
- }
-
- public Object getContextFactory() {
-
- return null;
- }
- };
- return es;
- }
-
- private Binding createMockBinding() {
- WebServiceBinding b = new WebServiceBinding() {
-
- public void setPortURI(String portURI) {
-
- }
-
- public Port getWSDLPort() {
- return definition.getService(SERVICE_NAME).getPort(PORTNAME);
- }
-
- public Definition getWSDLDefinition() {
- return definition;
- }
-
- public void setWSDLPort(Port value) {
-
- }
-
- public void setWSDLDefinition(Definition definition) {
-
- }
-
- public TypeHelper getTypeHelper() {
-
- return null;
- }
-
- public void setTypeHelper(TypeHelper typeHelper) {
-
- }
-
- public ResourceLoader getResourceLoader() {
- return new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader());
- }
-
- public void setResourceLoader(ResourceLoader resourceLoader) {
-
- }
-
- public String getURI() {
-
- return null;
- }
-
- public void setURI(String value) {
-
- }
-
- public void initialize(AssemblyContext modelContext) throws AssemblyInitializationException {
-
- }
-
- public void freeze() {
-
- }
-
- public boolean accept(AssemblyVisitor visitor) {
-
- return false;
- }
-
- public void setWebAppName(String webAppName) {
- }
-
- public String getWebAppName() {
- return null;
- }
-
- };
- return b;
- }
-
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java
deleted file mode 100644
index 6d046d84c4..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.handler;
-
-/**
- * This is the business interface of the HelloWorld service component.
- */
-public interface HelloWorldService {
-
- String getGreetings(String name);
-
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java
deleted file mode 100644
index 972b94e5a7..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.handler;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service component.
- */
-@Service(HelloWorldService.class)
-//FIXME workaround for JIRA TUSCANY-41
-@Scope("MODULE")
-public class HelloWorldServiceComponentImpl implements HelloWorldService {
-
- @Reference
- // Injected by the SCA container.
- private HelloWorldService hellowWorldService;
-
- /**
- * @see org.apache.tuscany.samples.helloworldwsclient.HelloWorldService#getGreetings(java.lang.String)
- */
- public String getGreetings(final String name) {
- assert null != hellowWorldService : "helloWorldService was not set by the SCA runtime!";
-
- return hellowWorldService.getGreetings(name);
- }
-
-}
diff --git a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/SDODataBindingTestCase.java b/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/SDODataBindingTestCase.java
deleted file mode 100644
index 621f12068c..0000000000
--- a/tags/java-M1-20060518/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/SDODataBindingTestCase.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuscany.binding.axis2.util;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class SDODataBindingTestCase extends TestCase {
- public static final QName DOCLITWRAPPED_QN = new QName("http://www.example.org/creditscore/doclitwrapped/", "getCreditScore");
-
- public static final QName DOCLIT_QN = new QName("http://www.example.org/creditscore/doclit/", "getCreditScoreRequest");
-
- public static final QName GREETING_QN = new QName("http://helloworldaxis.samples.tuscany.apache.org", "getGreetings");
-
- private TypeHelper typeHelper;
-
- private SDODataBinding docLitWrappedDB;
-
- private SDODataBinding docLitDB;
-
- private SDODataBinding greetingDB;
-
- public void testToOMElement() {
- String s = "petra";
-
- OMElement omElement = greetingDB.toOMElement(new Object[] { s });
- assertNotNull(omElement);
-
- Object[] os = greetingDB.fromOMElement(omElement);
- assertNotNull(os);
- assertEquals(1, os.length);
- assertEquals(s, os[0]);
- }
-
- public void testDocLit() {
- DataFactory dataFactory = SDOUtil.createDataFactory(typeHelper);
- DataObject dataObject = dataFactory.create("http://www.example.org/creditscore/doclit/", "Customer");
- dataObject.setString(0, "111-22-3333");
- dataObject.setString(1, "John");
- dataObject.setString(2, "Smith");
-
- OMElement omElement = docLitDB.toOMElement(new Object[] { dataObject });
- assertNotNull(omElement);
-
- Object[] os = docLitDB.fromOMElement(omElement);
- assertNotNull(os);
- assertEquals(os.length, 1);
- assertTrue(os[0] instanceof DataObject);
-
- dataObject = (DataObject) os[0];
- assertEquals(dataObject.getString(0), "111-22-3333");
- assertEquals(dataObject.getString(1), "John");
- assertEquals(dataObject.getString(2), "Smith");
- }
-
- public void testDocLitWrapped() {
- Object[] args = new Object[] { "111-22-3333", "John", "Smith" };
-
- OMElement omElement = docLitWrappedDB.toOMElement(args);
- assertNotNull(omElement);
-
- Object[] os = docLitWrappedDB.fromOMElement(omElement);
- assertNotNull(os);
- assertEquals(os.length, 3);
-
- assertEquals(os[0], "111-22-3333");
- assertEquals(os[1], "John");
- assertEquals(os[2], "Smith");
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- DataObjectUtil.initRuntime();
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
- typeHelper = SDOUtil.createTypeHelper();
- XSDHelper xsdHelper = SDOUtil.createXSDHelper(typeHelper);
- URL url = getClass().getResource("helloworld.wsdl");
- xsdHelper.define(url.openStream(), null);
- url = getClass().getResource("CreditScoreDocLitWrapped.wsdl");
- xsdHelper.define(url.openStream(), null);
- url = getClass().getResource("CreditScoreDocLit.wsdl");
- xsdHelper.define(url.openStream(), null);
-
- this.greetingDB = new SDODataBinding(getClass().getClassLoader(),typeHelper, GREETING_QN, true);
- this.docLitWrappedDB = new SDODataBinding(getClass().getClassLoader(),typeHelper, DOCLITWRAPPED_QN, true);
-
- this.docLitDB = new SDODataBinding(getClass().getClassLoader(),typeHelper, DOCLIT_QN, false);
-
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
- }
-
-}