Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/util/TuscanyAxisConfigurator.java Wed Apr 19 16:30:30 2006 @@ -1,17 +1,19 @@ /** - * - * 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. + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - package org.apache.tuscany.binding.axis2.util; import java.io.IOException; @@ -35,7 +37,7 @@ */ public class TuscanyAxisConfigurator implements AxisConfigurator { - protected AxisConfiguration axisConfiguration = null; + protected AxisConfiguration axisConfiguration; protected final ResourceLoader resourceLoader; @@ -44,8 +46,10 @@ * @param axisConfiguration Starting axis configuration, null then use uninitialized configuration. */ public TuscanyAxisConfigurator(ResourceLoader resourceLoader, AxisConfiguration axisConfiguration) { - this.resourceLoader = resourceLoader != null ? resourceLoader : new ResourceLoaderImpl(getClass().getClassLoader()); - this.axisConfiguration = axisConfiguration == null ? new AxisConfiguration() : axisConfiguration; + this.resourceLoader = resourceLoader != null ? resourceLoader + : new ResourceLoaderImpl(getClass().getClassLoader()); + this.axisConfiguration = axisConfiguration == null ? new AxisConfiguration() + : axisConfiguration; } public AxisConfiguration getAxisConfiguration() { @@ -61,10 +65,12 @@ URL url = resourceLoader.getResource("org/apache/tuscany/binding/axis2/engine/config/axis2.xml"); InputStream serviceInputStream = url.openStream(); - AxisConfigBuilder axisConfigBuilder = new AxisConfigBuilder(serviceInputStream, new DeploymentEngine(), axisConfiguration); + AxisConfigBuilder axisConfigBuilder = new AxisConfigBuilder(serviceInputStream, + new DeploymentEngine(), + axisConfiguration); axisConfigBuilder.populateConfig(); serviceInputStream.close(); - return new ConfigurationContextFactory().createConfigurationContext(this); + return ConfigurationContextFactory.createConfigurationContext(this); } catch (IOException e) { throw new ServiceRuntimeException(e);
Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java Wed Apr 19 16:30:30 2006 @@ -21,5 +21,5 @@ @Remotable public interface AccountService { - public AccountReport getAccountReport(String customerID); + AccountReport getAccountReport(String customerID); } Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java Wed Apr 19 16:30:30 2006 @@ -16,27 +16,39 @@ */ package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; 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 - public String currency = "USD"; - + private String currency = "USD"; @Reference - public AccountDataService accountDataService; + private AccountDataService accountDataService; @Reference - public StockQuoteService stockQuoteService; + 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; } } Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java Wed Apr 19 16:30:30 2006 @@ -18,7 +18,7 @@ public interface StockQuoteService { - public float getQuote(String symbol); + float getQuote(String symbol); } Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldService.java Wed Apr 19 16:30:30 2006 @@ -21,6 +21,6 @@ */ public interface HelloWorldService { - public String getGreetings(String name); + String getGreetings(String name); } Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/handler/HelloWorldServiceComponentImpl.java Wed Apr 19 16:30:30 2006 @@ -16,9 +16,9 @@ */ 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; -import org.osoa.sca.annotations.Reference; /** * This class implements the HelloWorld service component. @@ -29,7 +29,8 @@ public class HelloWorldServiceComponentImpl implements HelloWorldService { @Reference - public HelloWorldService hellowWorldService = null; // Injected by the SCA container. + // Injected by the SCA container. + private HelloWorldService hellowWorldService; /** * @see org.apache.tuscany.samples.helloworldwsclient.HelloWorldService#getGreetings(java.lang.String) Modified: incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/AxiomHelperTestCase.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/AxiomHelperTestCase.java?rev=395438&r1=395437&r2=395438&view=diff ============================================================================== --- incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/AxiomHelperTestCase.java (original) +++ incubator/tuscany/java/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/util/AxiomHelperTestCase.java Wed Apr 19 16:30:30 2006 @@ -4,6 +4,9 @@ import javax.xml.namespace.QName; +import commonj.sdo.DataObject; +import commonj.sdo.helper.TypeHelper; + import junit.framework.TestCase; import org.apache.tuscany.sdo.helper.XSDHelperImpl; @@ -11,18 +14,17 @@ import org.apache.tuscany.sdo.util.SDOUtil; import org.apache.ws.commons.om.OMElement; -import commonj.sdo.DataObject; -import commonj.sdo.helper.TypeHelper; public class AxiomHelperTestCase extends TestCase { - public static final QName GREETING_QN = new QName("http://helloworldaxis.samples.tuscany.apache.org", "getGreetings"); + public static final QName GREETING_QN = new QName("http://helloworldaxis.samples.tuscany.apache.org", + "getGreetings"); private TypeHelper typeHelper; public void testToObjects1() { String s = "petra"; - OMElement omElement = AxiomHelper.toOMElement(typeHelper, new Object[] { s }, GREETING_QN); + OMElement omElement = AxiomHelper.toOMElement(typeHelper, new Object[] {s}, GREETING_QN); assertNotNull(omElement); Object[] os = AxiomHelper.toObjects(typeHelper, omElement); @@ -33,7 +35,7 @@ public void testToObjects2() { String s = "sue"; - DataObject dataObject = AxiomHelper.toDataObject(typeHelper, new Object[] { s }, GREETING_QN); + DataObject dataObject = AxiomHelper.toDataObject(typeHelper, new Object[] {s}, GREETING_QN); assertNotNull(dataObject); Object[] os = AxiomHelper.toObjects(dataObject); @@ -44,13 +46,13 @@ public void testToOMElement1() { String s = "beate"; - OMElement omElement = AxiomHelper.toOMElement(typeHelper, new Object[] { s }, GREETING_QN); + OMElement omElement = AxiomHelper.toOMElement(typeHelper, new Object[] {s}, GREETING_QN); assertNotNull(omElement); } public void testToOMElement2() { String s = "emma"; - DataObject dataObject = AxiomHelper.toDataObject(typeHelper, new Object[] { s }, GREETING_QN); + DataObject dataObject = AxiomHelper.toDataObject(typeHelper, new Object[] {s}, GREETING_QN); assertNotNull(dataObject); OMElement omElement = AxiomHelper.toOMElement(typeHelper, dataObject, GREETING_QN); @@ -59,7 +61,7 @@ public void testToDataObject() { String s = "bersi"; - DataObject dataObject = AxiomHelper.toDataObject(typeHelper, new Object[] { s }, GREETING_QN); + DataObject dataObject = AxiomHelper.toDataObject(typeHelper, new Object[] {s}, GREETING_QN); assertNotNull(dataObject); Object[] os = AxiomHelper.toObjects(dataObject); @@ -71,10 +73,10 @@ protected void setUp() throws Exception { super.setUp(); DataObjectUtil.initRuntime(); - ClassLoader cl=Thread.currentThread().getContextClassLoader(); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - typeHelper=SDOUtil.createTypeHelper(); + typeHelper = SDOUtil.createTypeHelper(); URL url = getClass().getResource("helloworld.wsdl"); new XSDHelperImpl(typeHelper).define(url.openStream(), null); } finally {
