You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ra...@apache.org on 2010/01/27 16:05:01 UTC

svn commit: r903668 [5/8] - in /tuscany/sca-java-2.x/trunk/itest: ./ databindings/ databindings/jaxb-bottom-up/ databindings/jaxb-bottom-up/src/ databindings/jaxb-bottom-up/src/main/ databindings/jaxb-bottom-up/src/main/java/ databindings/jaxb-bottom-u...

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java Wed Jan 27 15:04:56 2010
@@ -0,0 +1,81 @@
+/*
+ * 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.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+
+/**
+ * The interface for StandardTypesServiceClient.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface StandardTypesServiceClient {
+    BigInteger getNewBigIntegerForward(BigInteger bi);
+    BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia);
+
+    BigDecimal getNewBigDecimalForward(BigDecimal bd);
+    BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda);
+
+    Calendar getNewCalendarForward(Calendar c);
+    Calendar[] getNewCalendarArrayForward(Calendar[] ca);
+
+    Date getNewDateForward(Date d);
+    Date[] getNewDateArrayForward(Date[] da);
+
+    QName getNewQNameForward(QName qname);
+    QName[] getNewQNameArrayForward(QName[] qnames);
+
+    URI getNewURIForward(URI uri);
+    URI[] getNewURIArrayForward(URI[] uris);
+
+    XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal);
+    XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals);
+
+    Duration getNewDurationForward(Duration d);
+    Duration[] getNewDurationArrayForward(Duration[] da);
+
+    Object getNewObjectForward(Object obj);
+    Object[] getNewObjectArrayForward(Object[] objs);
+    
+    Image getNewImageForward(Image img);
+    Image[] getNewImageArrayForward(Image[] imgs);
+    
+    DataHandler getNewDataHandlerForward(DataHandler dh);
+    DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha);
+
+    Source getNewSourceForward(Source src);
+    Source[] getNewSourceArrayForward(Source[] srcs);
+
+    UUID getNewUUIDForward(UUID uuid);
+    UUID[] getNewUUIDArrayForward(UUID[] uuids);
+}

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

Propchange: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/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/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java Wed Jan 27 15:04:56 2010
@@ -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.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.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/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: tuscany/sca-java-2.x/trunk/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/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java Wed Jan 27 15:04:56 2010
@@ -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.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloService.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(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/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java Wed Jan 27 15:04:56 2010
@@ -0,0 +1,139 @@
+/*
+ * 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 org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(PrimitivesServiceClient.class)
+public class PrimitivesServiceClientImpl {
+
+    private PrimitivesService service;
+    
+    @Reference
+    public void setPrimitivesService(PrimitivesService service) {
+        this.service = service;
+    }
+    public boolean negateBooleanForward(boolean flag) {
+        return service.negateBoolean(flag);
+    }
+    
+    public boolean[] negateBooleanArrayForward(boolean[] flags) {
+        return service.negateBooleanArray(flags);
+    }
+
+    public boolean passByValueBooleanArray() {
+        boolean[] req = new boolean[2];
+        boolean[] resp = service.identityBooleanArray(req);
+        return req != resp;
+    }
+    
+    public byte negateByteForward(byte b) {
+        return service.negateByte(b);
+    }
+    
+    public byte[] negateByteArrayForward(byte[] ba) {
+        return service.negateByteArray(ba);
+    }
+
+    public boolean passByValueByteArray() {
+        byte[] req = new byte[2];
+        byte[] resp = service.identityByteArray(req);
+        return req != resp;
+    }
+    
+    public short negateShortForward(short s) {
+        return service.negateShort(s);
+    }
+    
+    public short[] negateShortArrayForward(short[] s) {
+        return service.negateShortArray(s);
+    }
+
+    public boolean passByValueShortArray() {
+        short[] req = new short[2];
+        short[] resp = service.identityShortArray(req);
+        return req != resp;
+    }
+    
+    public int negateIntForward(int i) {
+        return service.negateInt(i);
+    }
+    
+    public int[] negateIntArrayForward(int[] ia) {
+        return service.negateIntArray(ia);
+    }
+
+    public boolean passByValueIntArray() {
+        int[] req = new int[2];
+        int[] resp = service.identityIntArray(req);
+        return req != resp;
+    }
+    
+    public long negateLongForward(long l) {
+        return service.negateLong(l);
+    }
+    
+    public long[] negateLongArrayForward(long[] la) {
+        return service.negateLongArray(la);
+    }
+
+    public boolean passByValueLongArray() {
+        long[] req = new long[2];
+        long[] resp = service.identityLongArray(req);
+        return req != resp;
+    }
+    
+    public float negateFloatForward(float f) {
+        return service.negateFloat(f);
+    }
+    
+    public float[] negateFloatArrayForward(float[] fa) {
+        return service.negateFloatArray(fa);
+    }
+
+    public boolean passByValueFloatArray() {
+        float[] req = new float[2];
+        float[] resp = service.identityFloatArray(req);
+        return req != resp;
+    }
+    
+    public double negateDoubleForward(double d) {
+        return service.negateDouble(d);
+    }
+    
+    public double[] negateDoubleArrayForward(double[] da) {
+        return service.negateDoubleArray(da);
+    }
+
+    public boolean passByValueDoubleArray() {
+        double[] req = new double[2];
+        double[] resp = service.identityDoubleArray(req);
+        return req != resp;
+    }
+}

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

Propchange: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java Wed Jan 27 15:04:56 2010
@@ -0,0 +1,151 @@
+/*
+ * 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 org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesService.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(PrimitivesService.class)
+public class PrimitivesServiceImpl implements PrimitivesService {
+
+    public boolean negateBoolean(boolean flag) {
+        return !flag;
+    }
+
+    public boolean[] negateBooleanArray(boolean[] flags) {
+        boolean[] resp = new boolean[flags.length];
+        
+        for(int i = 0; i < flags.length; ++i) {
+            resp[i] = !flags[i];
+        }
+        return resp;
+    }
+    
+    public boolean[] identityBooleanArray(boolean[] flags) {
+        return flags;
+    }
+    
+    public byte negateByte(byte b) {
+        return (byte)-b;
+    }
+
+    public byte[] negateByteArray(byte[] ba) {
+        byte[] resp = new byte[ba.length];
+        
+        for(int i = 0; i < ba.length; ++i) {
+            resp[i] = (byte)-ba[i];
+        }
+        return resp;
+    }
+    
+    public byte[] identityByteArray(byte[] ba) {
+        return ba;
+    }
+    
+    public short negateShort(short s) {
+        return (short)-s;
+    }
+
+    public short[] negateShortArray(short[] s) {
+        short[] resp = new short[s.length];
+        
+        for(int i = 0; i < s.length; ++i) {
+            resp[i] = (short)-s[i];
+        }
+        return resp;
+    }
+    
+    public short[] identityShortArray(short[] sa) {
+        return sa;
+    }
+
+    public int negateInt(int i) {
+        return -i;
+    }
+
+    public int[] negateIntArray(int[] ia) {
+        int[] resp = new int[ia.length];
+        
+        for(int i = 0; i < ia.length; ++i) {
+            resp[i] = -ia[i];
+        }
+        return resp;
+    }
+
+    public int[] identityIntArray(int[] ia) {
+        return ia;
+    }
+    
+    public long negateLong(long l) {
+        return -l;
+    }
+
+    public long[] negateLongArray(long[] la) {
+        long[] resp = new long[la.length];
+        
+        for(int i = 0; i < la.length; ++i) {
+            resp[i] = -la[i];
+        }
+        return resp;
+    }
+    
+    public long[] identityLongArray(long[] la) {
+        return la;
+    }
+    
+    public float negateFloat(float f) {
+        return -f;
+    }
+
+    public float[] negateFloatArray(float[] fa) {
+        float[] resp = new float[fa.length];
+        
+        for(int i = 0; i < fa.length; ++i) {
+            resp[i] = -fa[i];
+        }
+        return resp;
+    }
+    
+    public float[] identityFloatArray(float[] fa) {
+        return fa;
+    }
+    
+    public double negateDouble(double d) {
+        return -d;
+    }
+
+    public double[] negateDoubleArray(double[] da) {
+        double[] resp = new double[da.length];
+        
+        for(int i = 0; i < da.length; ++i) {
+            resp[i] = -da[i];
+        }
+        return resp;
+    }
+    
+    public double[] identityDoubleArray(double[] da) {
+        return da;
+    }
+}

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

Propchange: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java Wed Jan 27 15:04:56 2010
@@ -0,0 +1,159 @@
+/*
+ * 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.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(StandardTypesServiceClient.class)
+public class StandardTypesServiceClientImpl implements StandardTypesServiceClient{
+
+    private StandardTypesService service;
+    
+    @Reference
+    public void setStandardTypesService(StandardTypesService service) {
+        this.service = service;
+    }
+
+    public BigInteger getNewBigIntegerForward(BigInteger bi) {
+        return service.getNewBigInteger(bi);
+    }
+
+    public BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia) {
+        return service.getNewBigIntegerArray(bia);
+    }
+
+    public BigDecimal getNewBigDecimalForward(BigDecimal bd) {
+        return service.getNewBigDecimal(bd);
+    }
+
+    public BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda) {
+        return service.getNewBigDecimalArray(bda);
+    }
+    public Calendar getNewCalendarForward(Calendar c) {
+        return service.getNewCalendar(c);
+    }
+    public Calendar[] getNewCalendarArrayForward(Calendar[] ca) {
+        return service.getNewCalendarArray(ca);
+    }
+
+    public Date getNewDateForward(Date d) {
+        return service.getNewDate(d);
+    }
+
+    public Date[] getNewDateArrayForward(Date[] da) {
+        return service.getNewDateArray(da);
+    }
+
+    public QName getNewQNameForward(QName qname) {
+        return service.getNewQName(qname);
+    }
+
+    public QName[] getNewQNameArrayForward(QName[] qnames) {
+        return service.getNewQNameArray(qnames);        
+    }
+
+    public URI getNewURIForward(URI uri) {
+        return service.getNewURI(uri);
+    }
+
+    public URI[] getNewURIArrayForward(URI[] uris) {
+        return service.getNewURIArray(uris);
+    }
+
+    public XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal) {
+        return service.getNewXMLGregorianCalendar(xgcal);
+    }
+
+    public XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals) {
+        return service.getNewXMLGregorianCalendarArray(xgcals);
+    }
+
+    public Duration getNewDurationForward(Duration d) {
+        return service.getNewDuration(d);
+    }
+
+    public Duration[] getNewDurationArrayForward(Duration[] da) {
+        return service.getNewDurationArray(da);
+    }
+
+    public Object getNewObjectForward(Object obj) {
+        return service.getNewObject(obj);
+    }
+
+    public Object[] getNewObjectArrayForward(Object[] objs) {
+        return service.getNewObjectArray(objs);
+    }
+    
+    public Image getNewImageForward(Image img) {
+        return service.getNewImage(img);
+    }
+
+    public Image[] getNewImageArrayForward(Image[] imgs) {
+        return service.getNewImageArray(imgs);
+    }
+
+    public DataHandler getNewDataHandlerForward(DataHandler dh) {
+        return service.getNewDataHandler(dh);
+    }
+
+    public DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha) {
+        return service.getNewDataHandlerArray(dha);
+    }
+
+    
+    public Source getNewSourceForward(Source src) {
+        return service.getNewSource(src);
+    }
+
+    public Source[] getNewSourceArrayForward(Source[] srcs) {
+        return service.getNewSourceArray(srcs);
+    }
+    
+    public UUID getNewUUIDForward(UUID uuid) {
+        return service.getNewUUID(uuid);
+    }
+
+    public UUID[] getNewUUIDArrayForward(UUID[] uuids) {
+        return service.getNewUUIDArray(uuids);
+    }
+}

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

Propchange: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java Wed Jan 27 15:04:56 2010
@@ -0,0 +1,207 @@
+/*
+ * 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.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesService.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(StandardTypesService.class)
+public class StandardTypesServiceImpl implements StandardTypesService {
+    public BigInteger getNewBigInteger(BigInteger bi) {
+        return bi.negate();
+    }
+
+    public BigInteger[] getNewBigIntegerArray(BigInteger[] bia) {
+        BigInteger[] resp = new BigInteger[bia.length];
+        for(int i = 0; i < bia.length; ++i) {
+            resp[i] = bia[i].negate();
+        }
+        return resp;
+    }
+
+    public BigDecimal getNewBigDecimal(BigDecimal bd) {
+        return bd.negate();
+    }
+
+    public BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda) {
+        BigDecimal[] resp = new BigDecimal[bda.length];
+        for(int i = 0; i < bda.length; ++i) {
+            resp[i] = bda[i].negate();
+        }
+        return resp;
+    }
+
+    public Calendar getNewCalendar(Calendar c) {
+        Calendar resp = (Calendar)c.clone();
+        resp.add(Calendar.DAY_OF_MONTH, 5);
+        return resp;
+    }
+
+    public Calendar[] getNewCalendarArray(Calendar[] ca) {
+        Calendar[] resp = new Calendar[ca.length];
+        for(int i = 0; i < ca.length; ++i) {
+            resp[i] = getNewCalendar(ca[i]);
+        }
+        return resp;
+    }
+
+    public Date getNewDate(Date d) {
+        return new Date(d.getTime() + 5*24*60*60*1000);
+    }
+
+    public Date[] getNewDateArray(Date[] da) {
+        Date[] resp = new Date[da.length];
+        for(int i = 0; i < da.length; ++i) {
+            resp[i] = getNewDate(da[i]);
+        }
+        return resp;
+    }
+
+    public QName getNewQName(QName qname) {
+        return new QName(qname.getNamespaceURI()+"q", qname.getLocalPart()+"q", qname.getPrefix()+"q");
+        
+    }
+
+    public QName[] getNewQNameArray(QName[] qnames) {
+        QName[] resp = new QName[qnames.length];
+        for(int i = 0; i < qnames.length; ++i) {
+            resp[i] = getNewQName(qnames[i]);
+        }
+        return resp;
+    }
+
+    public URI getNewURI(URI uri) {
+        return uri.resolve("uri");
+    }
+
+    public URI[] getNewURIArray(URI[] uris) {
+        URI[] resp = new URI[uris.length];
+        for(int i = 0; i < uris.length; ++i) {
+            resp[i] = getNewURI(uris[i]);
+        }
+        return resp;
+    }
+
+    public XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal) {
+        xgcal = (XMLGregorianCalendar)xgcal.clone();
+        xgcal.setDay(xgcal.getDay()+5);
+        return xgcal;
+    }
+
+    public XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcals) {
+        XMLGregorianCalendar[] resp = new XMLGregorianCalendar[xgcals.length];
+        for(int i = 0; i < xgcals.length; ++i) {
+            resp[i] = getNewXMLGregorianCalendar(xgcals[i]);
+        }
+        return resp;
+    }
+
+    public Duration getNewDuration(Duration d) {
+        return d.negate();
+    }
+
+    public Duration[] getNewDurationArray(Duration[] da) {
+        Duration[] resp = new Duration[da.length];
+        for(int i = 0; i < da.length; ++i) {
+            resp[i] = da[i].negate();
+        }
+        return resp;
+    }
+
+    public Object getNewObject(Object obj) {
+        return StandardTypesTransformer.getNewObject(obj);
+    }
+
+    public Object[] getNewObjectArray(Object[] objs) {
+        Object[] resp = new Object[objs.length];
+        for(int i = 0; i < objs.length; ++i) {
+            resp[i] = getNewObject(objs[i]);
+        }
+        return resp;
+    }
+
+    public Image getNewImage(Image img) {
+        return StandardTypesTransformer.getNewImage(img);
+    }
+
+    public Image[] getNewImageArray(Image[] imgs) {
+        Image[] resp = new Image[imgs.length];
+        for(int i = 0; i < imgs.length; ++i) {
+            resp[i] = getNewImage(imgs[i]);
+        }
+        return resp;
+    }
+
+    public DataHandler getNewDataHandler(DataHandler dh) {
+        // FIXME: transform the input
+        return dh;
+    }
+
+    public DataHandler[] getNewDataHandlerArray(DataHandler[] dha) {
+        DataHandler[] resp = new DataHandler[dha.length];
+        for(int i = 0; i < dha.length; ++i) {
+            resp[i] = dha[i];
+        }
+        return resp;
+    }
+    
+    public Source getNewSource(Source src) {
+        return StandardTypesTransformer.getNewSource(src);
+    }
+
+    public Source[] getNewSourceArray(Source[] srcs) {
+        Source[] resp = new Source[srcs.length];
+        for(int i = 0; i < srcs.length; ++i) {
+            resp[i] = getNewSource(srcs[i]);
+        }
+        return resp;
+    }
+
+    public UUID getNewUUID(UUID uuid) {
+        return UUID.fromString(uuid.toString()+"AAA");
+    }
+
+    public UUID[] getNewUUIDArray(UUID[] uuids) {
+        UUID[] resp = new UUID[uuids.length];
+        for(int i = 0; i < uuids.length; ++i) {
+            resp[i] = getNewUUID(uuids[i]);
+        }
+        return resp;
+    }
+}

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

Propchange: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java Wed Jan 27 15:04:56 2010
@@ -0,0 +1,142 @@
+/*
+ * 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.awt.Image;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayReader;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamSource;
+
+import org.xml.sax.InputSource;
+
+/**
+ * StandardTypesTransformer class that provide for transforming input provided to StandardTypesService methods.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class StandardTypesTransformer {
+    
+    public static Object getNewObject(Object obj) {
+        if(obj instanceof String) {
+            return "Hello "+obj;
+        } else if(obj instanceof Integer) {
+            return new Integer(-((Integer)obj).intValue());
+        } else if(obj instanceof Double) {
+            return new Double(-((Double)obj).doubleValue());
+        }
+        
+        return obj;
+    }
+    
+    /**
+     * Returns a copy of the source object if the input is DOMSource, SAXSource or StreamSource.
+     * Returns the input object as is for other types.
+     */
+    public static Source getNewSource(Source src) {
+        Source ret = null;
+        if(src instanceof DOMSource) {
+            DOMSource dsrc = (DOMSource)src;
+            ret = new DOMSource(dsrc.getNode() != null ? dsrc.getNode().cloneNode(true) : null);
+        } else if(src instanceof SAXSource) {
+            SAXSource ssrc = (SAXSource)src;
+            if(ssrc.getInputSource().getByteStream() != null) {
+                InputStream inp = ssrc.getInputSource().getByteStream();
+                ByteArrayOutputStream bout = new ByteArrayOutputStream();
+                int b;
+                try {
+                    while((b = inp.read()) != -1) {
+                        bout.write(b);
+                    }
+                } catch (IOException ignored) {
+                }
+                try { bout.close();} catch (IOException ignored) {}
+                try { inp.reset();} catch (IOException ignored) {}
+                ret = new SAXSource(new InputSource(new ByteArrayInputStream(bout.toByteArray())));
+            } else if(ssrc.getInputSource().getCharacterStream() != null) {
+                Reader rdr = ssrc.getInputSource().getCharacterStream();
+                CharArrayWriter caw = new CharArrayWriter();
+                try {
+                    int c;
+                    while((c = rdr.read()) != -1) {
+                        caw.append((char)c);
+                    }
+                } catch (IOException ignored) {
+                }
+                caw.close();
+                try{ rdr.reset();} catch(IOException ignored) {}
+                ret = new SAXSource(new InputSource(new CharArrayReader(caw.toCharArray())));
+            } else {
+                ret = new SAXSource();
+            }
+        } else if(src instanceof StreamSource) {
+            StreamSource ssrc = (StreamSource)src;
+            if(ssrc.getInputStream() != null) {
+                InputStream inp = ssrc.getInputStream();
+                ByteArrayOutputStream bout = new ByteArrayOutputStream();
+                int b;
+                try {
+                    while((b = inp.read()) != -1) {
+                        bout.write(b);
+                    }
+                } catch (IOException ignored) {
+                }
+                try { bout.close();} catch (IOException ignored) {}
+                try { inp.reset();} catch (IOException ignored) {}
+                ret = new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+            } else if(ssrc.getReader() != null) {
+                Reader rdr = ssrc.getReader();
+                CharArrayWriter caw = new CharArrayWriter();
+                try {
+                    int c;
+                    while((c = rdr.read()) != -1) {
+                        caw.append((char)c);
+                    }
+                } catch (IOException ignored) {
+                }
+                caw.close();
+                try{ rdr.reset();} catch(IOException ignored) {}
+                ret = new StreamSource(new CharArrayReader(caw.toCharArray()));
+            } else {
+                ret = new StreamSource();
+            }
+        }
+        
+        if(ret != null) {
+            ret.setSystemId(src.getSystemId());
+        } else {
+            ret = src;
+        }
+        return ret;
+    }
+    
+    public static Image getNewImage(Image arg) {
+        arg.getGraphics().drawOval(2, 2, 7, 7);
+        return arg;
+    }
+}

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

