diff options
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest')
-rw-r--r-- | sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java b/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java index 016f744598..77c7cc0cbe 100644 --- a/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java +++ b/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java @@ -42,20 +42,30 @@ public class MyMapper extends DefaultSCABindingMapper { @Override protected QName chooseBinding(RuntimeEndpoint endpoint) { - if (endpoint.getComponent().getName().endsWith("2")) { - return JSONPBinding.TYPE; - } else { - return super.defaultMappedBinding; + QName bindingType = super.chooseBinding(endpoint); + + if (!bindingType.equals(super.defaultLocalBinding)) { + if (endpoint.getComponent().getName().endsWith("2")) { + bindingType = JSONPBinding.TYPE; + } else { + bindingType = super.defaultMappedBinding; + } } + return bindingType; } @Override protected QName chooseBinding(RuntimeEndpointReference endpointReference) { - if (endpointReference.getBinding().getURI().contains("Service2")) { - return JSONPBinding.TYPE; - } else { - return super.defaultMappedBinding; + QName bindingType = super.chooseBinding(endpointReference); + + if (!bindingType.equals(super.defaultLocalBinding)) { + if (endpointReference.getBinding().getURI().contains("Service2")) { + bindingType = JSONPBinding.TYPE; + } else { + bindingType = super.defaultMappedBinding; + } } + return bindingType; } /* |