summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/LICENSE (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/LICENSE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/NOTICE (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/NOTICE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatProviderFactory.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatProviderFactory.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/bean/TestBean.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/bean/TestBean.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/Echo.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/Echo.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/LICENSE (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/LICENSE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/NOTICE (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/NOTICE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/pom.xml)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelector.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelector.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelectorFactory.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelectorFactory.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorFactoryImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorFactoryImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormat.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormat.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormatFactory.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormatFactory.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatFactoryImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatFactoryImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/LICENSE (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/LICENSE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/NOTICE (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/NOTICE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/pom.xml)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java)1032
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/util/HTTPHeadersParser.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/util/HTTPHeadersParser.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/content/test.html (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/content/test.html)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/test.composite (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/testCache.composite (renamed from branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/LICENSE (renamed from branches/sca-java-1.x/modules/binding-http-oasis/LICENSE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/NOTICE (renamed from branches/sca-java-1.x/modules/binding-http-oasis/NOTICE)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/pom.xml (renamed from branches/sca-java-1.x/modules/binding-http-oasis/pom.xml)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java)514
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPHeader.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPHeader.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor)0
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java (renamed from branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java)0
-rw-r--r--branches/sca-java-1.x/modules/pom.xml8
67 files changed, 777 insertions, 777 deletions
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/LICENSE b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/LICENSE
index 8aa906c321..8aa906c321 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/LICENSE
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/LICENSE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/NOTICE b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/NOTICE
index fdfa0e9faa..fdfa0e9faa 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/NOTICE
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/NOTICE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml
index fd862f918d..fd862f918d 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java
index 68152b0321..68152b0321 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatProviderFactory.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatProviderFactory.java
index 71ba4c913b..71ba4c913b 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatProviderFactory.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatProviderFactory.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java
index 5e1151dc95..5e1151dc95 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java
index 983e54c1a7..983e54c1a7 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
index 9b7d686ddd..9b7d686ddd 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.WireFormatProviderFactory
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/bean/TestBean.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/bean/TestBean.java
index 4b159fb563..4b159fb563 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/bean/TestBean.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/bean/TestBean.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/Echo.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/Echo.java
index ba87f22cf6..ba87f22cf6 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/Echo.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/Echo.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java
index bf8c7d2c8a..bf8c7d2c8a 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java
index 3e7b848221..3e7b848221 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java
index 6b59aae03e..6b59aae03e 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCDataTypeTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java
index b652f742b0..b652f742b0 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCExceptionTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java
index b9608115be..b9608115be 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
index 692918fa69..692918fa69 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/LICENSE b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/LICENSE
index 8aa906c321..8aa906c321 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/LICENSE
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/LICENSE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/NOTICE b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/NOTICE
index fdfa0e9faa..fdfa0e9faa 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/NOTICE
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/NOTICE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/pom.xml b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml
index 8841f56a86..8841f56a86 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/pom.xml
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelector.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelector.java
index 3a203312b2..3a203312b2 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelector.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelector.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelectorFactory.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelectorFactory.java
index 89e9924c5f..89e9924c5f 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelectorFactory.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/JSONRPCOperationSelectorFactory.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorFactoryImpl.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorFactoryImpl.java
index 807de0302f..807de0302f 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorFactoryImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorFactoryImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorImpl.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorImpl.java
index 475d4dc0a1..475d4dc0a1 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormat.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormat.java
index 749119b215..749119b215 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormat.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormat.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormatFactory.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormatFactory.java
index 2ae24142a4..2ae24142a4 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormatFactory.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCWireFormatFactory.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatFactoryImpl.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatFactoryImpl.java
index 21705736b0..21705736b0 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatFactoryImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatFactoryImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatImpl.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatImpl.java
index 2fdbfc3e52..2fdbfc3e52 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory
index 76203fbc11..76203fbc11 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory
index 3f72dd5a67..3f72dd5a67 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
index 17a340c06c..17a340c06c 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java
index f86f580cf6..f86f580cf6 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java
index 8d08f2a450..8d08f2a450 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/LICENSE b/branches/sca-java-1.x/modules/binding-http-new-runtime/LICENSE
index 8aa906c321..8aa906c321 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/LICENSE
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/LICENSE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/NOTICE b/branches/sca-java-1.x/modules/binding-http-new-runtime/NOTICE
index fdfa0e9faa..fdfa0e9faa 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/NOTICE
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/NOTICE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/pom.xml b/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml
index f2d66847ea..f2d66847ea 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/pom.xml
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java
index 41be041621..12f1143e3a 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java
@@ -1,516 +1,516 @@
-/*
- * 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.http.provider;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URLDecoder;
-import java.text.ParseException;
-import java.util.List;
-
-import javax.servlet.ServletException;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.http.HTTPCacheContext;
-import org.apache.tuscany.sca.binding.http.util.HTTPHeadersParser;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy;
-
-/**
- * Servlet responsible for dispatching HTTP requests to the
- * target component implementation.
- *
- * @version $Rev$ $Date$
- */
-public class HTTPBindingListenerServlet extends HttpServlet {
- private static final long serialVersionUID = 2865466417329430610L;
-
- private static final QName AUTEHTICATION_INTENT = new QName("http://www.osoa.org/xmlns/sca/1.0","authentication");
-
- transient private Binding binding;
-
- transient private boolean requiresAuthentication = false;
- transient private BasicAuthenticationPolicy basicAuthenticationPolicy = null;
-
- private MessageFactory messageFactory;
- private Invoker getInvoker;
- private Invoker conditionalGetInvoker;
- private Invoker putInvoker;
- private Invoker conditionalPutInvoker;
- private Invoker postInvoker;
- private Invoker conditionalPostInvoker;
- private Invoker deleteInvoker;
- private Invoker conditionalDeleteInvoker;
-
- /**
- * Constructs a new HTTPServiceListenerServlet.
- */
- public HTTPBindingListenerServlet(Binding binding, MessageFactory messageFactory) {
- this.binding = binding;
- this.messageFactory = messageFactory;
-
-
- // find out which policies are active
- if (binding instanceof PolicySetAttachPoint) {
- List<Intent> intents = ((PolicySetAttachPoint)binding).getRequiredIntents();
- for(Intent intent : intents) {
- if(intent.getName().equals(AUTEHTICATION_INTENT)) {
- requiresAuthentication = true;
- }
- }
-
-
- List<PolicySet> policySets = ((PolicySetAttachPoint)binding).getApplicablePolicySets();
- for (PolicySet ps : policySets) {
- for (Object p : ps.getPolicies()) {
- if (BasicAuthenticationPolicy.class.isInstance(p)) {
- basicAuthenticationPolicy = (BasicAuthenticationPolicy)p;
- } else {
- // etc. check for other types of policy being present
- }
- }
- }
- }
- }
-
-
- @Override
- protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-
- if(requiresAuthentication) {
- if(! hasAuthorization(request, response)) {
- response.setHeader("WWW-Authenticate", "BASIC realm=\"Tuscany\"");
- response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
- }
- }
-
- super.service(request, response);
- }
-
- @Override
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // Get the request path
- String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
- if (path.length() ==0) {
- // Redirect to a URL ending with / to make relative hrefs work
- // relative to the served resource.
- response.sendRedirect(request.getRequestURL().append('/').toString());
- return;
- }
-
- // Invoke the get operation on the service implementation
- Message requestMessage = messageFactory.createMessage();
-
- //store http headers to message
- requestMessage.getHeaders().addAll(HTTPHeadersParser.getHeaders(request));
-
- String id = path.substring(1);
-
- Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
- try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
- } catch (ParseException e) {
- }
-
- // Route message based on availability of cache info and cache methods
- if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalGetInvoker != null )) {
- requestMessage.setBody(new Object[] {id, cacheContext});
- responseMessage = conditionalGetInvoker.invoke(requestMessage);
- } else {
- requestMessage.setBody(new Object[] {id});
- responseMessage = getInvoker.invoke(requestMessage);
- }
- if (responseMessage.isFault()) {
- Object body = responseMessage.getBody();
-
- int index = -1;
- if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
- return;
- } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
- return;
- }
-
- throw new ServletException((Throwable)responseMessage.getBody());
- }
-
- // Write the response from the service implementation to the response
- // output stream
- InputStream is = (InputStream)responseMessage.getBody();
- OutputStream os = response.getOutputStream();
- byte[] buffer = new byte[2048];
- for (;;) {
- int n = is.read(buffer);
- if (n <= 0)
- break;
- os.write(buffer, 0, n);
- }
- os.flush();
- os.close();
- }
-
- @Override
- protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // Get the request path
- String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
- if (path.length() ==0) {
- // Redirect to a URL ending with / to make relative hrefs work
- // relative to the served resource.
- response.sendRedirect(request.getRequestURL().append('/').toString());
- return;
- }
-
- // Invoke the get operation on the service implementation
- Message requestMessage = messageFactory.createMessage();
- String id = path.substring(1);
-
- Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
- try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
- } catch (ParseException e) {
- }
-
- // Route message based on availability of cache info and cache methods
- if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalDeleteInvoker != null )) {
- requestMessage.setBody(new Object[] {id, cacheContext});
- responseMessage = conditionalDeleteInvoker.invoke(requestMessage);
- } else {
- requestMessage.setBody(new Object[] {id});
- responseMessage = deleteInvoker.invoke(requestMessage);
- }
- if (responseMessage.isFault()) {
- Object body = responseMessage.getBody();
-
- int index = -1;
- if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
- return;
- } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
- return;
- }
-
- throw new ServletException((Throwable)responseMessage.getBody());
- }
-
- // Write the response from the service implementation to the response
- // output stream
- InputStream is = (InputStream)responseMessage.getBody();
- OutputStream os = response.getOutputStream();
- byte[] buffer = new byte[2048];
- for (;;) {
- int n = is.read(buffer);
- if (n <= 0)
- break;
- os.write(buffer, 0, n);
- }
- os.flush();
- os.close();
- }
-
- @Override
- protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // Get the request path
- String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
- if (path.length() ==0) {
- // Redirect to a URL ending with / to make relative hrefs work
- // relative to the served resource.
- response.sendRedirect(request.getRequestURL().append('/').toString());
- return;
- }
-
- // Invoke the get operation on the service implementation
- Message requestMessage = messageFactory.createMessage();
- String id = path.substring(1);
-
- Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
- try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
- } catch (ParseException e) {
- }
-
- // Route message based on availability of cache info and cache methods
- if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalPutInvoker != null )) {
- requestMessage.setBody(new Object[] {id, cacheContext});
- responseMessage = conditionalPutInvoker.invoke(requestMessage);
- } else {
- requestMessage.setBody(new Object[] {id});
- responseMessage = putInvoker.invoke(requestMessage);
- }
- if (responseMessage.isFault()) {
- Object body = responseMessage.getBody();
-
- int index = -1;
- if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
- return;
- } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
- return;
- }
-
- throw new ServletException((Throwable)responseMessage.getBody());
- }
-
- // Write the response from the service implementation to the response
- // output stream
- InputStream is = (InputStream)responseMessage.getBody();
- OutputStream os = response.getOutputStream();
- byte[] buffer = new byte[2048];
- for (;;) {
- int n = is.read(buffer);
- if (n <= 0)
- break;
- os.write(buffer, 0, n);
- }
- os.flush();
- os.close();
- }
-
- @Override
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // Get the request path
- String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
- if (path.length() ==0) {
- // Redirect to a URL ending with / to make relative hrefs work
- // relative to the served resource.
- response.sendRedirect(request.getRequestURL().append('/').toString());
- return;
- }
-
- // Invoke the get operation on the service implementation
- Message requestMessage = messageFactory.createMessage();
- // String id = path.substring(1);
-
- Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
- try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
- } catch (ParseException e) {
- }
-
- // Route message based on availability of cache info and cache methods
- if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalPostInvoker != null )) {
- requestMessage.setBody(new Object[] {cacheContext});
- responseMessage = conditionalPostInvoker.invoke(requestMessage);
- } else {
- requestMessage.setBody(new Object[] {});
- responseMessage = postInvoker.invoke(requestMessage);
- }
- if (responseMessage.isFault()) {
- Object body = responseMessage.getBody();
-
- int index = -1;
- if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
- return;
- } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
- if ( index > -1 )
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
- else
- response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
- return;
- }
-
- throw new ServletException((Throwable)responseMessage.getBody());
- }
-
-
- // Test if the ETag and LastModified are returned as a cache context.
- Object body = responseMessage.getBody();
- if ( body.getClass() == HTTPCacheContext.class ) {
- // Transfer to header if so.
- HTTPCacheContext cc = (HTTPCacheContext)responseMessage.getBody();
- if (( cc != null ) && ( cc.isEnabled() )) {
- String eTag = cc.getETag();
- if ( eTag != null )
- response.setHeader( "ETag", cc.getETag() );
- String lastModified = cc.getLastModified();
- if ( lastModified != null)
- response.setHeader( "LastModified", cc.getLastModified() );
- }
- }
- }
-
- /**
- * @return the getInvoker
- */
- public Invoker getGetInvoker() {
- return getInvoker;
- }
-
- /**
- * @param getInvoker the getInvoker to set
- */
- public void setGetInvoker(Invoker getInvoker) {
- this.getInvoker = getInvoker;
- }
-
- /**
- * @return the conditionalGetInvoker
- */
- public Invoker getConditionalGetInvoker() {
- return conditionalGetInvoker;
- }
-
- /**
- * @param conditionalGetInvoker the conditionalGetInvoker to set
- */
- public void setConditionalGetInvoker(Invoker conditionalGetInvoker) {
- this.conditionalGetInvoker = conditionalGetInvoker;
- }
-
- /**
- * @return the putInvoker
- */
- public Invoker getPutInvoker() {
- return putInvoker;
- }
-
- /**
- * @param putInvoker the putInvoker to set
- */
- public void setPutInvoker(Invoker putInvoker) {
- this.putInvoker = putInvoker;
- }
-
- /**
- * @return the conditionalPutInvoker
- */
- public Invoker getConditionalPutInvoker() {
- return conditionalPutInvoker;
- }
-
- /**
- * @param conditionalPutInvoker the conditionalPutInvoker to set
- */
- public void setConditionalPutInvoker(Invoker conditionalPutInvoker) {
- this.conditionalPutInvoker = conditionalPutInvoker;
- }
-
- /**
- * @return the postInvoker
- */
- public Invoker getPostInvoker() {
- return postInvoker;
- }
-
- /**
- * @param postInvoker the postInvoker to set
- */
- public void setPostInvoker(Invoker postInvoker) {
- this.postInvoker = postInvoker;
- }
-
- /**
- * @return the conditionalPostInvoker
- */
- public Invoker getConditionalPostInvoker() {
- return conditionalPostInvoker;
- }
-
- /**
- * @param conditionalPostInvoker the conditionalPostInvoker to set
- */
- public void setConditionalPostInvoker(Invoker conditionalPostInvoker) {
- this.conditionalPostInvoker = conditionalPostInvoker;
- }
-
- /**
- * @return the deleteInvoker
- */
- public Invoker getDeleteInvoker() {
- return deleteInvoker;
- }
-
- /**
- * @param deleteInvoker the deleteInvoker to set
- */
- public void setDeleteInvoker(Invoker deleteInvoker) {
- this.deleteInvoker = deleteInvoker;
- }
-
- /**
- * @return the conditionalDeleteInvoker
- */
- public Invoker getConditionalDeleteInvoker() {
- return conditionalDeleteInvoker;
- }
-
- /**
- * @param conditionalDeleteInvoker the conditionalDeleteInvoker to set
- */
- public void setConditionalDeleteInvoker(Invoker conditionalDeleteInvoker) {
- this.conditionalDeleteInvoker = conditionalDeleteInvoker;
- }
-
-
- /**
- * Utility Methods related to Policy
- */
-
-
- private boolean hasAuthorization(HttpServletRequest request, ServletResponse response) {
- boolean result = false;
- if(request.getHeader("Authorization") != null) {
- result = true;
- }
-
- return result;
- }
-
-
-}
+/*
+ * 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.http.provider;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLDecoder;
+import java.text.ParseException;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.binding.http.HTTPCacheContext;
+import org.apache.tuscany.sca.binding.http.util.HTTPHeadersParser;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
+import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy;
+
+/**
+ * Servlet responsible for dispatching HTTP requests to the
+ * target component implementation.
+ *
+ * @version $Rev$ $Date$
+ */
+public class HTTPBindingListenerServlet extends HttpServlet {
+ private static final long serialVersionUID = 2865466417329430610L;
+
+ private static final QName AUTEHTICATION_INTENT = new QName("http://www.osoa.org/xmlns/sca/1.0","authentication");
+
+ transient private Binding binding;
+
+ transient private boolean requiresAuthentication = false;
+ transient private BasicAuthenticationPolicy basicAuthenticationPolicy = null;
+
+ private MessageFactory messageFactory;
+ private Invoker getInvoker;
+ private Invoker conditionalGetInvoker;
+ private Invoker putInvoker;
+ private Invoker conditionalPutInvoker;
+ private Invoker postInvoker;
+ private Invoker conditionalPostInvoker;
+ private Invoker deleteInvoker;
+ private Invoker conditionalDeleteInvoker;
+
+ /**
+ * Constructs a new HTTPServiceListenerServlet.
+ */
+ public HTTPBindingListenerServlet(Binding binding, MessageFactory messageFactory) {
+ this.binding = binding;
+ this.messageFactory = messageFactory;
+
+
+ // find out which policies are active
+ if (binding instanceof PolicySetAttachPoint) {
+ List<Intent> intents = ((PolicySetAttachPoint)binding).getRequiredIntents();
+ for(Intent intent : intents) {
+ if(intent.getName().equals(AUTEHTICATION_INTENT)) {
+ requiresAuthentication = true;
+ }
+ }
+
+
+ List<PolicySet> policySets = ((PolicySetAttachPoint)binding).getApplicablePolicySets();
+ for (PolicySet ps : policySets) {
+ for (Object p : ps.getPolicies()) {
+ if (BasicAuthenticationPolicy.class.isInstance(p)) {
+ basicAuthenticationPolicy = (BasicAuthenticationPolicy)p;
+ } else {
+ // etc. check for other types of policy being present
+ }
+ }
+ }
+ }
+ }
+
+
+ @Override
+ protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+ if(requiresAuthentication) {
+ if(! hasAuthorization(request, response)) {
+ response.setHeader("WWW-Authenticate", "BASIC realm=\"Tuscany\"");
+ response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+ }
+ }
+
+ super.service(request, response);
+ }
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // Get the request path
+ String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
+ if (path.length() ==0) {
+ // Redirect to a URL ending with / to make relative hrefs work
+ // relative to the served resource.
+ response.sendRedirect(request.getRequestURL().append('/').toString());
+ return;
+ }
+
+ // Invoke the get operation on the service implementation
+ Message requestMessage = messageFactory.createMessage();
+
+ //store http headers to message
+ requestMessage.getHeaders().addAll(HTTPHeadersParser.getHeaders(request));
+
+ String id = path.substring(1);
+
+ Message responseMessage = null;
+ HTTPCacheContext cacheContext = null;
+ try {
+ cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ } catch (ParseException e) {
+ }
+
+ // Route message based on availability of cache info and cache methods
+ if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalGetInvoker != null )) {
+ requestMessage.setBody(new Object[] {id, cacheContext});
+ responseMessage = conditionalGetInvoker.invoke(requestMessage);
+ } else {
+ requestMessage.setBody(new Object[] {id});
+ responseMessage = getInvoker.invoke(requestMessage);
+ }
+ if (responseMessage.isFault()) {
+ Object body = responseMessage.getBody();
+
+ int index = -1;
+ if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
+ return;
+ } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
+ return;
+ }
+
+ throw new ServletException((Throwable)responseMessage.getBody());
+ }
+
+ // Write the response from the service implementation to the response
+ // output stream
+ InputStream is = (InputStream)responseMessage.getBody();
+ OutputStream os = response.getOutputStream();
+ byte[] buffer = new byte[2048];
+ for (;;) {
+ int n = is.read(buffer);
+ if (n <= 0)
+ break;
+ os.write(buffer, 0, n);
+ }
+ os.flush();
+ os.close();
+ }
+
+ @Override
+ protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // Get the request path
+ String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
+ if (path.length() ==0) {
+ // Redirect to a URL ending with / to make relative hrefs work
+ // relative to the served resource.
+ response.sendRedirect(request.getRequestURL().append('/').toString());
+ return;
+ }
+
+ // Invoke the get operation on the service implementation
+ Message requestMessage = messageFactory.createMessage();
+ String id = path.substring(1);
+
+ Message responseMessage = null;
+ HTTPCacheContext cacheContext = null;
+ try {
+ cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ } catch (ParseException e) {
+ }
+
+ // Route message based on availability of cache info and cache methods
+ if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalDeleteInvoker != null )) {
+ requestMessage.setBody(new Object[] {id, cacheContext});
+ responseMessage = conditionalDeleteInvoker.invoke(requestMessage);
+ } else {
+ requestMessage.setBody(new Object[] {id});
+ responseMessage = deleteInvoker.invoke(requestMessage);
+ }
+ if (responseMessage.isFault()) {
+ Object body = responseMessage.getBody();
+
+ int index = -1;
+ if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
+ return;
+ } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
+ return;
+ }
+
+ throw new ServletException((Throwable)responseMessage.getBody());
+ }
+
+ // Write the response from the service implementation to the response
+ // output stream
+ InputStream is = (InputStream)responseMessage.getBody();
+ OutputStream os = response.getOutputStream();
+ byte[] buffer = new byte[2048];
+ for (;;) {
+ int n = is.read(buffer);
+ if (n <= 0)
+ break;
+ os.write(buffer, 0, n);
+ }
+ os.flush();
+ os.close();
+ }
+
+ @Override
+ protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // Get the request path
+ String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
+ if (path.length() ==0) {
+ // Redirect to a URL ending with / to make relative hrefs work
+ // relative to the served resource.
+ response.sendRedirect(request.getRequestURL().append('/').toString());
+ return;
+ }
+
+ // Invoke the get operation on the service implementation
+ Message requestMessage = messageFactory.createMessage();
+ String id = path.substring(1);
+
+ Message responseMessage = null;
+ HTTPCacheContext cacheContext = null;
+ try {
+ cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ } catch (ParseException e) {
+ }
+
+ // Route message based on availability of cache info and cache methods
+ if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalPutInvoker != null )) {
+ requestMessage.setBody(new Object[] {id, cacheContext});
+ responseMessage = conditionalPutInvoker.invoke(requestMessage);
+ } else {
+ requestMessage.setBody(new Object[] {id});
+ responseMessage = putInvoker.invoke(requestMessage);
+ }
+ if (responseMessage.isFault()) {
+ Object body = responseMessage.getBody();
+
+ int index = -1;
+ if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
+ return;
+ } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
+ return;
+ }
+
+ throw new ServletException((Throwable)responseMessage.getBody());
+ }
+
+ // Write the response from the service implementation to the response
+ // output stream
+ InputStream is = (InputStream)responseMessage.getBody();
+ OutputStream os = response.getOutputStream();
+ byte[] buffer = new byte[2048];
+ for (;;) {
+ int n = is.read(buffer);
+ if (n <= 0)
+ break;
+ os.write(buffer, 0, n);
+ }
+ os.flush();
+ os.close();
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // Get the request path
+ String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
+ if (path.length() ==0) {
+ // Redirect to a URL ending with / to make relative hrefs work
+ // relative to the served resource.
+ response.sendRedirect(request.getRequestURL().append('/').toString());
+ return;
+ }
+
+ // Invoke the get operation on the service implementation
+ Message requestMessage = messageFactory.createMessage();
+ // String id = path.substring(1);
+
+ Message responseMessage = null;
+ HTTPCacheContext cacheContext = null;
+ try {
+ cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ } catch (ParseException e) {
+ }
+
+ // Route message based on availability of cache info and cache methods
+ if (( cacheContext != null ) && (cacheContext.isEnabled()) && (conditionalPostInvoker != null )) {
+ requestMessage.setBody(new Object[] {cacheContext});
+ responseMessage = conditionalPostInvoker.invoke(requestMessage);
+ } else {
+ requestMessage.setBody(new Object[] {});
+ responseMessage = postInvoker.invoke(requestMessage);
+ }
+ if (responseMessage.isFault()) {
+ Object body = responseMessage.getBody();
+
+ int index = -1;
+ if ( -1 < (index = body.getClass().getName().indexOf( "NotModifiedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_NOT_MODIFIED );
+ return;
+ } else if ( -1 < (index = body.getClass().getName().indexOf( "PreconditionFailedException")) ) {
+ if ( index > -1 )
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED, body.toString().substring( index ));
+ else
+ response.sendError( HttpServletResponse.SC_PRECONDITION_FAILED );
+ return;
+ }
+
+ throw new ServletException((Throwable)responseMessage.getBody());
+ }
+
+
+ // Test if the ETag and LastModified are returned as a cache context.
+ Object body = responseMessage.getBody();
+ if ( body.getClass() == HTTPCacheContext.class ) {
+ // Transfer to header if so.
+ HTTPCacheContext cc = (HTTPCacheContext)responseMessage.getBody();
+ if (( cc != null ) && ( cc.isEnabled() )) {
+ String eTag = cc.getETag();
+ if ( eTag != null )
+ response.setHeader( "ETag", cc.getETag() );
+ String lastModified = cc.getLastModified();
+ if ( lastModified != null)
+ response.setHeader( "LastModified", cc.getLastModified() );
+ }
+ }
+ }
+
+ /**
+ * @return the getInvoker
+ */
+ public Invoker getGetInvoker() {
+ return getInvoker;
+ }
+
+ /**
+ * @param getInvoker the getInvoker to set
+ */
+ public void setGetInvoker(Invoker getInvoker) {
+ this.getInvoker = getInvoker;
+ }
+
+ /**
+ * @return the conditionalGetInvoker
+ */
+ public Invoker getConditionalGetInvoker() {
+ return conditionalGetInvoker;
+ }
+
+ /**
+ * @param conditionalGetInvoker the conditionalGetInvoker to set
+ */
+ public void setConditionalGetInvoker(Invoker conditionalGetInvoker) {
+ this.conditionalGetInvoker = conditionalGetInvoker;
+ }
+
+ /**
+ * @return the putInvoker
+ */
+ public Invoker getPutInvoker() {
+ return putInvoker;
+ }
+
+ /**
+ * @param putInvoker the putInvoker to set
+ */
+ public void setPutInvoker(Invoker putInvoker) {
+ this.putInvoker = putInvoker;
+ }
+
+ /**
+ * @return the conditionalPutInvoker
+ */
+ public Invoker getConditionalPutInvoker() {
+ return conditionalPutInvoker;
+ }
+
+ /**
+ * @param conditionalPutInvoker the conditionalPutInvoker to set
+ */
+ public void setConditionalPutInvoker(Invoker conditionalPutInvoker) {
+ this.conditionalPutInvoker = conditionalPutInvoker;
+ }
+
+ /**
+ * @return the postInvoker
+ */
+ public Invoker getPostInvoker() {
+ return postInvoker;
+ }
+
+ /**
+ * @param postInvoker the postInvoker to set
+ */
+ public void setPostInvoker(Invoker postInvoker) {
+ this.postInvoker = postInvoker;
+ }
+
+ /**
+ * @return the conditionalPostInvoker
+ */
+ public Invoker getConditionalPostInvoker() {
+ return conditionalPostInvoker;
+ }
+
+ /**
+ * @param conditionalPostInvoker the conditionalPostInvoker to set
+ */
+ public void setConditionalPostInvoker(Invoker conditionalPostInvoker) {
+ this.conditionalPostInvoker = conditionalPostInvoker;
+ }
+
+ /**
+ * @return the deleteInvoker
+ */
+ public Invoker getDeleteInvoker() {
+ return deleteInvoker;
+ }
+
+ /**
+ * @param deleteInvoker the deleteInvoker to set
+ */
+ public void setDeleteInvoker(Invoker deleteInvoker) {
+ this.deleteInvoker = deleteInvoker;
+ }
+
+ /**
+ * @return the conditionalDeleteInvoker
+ */
+ public Invoker getConditionalDeleteInvoker() {
+ return conditionalDeleteInvoker;
+ }
+
+ /**
+ * @param conditionalDeleteInvoker the conditionalDeleteInvoker to set
+ */
+ public void setConditionalDeleteInvoker(Invoker conditionalDeleteInvoker) {
+ this.conditionalDeleteInvoker = conditionalDeleteInvoker;
+ }
+
+
+ /**
+ * Utility Methods related to Policy
+ */
+
+
+ private boolean hasAuthorization(HttpServletRequest request, ServletResponse response) {
+ boolean result = false;
+ if(request.getHeader("Authorization") != null) {
+ result = true;
+ }
+
+ return result;
+ }
+
+
+}
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
index fccd10f3cd..fccd10f3cd 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
index e20d420d49..e20d420d49 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java
index 6e01ac5f9f..6e01ac5f9f 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java
index 493255655d..493255655d 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/util/HTTPHeadersParser.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/util/HTTPHeadersParser.java
index 1fe4600e31..1fe4600e31 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/java/org/apache/tuscany/sca/binding/http/util/HTTPHeadersParser.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/util/HTTPHeadersParser.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
index 0fa8d44c08..0fa8d44c08 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java
index bb5f6d5a8b..bb5f6d5a8b 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java
index e5cad080a6..e5cad080a6 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java
index 1d6efea2a1..1d6efea2a1 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java
index 5728899ebe..5728899ebe 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java
index f2456f3175..f2456f3175 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java
index 333bacbab3..333bacbab3 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java
index ed846c1127..ed846c1127 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java
index 11945c8cd1..11945c8cd1 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/content/test.html b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/content/test.html
index f4b79d7f01..f4b79d7f01 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/content/test.html
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/content/test.html
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/test.composite
index 62c4af4e22..62c4af4e22 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/test.composite
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/testCache.composite
index d805402c4f..d805402c4f 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite
+++ b/branches/sca-java-1.x/modules/binding-http-new-runtime/src/test/resources/testCache.composite
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/LICENSE b/branches/sca-java-1.x/modules/binding-http-new/LICENSE
index 8aa906c321..8aa906c321 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/LICENSE
+++ b/branches/sca-java-1.x/modules/binding-http-new/LICENSE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/NOTICE b/branches/sca-java-1.x/modules/binding-http-new/NOTICE
index fdfa0e9faa..fdfa0e9faa 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/NOTICE
+++ b/branches/sca-java-1.x/modules/binding-http-new/NOTICE
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/pom.xml b/branches/sca-java-1.x/modules/binding-http-new/pom.xml
index 4b067656b8..4b067656b8 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/pom.xml
+++ b/branches/sca-java-1.x/modules/binding-http-new/pom.xml
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java
index 7005385afb..7005385afb 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java
index e66896c68e..e66896c68e 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java
index 023423f0eb..fb9242c26c 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java
@@ -1,257 +1,257 @@
-/*
- * 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.http;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * A class to store cache settings for Atom and HTTP requests and responses.
- *
- * Predicates are statements that work in conjunction with
- * ETags and LastModified dates to determine if a precondition
- * or postcondition is satisfied.
- * See HTTP specification for how predicates wrk:
- * http://tools.ietf.org/html/rfc2616
- * Example predicates in HTTP include If-Match, If-None-Match,
- * If-Modified-Since, If-Unmodified-Since, If-Range.
-
- */
-public class HTTPCacheContext {
- public static final SimpleDateFormat RFC822DateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time
-
- public boolean enabled;
- public String eTag;
- public String lastModified;
- public Date lastModifiedDate;
- public boolean ifModifiedSince;
- public boolean ifUnmodifiedSince;
- public boolean ifMatch;
- public boolean ifNoneMatch;
- public boolean ifRange;
-
- /**
- * An ETag is a unique ID for an item. It changes when
- * a field in the item or the update date changes.
- * See HTTP specification for how ETags work:
- * http://tools.ietf.org/html/rfc2616
- * @return the eTag
- */
- public String getETag() {
- return eTag;
- }
- /**
- * @param tag the eTag to set
- */
- public void setETag(String tag) {
- eTag = tag;
- enabled = true;
- }
- /**
- * The LastModified date is the time the item was last
- * changed. See HTTP specification for how ETags work:
- * http://tools.ietf.org/html/rfc2616
- * @return the lastModified
- */
- public String getLastModified() {
- return lastModified;
- }
- /**
- * The LastModified date is the time the item was last
- * changed. See HTTP specification for how ETags work:
- * http://tools.ietf.org/html/rfc2616
- * @return the lastModified
- */
- public Date getLastModifiedAsDate() {
- return lastModifiedDate;
- }
- /**
- * @param lastModified the lastModified to set
- */
- public void setLastModified(String lastModified) throws java.text.ParseException {
- this.lastModified = lastModified;
- // Catch date formatting on input to help debugging.
- lastModifiedDate = RFC822DateFormat.parse( lastModified );
- enabled = true;
- }
-
- /**
- * @param lastModified the lastModified to set
- */
- public void setLastModified(Date updated) {
- this.lastModified = RFC822DateFormat.format( updated );
- lastModifiedDate = updated;
- enabled = true;
- }
-
- /**
- * @return the ifModifedSince
- */
- public boolean isIfModifiedSince() {
- return ifModifiedSince;
- }
- /**
- * @param ifModifedSince the ifModifedSince to set
- */
- public void setIfModifiedSince(boolean ifModifiedSince) {
- this.ifModifiedSince = ifModifiedSince;
- if ( ifModifiedSince )
- enabled = true;
- }
- /**
- * @return the ifUnModifiedSince
- */
- public boolean isIfUnmodifiedSince() {
- return ifUnmodifiedSince;
- }
- /**
- * @param ifUnModifiedSince the ifUnModifiedSince to set
- */
- public void setIfUnmodifiedSince(boolean ifUnmodifiedSince) {
- this.ifUnmodifiedSince = ifUnmodifiedSince;
- if ( ifUnmodifiedSince )
- enabled = true;
- }
- /**
- * @return the ifMatch
- */
- public boolean isIfMatch() {
- return ifMatch;
- }
- /**
- * @param ifMatch the ifMatch to set
- */
- public void setIfMatch(boolean ifMatch) {
- this.ifMatch = ifMatch;
- if ( ifMatch )
- enabled = true;
- }
- /**
- * @return the ifNoneMatch
- */
- public boolean isIfNoneMatch() {
- return ifNoneMatch;
- }
- /**
- * @param ifNoneMatch the ifNoneMatch to set
- */
- public void setIfNoneMatch(boolean ifNoneMatch) {
- this.ifNoneMatch = ifNoneMatch;
- if ( ifNoneMatch )
- enabled = true;
- }
- /**
- * @return the ifRange
- */
- public boolean isIfRange() {
- return ifRange;
- }
- /**
- * @param ifRange the ifRange to set
- */
- public void setIfRange(boolean ifRange) {
- this.ifRange = ifRange;
- if ( ifRange )
- enabled = true;
- }
-
- public String toString() {
- final String PREDPREFIX = ", predicates=";
- StringBuffer sb = new StringBuffer(PREDPREFIX);
- if ( ifMatch || ifNoneMatch || ifModifiedSince || ifUnmodifiedSince || ifRange ) {
- if ( ifMatch ) {
- if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
- sb.append("If-Match");
- }
- if ( ifNoneMatch ) {
- if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
- sb.append("If-None-Match");
- }
- if ( ifModifiedSince ) {
- if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
- sb.append("If-Modified-Since");
- }
- if ( ifUnmodifiedSince ) {
- if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
- sb.append("If-UnModified-Since");
- }
- if ( ifRange ) {
- if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
- sb.append("If-Range");
- }
- } else {
- sb.append("null");
- }
-
- return "eTag=" + eTag + ", lastModified=" + lastModified
- + sb.toString();
- }
-
- /**
- * Gets the cache context information (ETag, LastModified, predicates) from the Http request.
- * @param request
- * @return
- */
- public static HTTPCacheContext getCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException {
- HTTPCacheContext context = new HTTPCacheContext();
-
- String eTag = request.getHeader( "If-Match" );
- if ( eTag != null ) {
- context.setETag( eTag );
- context.setIfMatch( true );
- }
- eTag = request.getHeader( "If-None-Match" );
- if ( eTag != null ) {
- context.setETag( eTag );
- context.setIfNoneMatch( true );
- }
- String lastModifiedString = request.getHeader( "If-Modified-Since" );
- if ( lastModifiedString != null ) {
- context.setLastModified( lastModifiedString );
- context.setIfModifiedSince( true );
- }
- lastModifiedString = request.getHeader( "If-Unmodified-Since" );
- if ( lastModifiedString != null ) {
- context.setLastModified( lastModifiedString );
- context.setIfUnmodifiedSince( true );
- }
- lastModifiedString = request.getHeader( "If-Range" );
- if ( lastModifiedString != null ) {
- context.setLastModified( lastModifiedString );
- context.setIfRange( true );
- }
- return context;
- }
- /**
- * Enabled is true whenever ETag, LastModified, or predicate is set.
- * @return the enabled
- */
- public boolean isEnabled() {
- return enabled;
- }
- /**
- * @param enabled the enabled to set
- */
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-}
+/*
+ * 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.http;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * A class to store cache settings for Atom and HTTP requests and responses.
+ *
+ * Predicates are statements that work in conjunction with
+ * ETags and LastModified dates to determine if a precondition
+ * or postcondition is satisfied.
+ * See HTTP specification for how predicates wrk:
+ * http://tools.ietf.org/html/rfc2616
+ * Example predicates in HTTP include If-Match, If-None-Match,
+ * If-Modified-Since, If-Unmodified-Since, If-Range.
+
+ */
+public class HTTPCacheContext {
+ public static final SimpleDateFormat RFC822DateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time
+
+ public boolean enabled;
+ public String eTag;
+ public String lastModified;
+ public Date lastModifiedDate;
+ public boolean ifModifiedSince;
+ public boolean ifUnmodifiedSince;
+ public boolean ifMatch;
+ public boolean ifNoneMatch;
+ public boolean ifRange;
+
+ /**
+ * An ETag is a unique ID for an item. It changes when
+ * a field in the item or the update date changes.
+ * See HTTP specification for how ETags work:
+ * http://tools.ietf.org/html/rfc2616
+ * @return the eTag
+ */
+ public String getETag() {
+ return eTag;
+ }
+ /**
+ * @param tag the eTag to set
+ */
+ public void setETag(String tag) {
+ eTag = tag;
+ enabled = true;
+ }
+ /**
+ * The LastModified date is the time the item was last
+ * changed. See HTTP specification for how ETags work:
+ * http://tools.ietf.org/html/rfc2616
+ * @return the lastModified
+ */
+ public String getLastModified() {
+ return lastModified;
+ }
+ /**
+ * The LastModified date is the time the item was last
+ * changed. See HTTP specification for how ETags work:
+ * http://tools.ietf.org/html/rfc2616
+ * @return the lastModified
+ */
+ public Date getLastModifiedAsDate() {
+ return lastModifiedDate;
+ }
+ /**
+ * @param lastModified the lastModified to set
+ */
+ public void setLastModified(String lastModified) throws java.text.ParseException {
+ this.lastModified = lastModified;
+ // Catch date formatting on input to help debugging.
+ lastModifiedDate = RFC822DateFormat.parse( lastModified );
+ enabled = true;
+ }
+
+ /**
+ * @param lastModified the lastModified to set
+ */
+ public void setLastModified(Date updated) {
+ this.lastModified = RFC822DateFormat.format( updated );
+ lastModifiedDate = updated;
+ enabled = true;
+ }
+
+ /**
+ * @return the ifModifedSince
+ */
+ public boolean isIfModifiedSince() {
+ return ifModifiedSince;
+ }
+ /**
+ * @param ifModifedSince the ifModifedSince to set
+ */
+ public void setIfModifiedSince(boolean ifModifiedSince) {
+ this.ifModifiedSince = ifModifiedSince;
+ if ( ifModifiedSince )
+ enabled = true;
+ }
+ /**
+ * @return the ifUnModifiedSince
+ */
+ public boolean isIfUnmodifiedSince() {
+ return ifUnmodifiedSince;
+ }
+ /**
+ * @param ifUnModifiedSince the ifUnModifiedSince to set
+ */
+ public void setIfUnmodifiedSince(boolean ifUnmodifiedSince) {
+ this.ifUnmodifiedSince = ifUnmodifiedSince;
+ if ( ifUnmodifiedSince )
+ enabled = true;
+ }
+ /**
+ * @return the ifMatch
+ */
+ public boolean isIfMatch() {
+ return ifMatch;
+ }
+ /**
+ * @param ifMatch the ifMatch to set
+ */
+ public void setIfMatch(boolean ifMatch) {
+ this.ifMatch = ifMatch;
+ if ( ifMatch )
+ enabled = true;
+ }
+ /**
+ * @return the ifNoneMatch
+ */
+ public boolean isIfNoneMatch() {
+ return ifNoneMatch;
+ }
+ /**
+ * @param ifNoneMatch the ifNoneMatch to set
+ */
+ public void setIfNoneMatch(boolean ifNoneMatch) {
+ this.ifNoneMatch = ifNoneMatch;
+ if ( ifNoneMatch )
+ enabled = true;
+ }
+ /**
+ * @return the ifRange
+ */
+ public boolean isIfRange() {
+ return ifRange;
+ }
+ /**
+ * @param ifRange the ifRange to set
+ */
+ public void setIfRange(boolean ifRange) {
+ this.ifRange = ifRange;
+ if ( ifRange )
+ enabled = true;
+ }
+
+ public String toString() {
+ final String PREDPREFIX = ", predicates=";
+ StringBuffer sb = new StringBuffer(PREDPREFIX);
+ if ( ifMatch || ifNoneMatch || ifModifiedSince || ifUnmodifiedSince || ifRange ) {
+ if ( ifMatch ) {
+ if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+ sb.append("If-Match");
+ }
+ if ( ifNoneMatch ) {
+ if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+ sb.append("If-None-Match");
+ }
+ if ( ifModifiedSince ) {
+ if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+ sb.append("If-Modified-Since");
+ }
+ if ( ifUnmodifiedSince ) {
+ if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+ sb.append("If-UnModified-Since");
+ }
+ if ( ifRange ) {
+ if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+ sb.append("If-Range");
+ }
+ } else {
+ sb.append("null");
+ }
+
+ return "eTag=" + eTag + ", lastModified=" + lastModified
+ + sb.toString();
+ }
+
+ /**
+ * Gets the cache context information (ETag, LastModified, predicates) from the Http request.
+ * @param request
+ * @return
+ */
+ public static HTTPCacheContext getCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException {
+ HTTPCacheContext context = new HTTPCacheContext();
+
+ String eTag = request.getHeader( "If-Match" );
+ if ( eTag != null ) {
+ context.setETag( eTag );
+ context.setIfMatch( true );
+ }
+ eTag = request.getHeader( "If-None-Match" );
+ if ( eTag != null ) {
+ context.setETag( eTag );
+ context.setIfNoneMatch( true );
+ }
+ String lastModifiedString = request.getHeader( "If-Modified-Since" );
+ if ( lastModifiedString != null ) {
+ context.setLastModified( lastModifiedString );
+ context.setIfModifiedSince( true );
+ }
+ lastModifiedString = request.getHeader( "If-Unmodified-Since" );
+ if ( lastModifiedString != null ) {
+ context.setLastModified( lastModifiedString );
+ context.setIfUnmodifiedSince( true );
+ }
+ lastModifiedString = request.getHeader( "If-Range" );
+ if ( lastModifiedString != null ) {
+ context.setLastModified( lastModifiedString );
+ context.setIfRange( true );
+ }
+ return context;
+ }
+ /**
+ * Enabled is true whenever ETag, LastModified, or predicate is set.
+ * @return the enabled
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+ /**
+ * @param enabled the enabled to set
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPHeader.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPHeader.java
index 69e44cf35c..69e44cf35c 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/HTTPHeader.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/HTTPHeader.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java
index 678cd1a426..678cd1a426 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java
index 242f3c6d48..242f3c6d48 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
index 874c23c7e0..874c23c7e0 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory b/branches/sca-java-1.x/modules/binding-http-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory
index 44da6b166c..44da6b166c 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.x/modules/binding-http-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
index ac004e826a..ac004e826a 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java b/branches/sca-java-1.x/modules/binding-http-new/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java
index b19935c1e0..b19935c1e0 100644
--- a/branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-http-new/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java
diff --git a/branches/sca-java-1.x/modules/pom.xml b/branches/sca-java-1.x/modules/pom.xml
index 3c2da10829..e2d5ba723e 100644
--- a/branches/sca-java-1.x/modules/pom.xml
+++ b/branches/sca-java-1.x/modules/pom.xml
@@ -61,10 +61,10 @@
<module>binding-gdata-runtime</module>
<module>binding-http</module>
<module>binding-http-runtime</module>
- <module>binding-http-oasis</module>
- <module>binding-http-oasis-runtime</module>
- <module>binding-http-oasis-jsonrpc</module>
- <module>binding-http-oasis-jsonrpc-runtime</module>
+ <module>binding-http-new</module>
+ <module>binding-http-new-runtime</module>
+ <module>binding-http-new-jsonrpc</module>
+ <module>binding-http-new-jsonrpc-runtime</module>
<module>binding-jms</module>
<module>binding-jms-runtime</module>
<module>binding-jms-policy</module>