You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by va...@apache.org on 2008/07/03 12:25:45 UTC

svn commit: r673645 - in /tuscany/java/sca/itest/databindings/jaxb-top-down/src: main/java/org/apache/tuscany/sca/itest/databindings/jaxb/ main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/ main/resources/wsdl/wrapped/ test/java/org/apache/...

Author: vamsic007
Date: Thu Jul  3 03:25:44 2008
New Revision: 673645

URL: http://svn.apache.org/viewvc?rev=673645&view=rev
Log:
Databinding tests JAXB Top Down for String, String array and var args.

Added:
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java   (with props)
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java   (with props)
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java   (with props)
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java   (with props)
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl   (with props)
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite   (with props)
    tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java   (with props)

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java Thu Jul  3 03:25:44 2008
@@ -0,0 +1,42 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for HelloService.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface HelloService {
+    String getGreetings(String name);
+    String[] getGreetingsArray(String[] names);
+    //List<String> getGreetingsList(List<String> names);
+    //ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+    //Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+    //HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
+    String getGreetingsVarArgs(String... names);
+}

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java Thu Jul  3 03:25:44 2008
@@ -0,0 +1,41 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * The interface for HelloServiceClient.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface HelloServiceClient {
+    String getGreetingsForward(String name);
+    String[] getGreetingsArrayForward(String[] names);
+    //List<String> getGreetingsListForward(List<String> names);
+    //ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
+    //Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
+    //HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
+    String getGreetingsVarArgsForward(String... names);
+}

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java Thu Jul  3 03:25:44 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of HelloServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceClient.class)
+public class HelloServiceClientImpl {
+
+    private HelloService service;
+
+    @Reference
+    public void setHelloService(HelloService service) {
+        this.service = service;
+    }
+
+    public String getGreetingsForward(String name) {
+        return service.getGreetings(name);
+    }
+
+    public String[] getGreetingsArrayForward(String[] names) {
+        return service.getGreetingsArray(names);
+    }
+
+//    public List<String> getGreetingsListForward(List<String> names) {
+//        return service.getGreetingsList(names);
+//    }
+
+//    public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
+//        return service.getGreetingsMap(namesMap);
+//    }
+
+//    public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
+//        return service.getGreetingsArrayList(names);
+//    }
+
+//    public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
+//        return service.getGreetingsHashMap(namesMap);
+//    }
+
+    public String getGreetingsVarArgsForward(String... names) {
+        return service.getGreetingsVarArgs(names[0], names[1], names[2]);
+    }
+}

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java Thu Jul  3 03:25:44 2008
@@ -0,0 +1,86 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloService;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of HelloService.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(interfaces = {HelloService.class})
+public class HelloServiceImpl implements HelloService {
+    public String getGreetings(String name) {
+        return "Hello " + name;
+    }
+
+    public String[] getGreetingsArray(String[] names) {
+        String[] resps = new String[names.length];
+        for (int i = 0; i < names.length; ++i) {
+            resps[i] = "Hello " + names[i];
+        }
+        return resps;
+    }
+
+    public List<String> getGreetingsList(List<String> names) {
+        List<String> resps = new ArrayList<String>();
+        for (int i = 0; i < names.size(); ++i) {
+            resps.add("Hello " + names.get(i));
+        }
+        return resps;
+    }
+
+    public ArrayList<String> getGreetingsArrayList(ArrayList<String> names) {
+        ArrayList<String> resps = new ArrayList<String>();
+        for (int i = 0; i < names.size(); ++i) {
+            resps.add("Hello " + names.get(i));
+        }
+        return resps;
+    }
+
+    public Map<String, String> getGreetingsMap(Map<String, String> namesMap) {
+        for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+            entry.setValue("Hello " + entry.getKey());
+        }
+        return namesMap;
+    }
+
+    public HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap) {
+        for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+            entry.setValue("Hello " + entry.getKey());
+        }
+        return namesMap;
+    }
+
+    public String getGreetingsVarArgs(String... names) {
+        String resp = "Hello";
+        for(int i = 0; i < names.length; ++i) {
+            resp += (" "+names[i]);
+        }
+        return resp;
+    }
+}

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl Thu Jul  3 03:25:44 2008
@@ -0,0 +1,178 @@
+<?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 name="HelloService"
+    targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+    xmlns:tns="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+    xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:types>
+        <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
+            version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+            <xs:complexType final="#all" name="stringArray">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0"
+                        name="item" nillable="true" type="xs:string" />
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
+        <xs:schema attributeFormDefault="qualified"
+            elementFormDefault="unqualified"
+            targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+            xmlns:xs="http://www.w3.org/2001/XMLSchema">
+            <xs:element name="getGreetingsArray">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0"
+                            name="arg0" nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsVarArgs">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0"
+                            name="arg0" nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetings">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="arg0"
+                            nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsVarArgsResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsArrayResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0"
+                            name="return" nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="getGreetingsArray">
+        <wsdl:part name="getGreetingsArray"
+            element="tns:getGreetingsArray">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsResponse">
+        <wsdl:part name="getGreetingsResponse"
+            element="tns:getGreetingsResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsVarArgs">
+        <wsdl:part name="getGreetingsVarArgs"
+            element="tns:getGreetingsVarArgs">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetings">
+        <wsdl:part name="getGreetings" element="tns:getGreetings">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsVarArgsResponse">
+        <wsdl:part name="getGreetingsVarArgsResponse"
+            element="tns:getGreetingsVarArgsResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsArrayResponse">
+        <wsdl:part name="getGreetingsArrayResponse"
+            element="tns:getGreetingsArrayResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="HelloService">
+        <wsdl:operation name="getGreetings">
+            <wsdl:input message="tns:getGreetings"></wsdl:input>
+            <wsdl:output message="tns:getGreetingsResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsArray">
+            <wsdl:input message="tns:getGreetingsArray"></wsdl:input>
+            <wsdl:output message="tns:getGreetingsArrayResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsVarArgs">
+            <wsdl:input message="tns:getGreetingsVarArgs">
+            </wsdl:input>
+            <wsdl:output message="tns:getGreetingsVarArgsResponse">
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="HelloServiceBinding" type="tns:HelloService">
+        <soap11:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="getGreetings">
+            <soap11:operation />
+            <wsdl:input>
+                <soap11:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap11:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsArray">
+            <soap11:operation />
+            <wsdl:input>
+                <soap11:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap11:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsVarArgs">
+            <soap11:operation />
+            <wsdl:input>
+                <soap11:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap11:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloServiceService">
+        <wsdl:port name="HelloServicePort"
+            binding="tns:HelloServiceBinding">
+            <soap11:address location="http://localhost:8085/hs-ep" />
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite Thu Jul  3 03:25:44 2008
@@ -0,0 +1,80 @@
+<?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://www.osoa.org/xmlns/sca/1.0" 
+           xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+           targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+           name="HelloService">
+           
+    <!-- Clients to test the service -->
+    <!-- A HelloServiceClient component that uses WS binding to invoke HelloService service.
+         The service component uses interface.wsdl on the service element.
+         This client component uses interface.wsdl on the reference element. -->
+    <component name="HelloServiceClientW2WComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceClientImpl" />
+        <reference name="helloService">
+            <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(HelloService)"/>
+            <binding.ws uri="http://localhost:8085/hs-ep-w"/>
+        </reference>
+    </component>
+        
+    <!-- A HelloServiceClient component that uses WS binding to invoke HelloService service.
+         The service component uses interface.wsdl on the service element.
+         This client component uses interface.java on the reference element. -->
+    <component name="HelloServiceClientJ2WComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceClientImpl" />
+        <reference name="helloService">
+            <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloService"/>
+            <binding.ws uri="http://localhost:8085/hs-ep-w"/>
+        </reference>
+    </component>
+        
+    <!-- A HelloServiceClient component that uses WS binding to invoke HelloService service.
+         The service component uses interface.wsdl on the service element.
+         This client component uses interface.java on the reference element. -->
+    <component name="HelloServiceClientW2JComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceClientImpl" />
+        <reference name="helloService">
+            <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(HelloService)"/>
+            <binding.ws uri="http://localhost:8085/hs-ep-j"/>
+        </reference>
+    </component>
+        
+    <!-- Components used to implement the services -->
+    <!-- A HelloService component that uses interface.wsdl -->
+    <component name="HelloServiceWSDLComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceImpl"/>
+        <service name="HelloService">
+            <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(HelloService)"/>
+            <binding.ws uri="http://localhost:8085/hs-ep-w"/>
+        </service>
+    </component>
+
+    <!-- A HelloService component that uses interface.java -->
+    <component name="HelloServiceJavaComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceImpl"/>
+        <service name="HelloService">
+            <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloService"/>
+            <binding.ws uri="http://localhost:8085/hs-ep-j"/>
+        </service>
+    </component>
+</composite>

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java?rev=673645&view=auto
==============================================================================
--- tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java (added)
+++ tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java Thu Jul  3 03:25:44 2008
@@ -0,0 +1,358 @@
+/*
+ * 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.itest.databindings.jaxb.topdown;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DatabindingTestCase {
+
+    private static SCAClient client;
+    private static SCANode2 node;
+
+    /**
+     * Runs once before running the tests
+     */
+    @BeforeClass
+    public static void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/wsdl/wrapped/helloservice.composite").toURL().toString(),
+                new SCAContribution("TestContribution", new File("src/main/resources/wsdl/wrapped").toURL().toString()));
+        node.start();
+        client = (SCAClient)node;
+    }
+
+    /**
+     * Runs once after running the tests
+     */
+    @AfterClass
+    public static void tearDown() {
+        node.stop();
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetings.
+     */
+    @Test
+    public void testW2W() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        performTest(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsArray.
+     */
+    @Test
+    public void testW2WArray() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        performTestArray(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsList.
+     */
+    @Test
+    @Ignore
+    public void testW2WList() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        //performTestList(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsArrayList.
+     */
+    @Test
+    @Ignore
+    public void testW2WArrayList() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        //performTestArrayList(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsMap.
+     */
+    @Test
+    @Ignore
+    public void testW2WMap() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        //performTestMap(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsHashMap.
+     */
+    @Test
+    @Ignore
+    public void testW2WHashMap() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        //performTestHashMap(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsVarArgs.
+     */
+    @Test
+    public void testW2WVarArgs() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+        performTestVarArgs(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetings.
+     */
+    @Test
+    public void testJ2W() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        performTest(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsArray.
+     */
+    @Test
+    public void testJ2WArray() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        performTestArray(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsList.
+     */
+    @Test
+    @Ignore
+    public void testJ2WList() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        //performTestList(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsArrayList.
+     */
+    @Test
+    @Ignore
+    public void testJ2WArrayList() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        //performTestArrayList(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsMap.
+     */
+    @Test
+    @Ignore
+    public void testJ2WMap() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        //performTestMap(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsHashMap.
+     */
+    @Test
+    @Ignore
+    public void testJ2WHashMap() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        //performTestHashMap(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsVarArgs.
+     */
+    @Test
+    public void testJ2WVarArgs() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+        performTestVarArgs(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetings.
+     */
+    @Test
+    public void testW2J() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        performTest(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsArray.
+     */
+    @Test
+    public void testW2JArray() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        performTestArray(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsList.
+     */
+    @Test
+    @Ignore
+    public void testW2JList() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        //performTestList(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsArrayList.
+     */
+    @Test
+    @Ignore
+    public void testW2JArrayList() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        //performTestArrayList(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsMap.
+     */
+    @Test
+    @Ignore
+    public void testW2JMap() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        //performTestMap(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsHashMap.
+     */
+    @Test
+    @Ignore
+    public void testW2JHashMap() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        //performTestHashMap(helloServiceClient);
+    }
+
+    /**
+     * Invokes the HelloService service using WS binding.
+     * Service method invoked is getGreetingsVarArgs.
+     */
+    @Test
+    public void testW2JVarArgs() throws Exception {
+        HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+        performTestVarArgs(helloServiceClient);
+    }
+
+    private void performTest(HelloServiceClient helloServiceClient) {
+        String name = "Pandu";
+        String resp = helloServiceClient.getGreetingsForward(name);
+        Assert.assertEquals("Hello "+name, resp);
+    }
+
+    private void performTestArray(HelloServiceClient helloServiceClient) {
+        String[] names = {"Me", "Pandu"};
+        String[] resps = helloServiceClient.getGreetingsArrayForward(names);
+        for(int i = 0; i < names.length; ++i) {
+            Assert.assertEquals("Hello "+names[i], resps[i]);
+        }
+    }
+
+/*    private void performTestList(HelloServiceClient helloServiceClient) {
+        List<String> namesList = new ArrayList<String>();
+        namesList.add("Me");
+        namesList.add("Pandu");
+        namesList.add("Chinnipandu");
+        List<String> respList = helloServiceClient.getGreetingsListForward(namesList);
+        Assert.assertEquals(namesList.size(), respList.size());
+        for(int i = 0; i < namesList.size(); ++i) {
+            Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+        }
+    }
+
+    private void performTestArrayList(HelloServiceClient helloServiceClient) {
+        ArrayList<String> namesList = new ArrayList<String>();
+        namesList.add("Me");
+        namesList.add("Pandu");
+        namesList.add("Chinnipandu");
+        ArrayList<String> respList = helloServiceClient.getGreetingsArrayListForward(namesList);
+        Assert.assertEquals(namesList.size(), respList.size());
+        for(int i = 0; i < namesList.size(); ++i) {
+            Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+        }
+    }
+
+    private void performTestMap(HelloServiceClient helloServiceClient) {
+        Map<String, String> namesMap = new HashMap<String, String>();
+        namesMap.put("Me", null);
+        namesMap.put("Pandu", null);
+        namesMap.put("Chinnipandu", null);
+        Map<String, String> respMap = helloServiceClient.getGreetingsMapForward(namesMap);
+        Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+        for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+            Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+        }
+    }
+
+    private void performTestHashMap(HelloServiceClient helloServiceClient) {
+        HashMap<String, String> namesMap = new HashMap<String, String>();
+        namesMap.put("Me", null);
+        namesMap.put("Pandu", null);
+        namesMap.put("Chinnipandu", null);
+        Map<String, String> respMap = helloServiceClient.getGreetingsHashMapForward(namesMap);
+        Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+        for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+            Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+        }
+    }
+*/
+    private void performTestVarArgs(HelloServiceClient helloServiceClient) {
+        String[] names = { "Me", "You", "Pandu" }; // Do not change the array size from 3.
+        String expected = "Hello Me You Pandu";
+        String actual = helloServiceClient.getGreetingsVarArgsForward(names[0], names[1], names[2]);
+        Assert.assertEquals(expected, actual);
+    }
+}

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain