You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/10/25 20:44:29 UTC
svn commit: r588309 - in /incubator/tuscany/java/sca/tutorial:
store-catalog/src/main/java/services/ store/src/main/java/services/merger/
Author: jsdelfino
Date: Thu Oct 25 11:44:28 2007
New Revision: 588309
URL: http://svn.apache.org/viewvc?rev=588309&view=rev
Log:
Return the Catalog as a bean for now as the Web Services binding does not like top level array parameters.
Added:
incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/Vegetables.java
incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java (with props)
Modified:
incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalog.java
incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalogImpl.java
incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java
incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/VegetablesCatalog.java
Added: incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/Vegetables.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/Vegetables.java?rev=588309&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/Vegetables.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/Vegetables.java Thu Oct 25 11:44:28 2007
@@ -0,0 +1,31 @@
+/*
+ * 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 services;
+
+/**
+ * Vegetables
+ *
+ * @version $Rev$ $Date$
+ */
+public class Vegetables {
+
+ public String[] items;
+
+}
Modified: incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalog.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalog.java?rev=588309&r1=588308&r2=588309&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalog.java (original)
+++ incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalog.java Thu Oct 25 11:44:28 2007
@@ -24,6 +24,6 @@
@Remotable
public interface VegetablesCatalog {
- String[] get();
+ Vegetables get();
}
Modified: incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalogImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalogImpl.java?rev=588309&r1=588308&r2=588309&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalogImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/services/VegetablesCatalogImpl.java Thu Oct 25 11:44:28 2007
@@ -29,14 +29,15 @@
@Init
public void init() {
- catalog.add("Broccoli" + " - " + 2.99);
- catalog.add("Asparagus" + " - " + 3.55);
- catalog.add("Cauliflower" + " - " + 1.55);
+ catalog.add("Broccoli - $2.99");
+ catalog.add("Asparagus - $3.55");
+ catalog.add("Cauliflower - $1.55");
}
- public String[] get() {
- String[] catalogArray = new String[catalog.size()];
- catalog.toArray(catalogArray);
- return catalogArray;
+ public Vegetables get() {
+ Vegetables vegetables = new Vegetables();
+ vegetables.items = new String[catalog.size()];
+ catalog.toArray(vegetables.items);
+ return vegetables;
}
}
Modified: incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java?rev=588309&r1=588308&r2=588309&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java Thu Oct 25 11:44:28 2007
@@ -33,14 +33,14 @@
public String[] get() {
String[] fruits = fruitsCatalog.get();
- String[] vegetables = vegetablesCatalog.get();
+ Vegetables vegetables = vegetablesCatalog.get();
- String[] catalog = new String[fruits.length + vegetables.length];
+ String[] catalog = new String[fruits.length + vegetables.items.length];
int i =0;
for (String fruit: fruits) {
catalog[i++] = fruit;
}
- for (String vegetable: vegetables) {
+ for (String vegetable: vegetables.items) {
catalog[i++] = vegetable;
}
Added: incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java?rev=588309&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java (added)
+++ incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java Thu Oct 25 11:44:28 2007
@@ -0,0 +1,31 @@
+/*
+ * 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 services.merger;
+
+/**
+ * Vegetables
+ *
+ * @version $Rev$ $Date$
+ */
+public class Vegetables {
+
+ public String[] items;
+
+}
Propchange: incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/Vegetables.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/VegetablesCatalog.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/VegetablesCatalog.java?rev=588309&r1=588308&r2=588309&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/VegetablesCatalog.java (original)
+++ incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/VegetablesCatalog.java Thu Oct 25 11:44:28 2007
@@ -24,6 +24,6 @@
@Remotable
public interface VegetablesCatalog {
- String[] get();
+ Vegetables get();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org