diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-08 12:14:40 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-08 12:14:40 +0000 |
commit | 2184b3c624b95520fd6ed4195742a2c5c4675395 (patch) | |
tree | a3c7edb20ccf76b59ce3626db11078e3af12c54b /branches/sca-java-1.x/modules/binding-ws-axis2 | |
parent | 932b59dfbb4797065ad91e06cce1440de1121034 (diff) |
Only create a transport description for the JMS transport if JMS is configured to be in use.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@751406 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-axis2')
2 files changed, 13 insertions, 2 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java index e82dd64ba5..e14213e60a 100644 --- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java +++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java @@ -328,6 +328,10 @@ public class Axis2ServiceProvider { jmsSender = new JMSSender(); ListenerManager listenerManager = configContext.getListenerManager(); TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS); + + if (trsIn == null){ + trsIn = new TransportInDescription(Constants.TRANSPORT_JMS); + } // get JMS transport parameters from the computed URL Map<String, String> jmsProps = JMSUtils.getProperties(endpointURL); @@ -482,6 +486,13 @@ public class Axis2ServiceProvider { Definition definition = wsBinding.getWSDLDocument(); QName serviceQName = wsBinding.getService().getQName(); Definition def = getDefinition(definition, serviceQName); + + // TUSCANY-2824 fix the target namespace of the definition to be the same as + // that for the port. Without this Axis fails during policy application + // when it tries to match binding operation names to port type operation + // names + //def.setTargetNamespace(port.getBinding().getPortType().getQName().getNamespaceURI()); + final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); builder.setServerSide(true); diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml b/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml index ea32836f2a..f75a2e8cdb 100644 --- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml +++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml @@ -201,7 +201,7 @@ </transportReceiver> <!-- Added by Tuscany --> - <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener"> + <!-- transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener"--> <!-- These configuation parameters now come from the binding.ws uri or from a policy set <parameter name="myTopicConnectionFactory"> @@ -222,7 +222,7 @@ <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter> </parameter> --> - </transportReceiver> + <!-- /transportReceiver--> <!-- ================================================= --> <!-- Non-blocking http/s Transport Listener --> |