Author: lresende
Date: Thu Apr 29 04:49:51 2010
New Revision: 939194

URL: http://svn.apache.org/viewvc?rev=939194&view=rev
Log:
Adding XML wire format binding implementation for REST binding, and 
adjusting/improving tests for XML and JSON wire formats

Added:
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java
   (with props)
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java
   (with props)
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java
   (with props)
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java
   (with props)
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/Customer.java
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerService.java
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerServiceImpl.java
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java
   (contents, props changed)
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java
   (contents, props changed)
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverter.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java
   (contents, props changed)
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverterImpl.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java
   (contents, props changed)
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/FruitsCatalogImpl.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java
   (contents, props changed)
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite
      - copied, changed from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite
Removed:
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverter.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverterImpl.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/FruitsCatalogImpl.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF
    tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java
    
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite

Modified: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF?rev=939194&r1=939193&r2=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF 
(original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF 
Thu Apr 29 04:49:51 2010
@@ -14,6 +14,7 @@ Import-Package: javax.servlet,
  org.apache.tuscany.sca.binding.rest;version="2.0.0",
  org.apache.tuscany.sca.binding.rest.operationselector.jaxrs,
  org.apache.tuscany.sca.binding.rest.wireformat.json,
+ org.apache.tuscany.sca.binding.rest.wireformat.xml,
  org.apache.tuscany.sca.common.http;version="2.0.0",
  org.apache.tuscany.sca.core;version="2.0.0",
  org.apache.tuscany.sca.host.http;version="2.0.0",

Modified: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml?rev=939194&r1=939193&r2=939194&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml Thu Apr 29 
04:49:51 2010
@@ -68,6 +68,12 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-databinding-jaxb</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-databinding-json</artifactId>
             <version>2.0-SNAPSHOT</version>
         </dependency>

Added: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java?rev=939194&view=auto
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java
 (added)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java
 Thu Apr 29 04:49:51 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.binding.rest.wireformat.xml.provider;
+
+import java.io.CharArrayReader;
+import java.io.CharArrayWriter;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+/**
+ * JSON wire format Interceptor.
+ * 
+ * @version $Rev$ $Date$
+*/
+public class XMLWireFormatInterceptor implements Interceptor {
+    private XMLInputFactory inputFactory;
+    
+    private Invoker next;
+
+    public XMLWireFormatInterceptor(ExtensionPointRegistry extensionPoints, 
RuntimeEndpoint endpoint) {
+        FactoryExtensionPoint factories = 
extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+        inputFactory = factories.getFactory(XMLInputFactory.class);
+    }
+    
+    public Invoker getNext() {
+        return next;
+    }
+
+    public void setNext(Invoker next) {
+        this.next = next;
+    }
+
+    public Message invoke(Message msg) {        
+        try {
+            if(msg.getBody() != null) {
+                Object[] args = msg.getBody();
+                CharArrayWriter data = (CharArrayWriter) args[0];
+                XMLStreamReader xmlPayload = 
inputFactory.createXMLStreamReader(new CharArrayReader(data.toCharArray()));
+                msg.setBody(new Object[]{xmlPayload});
+            }
+        } catch(Exception e) {
+            throw new RuntimeException("Unable to process xml paylod: " + 
msg.getBody().toString());
+        }
+        
+        return getNext().invoke(msg);
+    }
+
+}

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatInterceptor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java?rev=939194&view=auto
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java
 (added)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java
 Thu Apr 29 04:49:51 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.binding.rest.wireformat.xml.provider;
+
+import org.apache.tuscany.sca.binding.rest.wireformat.xml.XMLWireFormat;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.WireFormatProvider;
+import org.apache.tuscany.sca.provider.WireFormatProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+
+/**
+ * XML wire format Provider Factory.
+ * 
+ * @version $Rev$ $Date$
+*/
+public class XMLWireFormatProviderFctory implements 
WireFormatProviderFactory<XMLWireFormat>{
+    private ExtensionPointRegistry extensionPoints;
+
+    public XMLWireFormatProviderFctory(ExtensionPointRegistry extensionPoints) 
{
+        this.extensionPoints = extensionPoints;
+    }
+    public WireFormatProvider 
createReferenceWireFormatProvider(RuntimeEndpointReference endpointReference) {
+        return new XMLWireFormatReferenceProvider(extensionPoints, 
endpointReference);
+    }
+
+    public WireFormatProvider createServiceWireFormatProvider(RuntimeEndpoint 
endpoint) {
+        return new XMLWireFormatServiceProvider(extensionPoints, endpoint);
+    }
+
+    public Class<XMLWireFormat> getModelType() {
+        return XMLWireFormat.class;
+    }
+
+}

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatProviderFctory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java?rev=939194&view=auto
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java
 (added)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java
 Thu Apr 29 04:49:51 2010
@@ -0,0 +1,54 @@
+/*
+ * 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.binding.rest.wireformat.xml.provider;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.provider.WireFormatProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+
+/**
+ * XML wire format Reference Provider.
+ * 
+ * @version $Rev$ $Date$
+*/
+public class XMLWireFormatReferenceProvider implements WireFormatProvider {
+    private ExtensionPointRegistry extensionPoints;
+    private RuntimeEndpointReference endpointReference;
+
+    public XMLWireFormatReferenceProvider(ExtensionPointRegistry 
extensionPoints,RuntimeEndpointReference endpointReference ) {
+        this.extensionPoints = extensionPoints;
+        this.endpointReference = endpointReference;
+    }
+    public InterfaceContract 
configureWireFormatInterfaceContract(InterfaceContract interfaceContract) {
+        return null;
+    }
+
+    public Interceptor createInterceptor() {
+        return null;
+    }
+
+    public String getPhase() {
+        return Phase.REFERENCE_BINDING_WIREFORMAT;
+    }
+
+}

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatReferenceProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java?rev=939194&view=auto
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java
 (added)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java
 Thu Apr 29 04:49:51 2010
@@ -0,0 +1,110 @@
+/*
+ * 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.binding.rest.wireformat.xml.provider;
+
+import java.util.List;
+
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.binding.rest.wireformat.xml.XMLWireFormat;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.databinding.javabeans.SimpleJavaDataBinding;
+import org.apache.tuscany.sca.databinding.xml.XMLStringDataBinding;
+import org.apache.tuscany.sca.interfacedef.DataType;
+import org.apache.tuscany.sca.interfacedef.Interface;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.provider.WireFormatProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+/**
+ * XML wire format service provider.
+ * 
+ * @version $Rev$ $Date$
+*/
+public class XMLWireFormatServiceProvider implements WireFormatProvider {
+    private static final String DATABABINDING = 
XMLStreamReader.class.getName();
+    
+    private ExtensionPointRegistry extensionPoints;
+    private RuntimeEndpoint endpoint;
+    
+    private InterfaceContract serviceContract;
+    private Binding binding;
+    
+    public XMLWireFormatServiceProvider(ExtensionPointRegistry 
extensionPoints, RuntimeEndpoint endpoint) {
+        this.extensionPoints = extensionPoints;
+        this.endpoint = endpoint;
+        this.binding = endpoint.getBinding();
+    }
+    
+    public InterfaceContract 
configureWireFormatInterfaceContract(InterfaceContract interfaceContract) {
+        serviceContract = interfaceContract;
+        
+        //make XML databinding default
+        serviceContract.getInterface().resetDataBinding(DATABABINDING);
+        
+        //set XML databinding
+        setDataBinding(serviceContract.getInterface());
+
+        return serviceContract;
+    }
+
+    public Interceptor createInterceptor() {
+        if(binding.getRequestWireFormat() != null && 
binding.getRequestWireFormat() instanceof XMLWireFormat) {
+            return new XMLWireFormatInterceptor(extensionPoints, endpoint);
+        }
+        return null;
+    }
+
+    public String getPhase() {
+        return Phase.SERVICE_BINDING_WIREFORMAT;
+    }
+
+    
+    /**
+     * Utility method to reset data binding for the interface contract
+     * @param interfaze
+     */
+    @SuppressWarnings({"deprecation", "unchecked"})
+    private void setDataBinding(Interface interfaze) {
+        List<Operation> operations = interfaze.getOperations();
+        for (Operation operation : operations) {
+            operation.setDataBinding(DATABABINDING);
+            DataType<List<DataType>> inputType = operation.getInputType();
+            if (inputType != null) {
+                List<DataType> logical = inputType.getLogical();
+                for (DataType inArg : logical) {
+                    if 
(!SimpleJavaDataBinding.NAME.equals(inArg.getDataBinding())) {
+                        inArg.setDataBinding(DATABABINDING);
+                    } 
+                }
+            }
+            DataType outputType = operation.getOutputType();
+            if (outputType != null) {
+                if 
(!SimpleJavaDataBinding.NAME.equals(outputType.getDataBinding())) {
+                    outputType.setDataBinding(XMLStringDataBinding.NAME);
+                }
+            }
+        }
+    }
+}

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory?rev=939194&r1=939193&r2=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
 Thu Apr 29 04:49:51 2010
@@ -16,4 +16,5 @@
 # under the License. 
 
 # Implementation class for the wire format provider factory
-org.apache.tuscany.sca.binding.rest.wireformat.json.provider.JSONWireFormatProviderFctory;model=org.apache.tuscany.sca.binding.rest.wireformat.json.JSONWireFormat
\ No newline at end of file
+org.apache.tuscany.sca.binding.rest.wireformat.json.provider.JSONWireFormatProviderFctory;model=org.apache.tuscany.sca.binding.rest.wireformat.json.JSONWireFormat
+org.apache.tuscany.sca.binding.rest.wireformat.xml.provider.XMLWireFormatProviderFctory;model=org.apache.tuscany.sca.binding.rest.wireformat.xml.XMLWireFormat
\ No newline at end of file

Modified: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java?rev=939194&r1=939193&r2=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java
 Thu Apr 29 04:49:51 2010
@@ -31,8 +31,6 @@ import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import services.Catalog;
-
 import com.meterware.httpunit.GetMethodWebRequest;
 import com.meterware.httpunit.PostMethodWebRequest;
 import com.meterware.httpunit.WebConversation;
@@ -42,14 +40,13 @@ import com.meterware.httpunit.WebRespons
 public class CatalogServiceTestCase {
     private static final String SERVICE_URL = "http://localhost:8085/Catalog";;
 
-    private static final String GET_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.Item\"}]";
+    private static final String GET_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.store.Item\"}]";
     private static final String NEW_ITEM = 
"{\"price\":\"$4.35\",\"name\":\"Grape\"}\"";
-    private static final String GET_NEW_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.Item\"},{\"price\":\"$4.35\",\"name\":\"Grape\",\"javaClass\":\"services.Item\"}]";
+    private static final String GET_NEW_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$4.35\",\"name\":\"Grape\",\"javaClass\":\"services.store.Item\"}]";
     private static final String UPDATED_ITEM = 
"{\"price\":\"$1.35\",\"name\":\"Grape\"}\"";
-    private static final String GET_UPDATED_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.Item\"},{\"price\":\"$1.35\",\"name\":\"Grape\",\"javaClass\":\"services.Item\"}]";
    
+    private static final String GET_UPDATED_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.store.Item\"},{\"price\":\"$1.35\",\"name\":\"Grape\",\"javaClass\":\"services.store.Item\"}]";
    
     
     private static Node node;
-    private static Catalog catalogService;
 
     @BeforeClass
     public static void init() throws Exception {
@@ -57,9 +54,6 @@ public class CatalogServiceTestCase {
             String contribution = 
ContributionLocationHelper.getContributionLocation(CatalogServiceTestCase.class);
             node = NodeFactory.newInstance().createNode("store.composite", new 
Contribution("catalog", contribution));
             node.start();
-
-            catalogService = node.getService(Catalog.class, "Catalog");
-            Assert.assertNotNull(catalogService);
         } catch (Exception e) {
             e.printStackTrace();
         }

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/json/CatalogServiceTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java
 Thu Apr 29 04:49:51 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package org.apache.tuscany.sca.binding.rest.wireformat.json;
+package org.apache.tuscany.sca.binding.rest.wireformat.xml;
 
 import java.io.ByteArrayInputStream;
 import java.net.Socket;
@@ -31,35 +31,27 @@ import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import services.Catalog;
-
 import com.meterware.httpunit.GetMethodWebRequest;
 import com.meterware.httpunit.PostMethodWebRequest;
 import com.meterware.httpunit.WebConversation;
 import com.meterware.httpunit.WebRequest;
 import com.meterware.httpunit.WebResponse;
 
-public class CatalogServiceTestCase {
-    private static final String SERVICE_URL = "http://localhost:8085/Catalog";;
+public class CustomerServiceTestCase {
+    private static final String SERVICE_URL = "http://localhost:8085/Customer";;
 
-    private static final String GET_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.Item\"}]";
-    private static final String NEW_ITEM = 
"{\"price\":\"$4.35\",\"name\":\"Grape\"}\"";
-    private static final String GET_NEW_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.Item\"},{\"price\":\"$4.35\",\"name\":\"Grape\",\"javaClass\":\"services.Item\"}]";
-    private static final String UPDATED_ITEM = 
"{\"price\":\"$1.35\",\"name\":\"Grape\"}\"";
-    private static final String GET_UPDATED_RESPONSE = 
"[{\"price\":\"$1.55\",\"name\":\"Pear\",\"javaClass\":\"services.Item\"},{\"price\":\"$2.99\",\"name\":\"Apple\",\"javaClass\":\"services.Item\"},{\"price\":\"$3.55\",\"name\":\"Orange\",\"javaClass\":\"services.Item\"},{\"price\":\"$1.35\",\"name\":\"Grape\",\"javaClass\":\"services.Item\"}]";
    
+    private static final String GET_RESPONSE = "<?xml version=\"1.0\" 
encoding=\"UTF-8\"?><Customer xmlns:ns2=\"http://customer.services/\"; 
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; 
xsi:type=\"customer\"><email>[email protected]</email><id>John</id><name>John</name></Customer>";
+    private static final String UPDATED_ITEM = "<?xml version=\"1.0\" 
encoding=\"UTF-8\"?><Customer xmlns:ns2=\"http://customer.services/\"; 
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; 
xsi:type=\"customer\"><email>[email protected]</email><id>John</id><name>John</name></Customer>";
+    private static final String GET_UPDATED_RESPONSE = "<?xml version=\"1.0\" 
encoding=\"UTF-8\"?><Customer xmlns:ns2=\"http://customer.services/\"; 
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; 
xsi:type=\"customer\"><email>[email protected]</email><id>John</id><name>John</name></Customer>";
    
     
     private static Node node;
-    private static Catalog catalogService;
 
     @BeforeClass
     public static void init() throws Exception {
         try {
-            String contribution = 
ContributionLocationHelper.getContributionLocation(CatalogServiceTestCase.class);
-            node = NodeFactory.newInstance().createNode("store.composite", new 
Contribution("catalog", contribution));
+            String contribution = 
ContributionLocationHelper.getContributionLocation(CustomerServiceTestCase.class);
+            node = NodeFactory.newInstance().createNode("customer.composite", 
new Contribution("customer", contribution));
             node.start();
-
-            catalogService = node.getService(Catalog.class, "Catalog");
-            Assert.assertNotNull(catalogService);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -83,33 +75,16 @@ public class CatalogServiceTestCase {
         WebConversation wc = new WebConversation();
         WebRequest request = new GetMethodWebRequest(SERVICE_URL);
         WebResponse response = wc.getResource(request);
-
-        Assert.assertEquals(200, response.getResponseCode());
-        Assert.assertEquals(GET_RESPONSE, response.getText());
-    }
-
-
-    @Test
-    public void testPostInvocation() throws Exception {        
-        //Add new item to catalog
-        WebConversation wc = new WebConversation();
-        WebRequest request   = new PostMethodWebRequest(SERVICE_URL, new 
ByteArrayInputStream(NEW_ITEM.getBytes("UTF-8")),"application/json");
-        WebResponse response = wc.getResource(request);
-
-        Assert.assertEquals(200, response.getResponseCode());
-        
-        //read new results and expect to get new item back in the response
-        request = new GetMethodWebRequest(SERVICE_URL);
-        response = wc.getResource(request);
         
         //for debug purposes
-        //System.out.println(">>>" + GET_UPDATED_RESPONSE);
+        //System.out.println(">>>" + GET_RESPONSE);
         //System.out.println(">>>" + response.getText());
 
         Assert.assertEquals(200, response.getResponseCode());
-        Assert.assertEquals(GET_NEW_RESPONSE, response.getText());
+        Assert.assertEquals(GET_RESPONSE, response.getText());
     }
 
+
     @Test
     public void testPutInvocation() throws Exception {        
         //Add new item to catalog

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/Customer.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/Customer.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/Customer.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/Customer.java
 Thu Apr 29 04:49:51 2010
@@ -17,34 +17,54 @@
  * under the License.    
  */
 
-package services;
+package services.customer;
 
-public class Item {
+
+/**
+ * Customer data
+ */
+public class Customer {
+    private String id;
+    private String email;
     private String name;
-    private String price;
-    
-    public Item() {
+
+    public Customer() {
+        super();
     }
     
-    public Item(String name, String price) {
+    public Customer(String id, String name, String email) {
+        super();
+        this.id = id;
+        this.email = email;
         this.name = name;
-        this.price = price;
     }
-    
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
     public String getName() {
         return name;
     }
-    
+
     public void setName(String name) {
         this.name = name;
     }
-    
-    public String getPrice() {
-        return price;
-    }
-    
-    public void setPrice(String price) {
-        this.price = price;
+
+    public String toString() {
+        return "id: " + id + " name: " + name + " e-mail: " + email;
     }
 
 }

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerService.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerService.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerService.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerService.java
 Thu Apr 29 04:49:51 2010
@@ -17,8 +17,9 @@
  * under the License.    
  */
 
-package services;
+package services.customer;
 
+import javax.jws.WebResult;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
@@ -26,14 +27,15 @@ import javax.ws.rs.PUT;
 import org.oasisopen.sca.annotation.Remotable;
 
 @Remotable
-public interface Catalog {
+public interface CustomerService {
     
     @GET
-    Item[] get();
+    @WebResult(name = "Customer", targetNamespace = "")
+    Customer get();
     
     @POST
-    void addItem(Item item);
+    void addCustomer(Customer customer);
     
     @PUT
-    void updateItem(Item item);
+    void updateCustomer(Customer customer);
 }

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerServiceImpl.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerServiceImpl.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerServiceImpl.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/customer/CustomerServiceImpl.java
 Thu Apr 29 04:49:51 2010
@@ -17,34 +17,34 @@
  * under the License.    
  */
 
-package services;
+package services.customer;
 
-public class Item {
-    private String name;
-    private String price;
-    
-    public Item() {
-    }
-    
-    public Item(String name, String price) {
-        this.name = name;
-        this.price = price;
-    }
-    
-    public String getName() {
-        return name;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+...@scope("COMPOSITE")
+public class CustomerServiceImpl implements CustomerService {
+    private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+    @Init
+    public void init() {
+        customers.put("John", new Customer("John", "John", "[email protected]"));
     }
-    
-    public void setName(String name) {
-        this.name = name;
+
+    public Customer get() {
+        return customers.values().iterator().next();
     }
     
-    public String getPrice() {
-        return price;
+    public void addCustomer(Customer customer) {
+        customers.put(customer.getName(), customer);
     }
     
-    public void setPrice(String price) {
-        this.price = price;
+    public void updateCustomer(Customer customer) {
+        if(customers.get(customer.getName()) != null) {
+            customers.put(customer.getName(), customer);
+        }
     }
-
 }

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Catalog.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java
 Thu Apr 29 04:49:51 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package services;
+package services.store;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -25,6 +25,7 @@ import javax.ws.rs.PUT;
 
 import org.oasisopen.sca.annotation.Remotable;
 
+
 @Remotable
 public interface Catalog {
     

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverter.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverter.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverter.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java
 Thu Apr 29 04:49:51 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package services;
+package services.store;
 
 import org.oasisopen.sca.annotation.Remotable;
 

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverterImpl.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverterImpl.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/CurrencyConverterImpl.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java
 Thu Apr 29 04:49:51 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package services;
+package services.store;
 
 public class CurrencyConverterImpl implements CurrencyConverter {
     public double getConversion(String fromCurrencyCode, String 
toCurrencyCode, double amount) {

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/CurrencyConverterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/FruitsCatalogImpl.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/FruitsCatalogImpl.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/FruitsCatalogImpl.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java
 Thu Apr 29 04:49:51 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package services;
+package services.store;
 
 import java.util.HashMap;
 import java.util.Map;

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/Item.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java
 Thu Apr 29 04:49:51 2010
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package services;
+package services.store;
 
 public class Item {
     private String name;

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Item.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite
 (from r939193, 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite?p2=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite&p1=tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite&r1=939193&r2=939194&rev=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite
 Thu Apr 29 04:49:51 2010
@@ -19,23 +19,16 @@
 -->
 <composite     xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912";
                xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1";
-               targetNamespace="http://store";
-               name="store">
+               targetNamespace="http://customer";
+               name="customer">
                
-       <component name="Catalog">
-               <implementation.java class="services.FruitsCatalogImpl"/> 
-               <property name="currencyCode">USD</property>
-               <service name="Catalog">
-                       <tuscany:binding.rest 
uri="http://localhost:8085/Catalog";>
-                   <tuscany:wireFormat.json />
+       <component name="CustomerService">
+               <implementation.java 
class="services.customer.CustomerServiceImpl"/> 
+               <service name="CustomerService">
+                       <tuscany:binding.rest 
uri="http://localhost:8085/Customer";>
+                   <tuscany:wireFormat.xml />
                            <tuscany:operationSelector.jaxrs />
                </tuscany:binding.rest>
                </service>
-               <reference name="currencyConverter" 
target="CurrencyConverter"/>        
-       </component> 
-    
-       <component name="CurrencyConverter">
-               <implementation.java class="services.CurrencyConverterImpl"/>
-       </component>     
-
+       </component>
 </composite>

Modified: 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite?rev=939194&r1=939193&r2=939194&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/store.composite
 Thu Apr 29 04:49:51 2010
@@ -23,7 +23,7 @@
                name="store">
                
        <component name="Catalog">
-               <implementation.java class="services.FruitsCatalogImpl"/> 
+               <implementation.java class="services.store.FruitsCatalogImpl"/> 
                <property name="currencyCode">USD</property>
                <service name="Catalog">
                        <tuscany:binding.rest 
uri="http://localhost:8085/Catalog";>
@@ -35,7 +35,7 @@
        </component> 
     
        <component name="CurrencyConverter">
-               <implementation.java class="services.CurrencyConverterImpl"/>
+               <implementation.java 
class="services.store.CurrencyConverterImpl"/>
        </component>     
 
 </composite>


Reply via email to