You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2007/09/28 17:44:55 UTC

svn commit: r580392 [2/2] - in /incubator/tuscany/java/sca/demos/customer-map: ./ src/ src/main/ src/main/java/ src/main/java/customer/ src/main/java/launch/ src/main/resources/ src/main/resources/dastest/ src/main/resources/dastest/log/ src/main/resou...

Added: incubator/tuscany/java/sca/demos/customer-map/src/main/resources/html/map.json
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/customer-map/src/main/resources/html/map.json?rev=580392&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/customer-map/src/main/resources/html/map.json (added)
+++ incubator/tuscany/java/sca/demos/customer-map/src/main/resources/html/map.json Fri Sep 28 08:44:47 2007
@@ -0,0 +1,27 @@
+/*
+ * 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.    
+ */
+ 
+{"markers": [
+     {"country":"Brazil", "city":"Cuiaba", "point":new GLatLng(-15.625702586903822, -56.07351064682007), "html":"My home town","label":"Cuiaba"},
+     {"country":"Brazil", "city":"Chapada dos Guimaraes", "point":new GLatLng(-15.44329, -55.75835), "html":"Chapada, Wonderful landscape and beautiful whaterfalls ","label":"Chapada dos Guimaraes"},     
+     {"country":"Brazil", "city":"Pantanal Matogrossense", "point":new GLatLng(-16.223575372658782, -56.631431579589844), "html":"Pantanal and it's amazing biologic diversity","label":"Pantanal Matogrossensse"},
+     {"country":"Brazil", "city":"Rio de Janeiro", "point":new GLatLng(-22.963984709280982, -43.17753553390503), "html":"Wonderful City","label":"Rio de Janeiro"},     
+     {"country":"Brazil", "city":"Sao Paulo", "point":new GLatLng(-23.54329433556302, -46.71802997589111), "html":"Sao Paulo","label":"Sao Paulo"},
+   ]
+}
\ No newline at end of file

Added: incubator/tuscany/java/sca/demos/customer-map/src/test/java/customer/CustomerServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/customer-map/src/test/java/customer/CustomerServiceTestCase.java?rev=580392&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/customer-map/src/test/java/customer/CustomerServiceTestCase.java (added)
+++ incubator/tuscany/java/sca/demos/customer-map/src/test/java/customer/CustomerServiceTestCase.java Fri Sep 28 08:44:47 2007
@@ -0,0 +1,60 @@
+/*
+ * 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 customer;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+import commonj.sdo.DataObject;
+import customer.CustomerService;
+
+/**
+ * Tests the DAS service
+ */
+public class CustomerServiceTestCase extends TestCase {
+
+    private SCADomain scaDomain;
+    private CustomerService customerService;
+    
+    /**
+     * @throws java.lang.Exception
+     */
+    @Override
+    protected void setUp() throws Exception {
+        scaDomain = SCADomain.newInstance("customer.composite");
+        customerService = scaDomain.getService(CustomerService.class, "CustomerServiceComponent/CustomerService");
+    }
+
+    /**
+     * @throws java.lang.Exception
+     */
+    @Override
+    protected void tearDown() throws Exception {
+        scaDomain.close();
+    }
+    
+    public void testGetCustomers() throws Exception {
+        DataObject root = customerService.getCustomers();
+        assertNotNull(root);        
+        assertEquals("Luciano Resende", root.getString("CUSTOMER[1]/NAME"));
+    }
+
+
+}

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/java/customer/CustomerServiceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/java/customer/CustomerServiceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType?rev=580392&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType (added)
+++ incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType Fri Sep 28 08:44:47 2007
@@ -0,0 +1,29 @@
+<?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://www.osoa.org/xmlns/sca/1.0" 
+	xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="CustomerService">
+        <interface.java interface="customer.CustomerService"/>
+    </service>
+
+</componentType>         
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.componentType
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite?rev=580392&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite (added)
+++ incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite Fri Sep 28 08:44:47 2007
@@ -0,0 +1,35 @@
+<?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://www.osoa.org/xmlns/sca/1.0"
+    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+	targetNamespace="http://demo/google-maps"
+	name="customer">
+
+    <component name="CustomerServiceComponent">
+    	<tuscany:implementation.das config="customer.xml" dataAccessType="rdb">
+    		<tuscany:connectionInfo>
+    			<tuscany:connectionProperties
+    				driverClass="org.apache.derby.jdbc.EmbeddedDriver"
+    				databaseURL="jdbc:derby:target/classes/dastest; create = true"
+    				loginTimeout="600000" />
+    		</tuscany:connectionInfo>
+    	</tuscany:implementation.das>
+    </component>
+</composite>

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml?rev=580392&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml (added)
+++ incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml Fri Sep 28 08:44:47 2007
@@ -0,0 +1,27 @@
+<?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.
+ -->
+<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> 
+    
+    <Command name="getCustomers" SQL="select * from CUSTOMER" kind="Select"/>
+    
+    <Table tableName="CUSTOMER">
+        <Column columnName="ID" primaryKey="true" generated="true"/>
+    </Table>
+</Config>

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/demos/customer-map/src/test/resources/customer.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org