diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-26 14:44:14 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-26 14:44:14 +0000 |
commit | e4359749c3a2a8e0f44668c53d505e3353a24a96 (patch) | |
tree | f524c0dcc7ee7aaeca0aceef63abd3dfae863741 /sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java | |
parent | 064aebf9108b61d667a2e99d93b3cd83b9c3d312 (diff) |
Pass security context into getURLMapping() so that appropriate scheme/port are chosen when no concrete url is provided by the binding.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@916695 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java index fc31bcaa50..74322706ad 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java @@ -118,8 +118,15 @@ public class Axis2ServiceBindingProvider extends Axis2BaseBindingProvider implem // of external policy attachment isRampartRequired = PolicyHelper.isIntentRequired(wsBinding, Constants.AUTHENTICATION_INTENT) || PolicyHelper.isIntentRequired(wsBinding, Constants.CONFIDENTIALITY_INTENT) || - PolicyHelper.isIntentRequired(wsBinding, Constants.INTEGRITY_INTENT); - + PolicyHelper.isIntentRequired(wsBinding, Constants.INTEGRITY_INTENT); + + + // Apply the configuration from any other policies + + for (PolicyProvider pp : endpoint.getPolicyProviders()) { + pp.configureBinding(this); + } + // Update port addresses with runtime information // We can safely assume there is only one port here because you configure // a binding in the following ways: @@ -138,22 +145,16 @@ public class Axis2ServiceBindingProvider extends Axis2BaseBindingProvider implem endpointURI = Axis2EngineIntegration.getPortAddress(wsdlPort); - if (!endpointURI.startsWith("jms:")) { + if (endpointURI.startsWith("jms:")) { + isJMSRequired = true; + } else { if (servletHost == null) { throw new ServiceRuntimeException("No Servlet host is avaible for HTTP web services"); } - endpointURI = servletHost.getURLMapping(endpointURI).toString(); - } else { - isJMSRequired = true; - } - Axis2EngineIntegration.setPortAddress(wsdlPort, endpointURI); + endpointURI = servletHost.getURLMapping(endpointURI, httpSecurityContext).toString(); + } - - // Apply the configuration from any other policies - - for (PolicyProvider pp : endpoint.getPolicyProviders()) { - pp.configureBinding(this); - } + Axis2EngineIntegration.setPortAddress(wsdlPort, endpointURI); // Apply the configuration from the mayProvides intents @@ -161,13 +162,13 @@ public class Axis2ServiceBindingProvider extends Axis2BaseBindingProvider implem // TODO - do we need to go back to configurator? } + if (isMTOMRequired) { + new Axis2MTOMPolicyProvider(endpoint).configureBinding(configContext); + } + if (isJMSRequired){ // TODO - do we need to go back to configurator? } - - if (isMTOMRequired) { - new Axis2MTOMPolicyProvider(endpoint).configureBinding(configContext); - } } private static final String DEFAULT_QUEUE_CONNECTION_FACTORY = "TuscanyQueueConnectionFactory"; |