From 2184b3c624b95520fd6ed4195742a2c5c4675395 Mon Sep 17 00:00:00 2001 From: slaws Date: Sun, 8 Mar 2009 12:14:40 +0000 Subject: 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 --- .../tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java') 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 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); -- cgit v1.2.3