Propchange: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl Wed Jan 27 15:04:56 2010
@@ -0,0 +1,371 @@
+<?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: 678733 $ $Date: 2008-07-22 17:48:58 +0530 (Tue, 22 Jul 2008) $ -->
+
+<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://util.java/"
+            version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+            <xs:complexType name="arrayList">
+                <xs:complexContent>
+                    <xs:extension base="abstractList">
+                        <xs:sequence />
+                    </xs:extension>
+                </xs:complexContent>
+            </xs:complexType>
+            <xs:complexType abstract="true" name="abstractList">
+                <xs:complexContent>
+                    <xs:extension base="abstractCollection">
+                        <xs:sequence />
+                    </xs:extension>
+                </xs:complexContent>
+            </xs:complexType>
+            <xs:complexType abstract="true" name="abstractCollection">
+                <xs:sequence />
+            </xs:complexType>
+            <xs:complexType name="hashMap">
+                <xs:complexContent>
+                    <xs:extension base="abstractMap">
+                        <xs:sequence />
+                    </xs:extension>
+                </xs:complexContent>
+            </xs:complexType>
+            <xs:complexType abstract="true" name="abstractMap">
+                <xs:sequence />
+            </xs:complexType>
+        </xs:schema>
+        <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:ns0="http://util.java/"
+            xmlns:xs="http://www.w3.org/2001/XMLSchema">
+            <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="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="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="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:element name="getGreetingsList">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="arg0"
+                            nillable="true" type="xs:anyType" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsListResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="xs:anyType" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsArrayList">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="arg0"
+                            nillable="true" type="ns0:arrayList" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsArrayListResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="ns0:arrayList" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsMap">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="arg0"
+                            nillable="true" type="xs:anyType" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsMapResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="xs:anyType" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsHashMap">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="arg0"
+                            nillable="true" type="ns0:hashMap" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getGreetingsHashMapResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="ns0:hashMap" />
+                    </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="getGreetingsVarArgsResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return"
+                            nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="getGreetings">
+        <wsdl:part name="getGreetings" element="tns:getGreetings">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsResponse">
+        <wsdl:part name="getGreetingsResponse"
+            element="tns:getGreetingsResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsArray">
+        <wsdl:part name="getGreetingsArray"
+            element="tns:getGreetingsArray">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsArrayResponse">
+        <wsdl:part name="getGreetingsArrayResponse"
+            element="tns:getGreetingsArrayResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsList">
+        <wsdl:part name="getGreetingsList"
+            element="tns:getGreetingsList">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsListResponse">
+        <wsdl:part name="getGreetingsListResponse"
+            element="tns:getGreetingsListResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsArrayList">
+        <wsdl:part name="getGreetingsArrayList"
+            element="tns:getGreetingsArrayList">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsArrayListResponse">
+        <wsdl:part name="getGreetingsArrayListResponse"
+            element="tns:getGreetingsArrayListResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsMap">
+        <wsdl:part name="getGreetingsMap"
+            element="tns:getGreetingsMap">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsMapResponse">
+        <wsdl:part name="getGreetingsMapResponse"
+            element="tns:getGreetingsMapResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsHashMap">
+        <wsdl:part name="getGreetingsHashMap"
+            element="tns:getGreetingsHashMap">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsHashMapResponse">
+        <wsdl:part name="getGreetingsHashMapResponse"
+            element="tns:getGreetingsHashMapResponse">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsVarArgs">
+        <wsdl:part name="getGreetingsVarArgs"
+            element="tns:getGreetingsVarArgs">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getGreetingsVarArgsResponse">
+        <wsdl:part name="getGreetingsVarArgsResponse"
+            element="tns:getGreetingsVarArgsResponse">
+        </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="getGreetingsList">
+            <wsdl:input message="tns:getGreetingsList"></wsdl:input>
+            <wsdl:output message="tns:getGreetingsListResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsArrayList">
+            <wsdl:input message="tns:getGreetingsArrayList">
+            </wsdl:input>
+            <wsdl:output message="tns:getGreetingsArrayListResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsMap">
+            <wsdl:input message="tns:getGreetingsMap">
+            </wsdl:input>
+            <wsdl:output message="tns:getGreetingsMapResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsHashMap">
+            <wsdl:input message="tns:getGreetingsHashMap"></wsdl:input>
+            <wsdl:output message="tns:getGreetingsHashMapResponse">
+            </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="getGreetingsList">
+            <soap11:operation />
+            <wsdl:input>
+                <soap11:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap11:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsArrayList">
+            <soap11:operation />
+            <wsdl:input>
+                <soap11:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap11:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsMap">
+            <soap11:operation />
+            <wsdl:input>
+                <soap11:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap11:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getGreetingsHashMap">
+            <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>

Added: tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite?rev=903668&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite Wed Jan 27 15:04:56 2010
@@ -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: 741544 $ $Date: 2009-02-06 17:16:22 +0530 (Fri, 06 Feb 2009) $ -->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
+           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" requires="MTOM"/>
+        </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" requires="MTOM"/>
+        </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" requires="MTOM"/>
+        </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" requires="MTOM"/>
+        </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" requires="MTOM"/>
+        </service>
+    </component>
+</composite>