summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 00:42:16 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 00:42:16 +0000
commitc556bbc37d8704b2e2b3dc3cd44835ad88a145bf (patch)
tree7bec108abef0a847357008e4ed94f8c406711f54 /branches/sca-java-1.x
parent5a64d330e22e261d3d6fe62cf74a1f158f20608b (diff)
TUSCANY-2968 - Fixing NPE with pure http binding
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@772022 13f79535-47bb-0310-9956-ffa450edef68
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