summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x')
-rw-r--r--branches/sca-java-1.x/modules/binding-http-new-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/branches/sca-java-1.x/modules/binding-http-new-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 9d474e6d71..3a3428268c 100644
--- a/branches/sca-java-1.x/modules/binding-http-new-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
@@ -91,17 +91,23 @@ public class HTTPServiceBindingProvider implements ServiceBindingProviderRRB {
ProviderFactoryExtensionPoint providerFactories = extensionPoints.getExtensionPoint(ProviderFactoryExtensionPoint.class);
- // Configure the interceptors for operation selection
- OperationSelectorProviderFactory osProviderFactory = (OperationSelectorProviderFactory) providerFactories.getProviderFactory(binding.getOperationSelector().getClass());
- if (osProviderFactory != null) {
- this.osProvider = osProviderFactory.createServiceOperationSelectorProvider(component, service, binding);
+
+ if (binding.getOperationSelector() != null) {
+ // Configure the interceptors for operation selection
+ OperationSelectorProviderFactory osProviderFactory = (OperationSelectorProviderFactory) providerFactories.getProviderFactory(binding.getOperationSelector().getClass());
+ if (osProviderFactory != null) {
+ this.osProvider = osProviderFactory.createServiceOperationSelectorProvider(component, service, binding);
+ }
}
-
- // Configure the interceptors for wire format
- WireFormatProviderFactory wfProviderFactory = (WireFormatProviderFactory) providerFactories.getProviderFactory(binding.getRequestWireFormat().getClass());
- if (wfProviderFactory != null) {
- this.wfProvider = wfProviderFactory.createServiceWireFormatProvider(component, service, binding);
+
+ if (binding.getRequestWireFormat() != null && binding.getResponseWireFormat() != null) {
+ // Configure the interceptors for wire format
+ WireFormatProviderFactory wfProviderFactory = (WireFormatProviderFactory) providerFactories.getProviderFactory(binding.getRequestWireFormat().getClass());
+ if (wfProviderFactory != null) {
+ this.wfProvider = wfProviderFactory.createServiceWireFormatProvider(component, service, binding);
+ }
}
+
//clone the service contract to avoid databinding issues