diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java b/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java index d0b79f9b0e..989a12d43c 100644 --- a/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java +++ b/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java @@ -76,15 +76,17 @@ public class WSDLDefinitionGenerator { private static final String PORT_SUFFIX = "Port"; private boolean requiresSOAP12; + private boolean requiresJMS; private QName soapAddress; private QName soapBinding; private QName soapBody; private QName soapFault; private QName soapOperation; - public WSDLDefinitionGenerator(boolean requiresSOAP12) { + public WSDLDefinitionGenerator(boolean requiresSOAP12, boolean requiresJMS) { super(); this.requiresSOAP12 = requiresSOAP12; + this.requiresJMS = requiresJMS; soapAddress = requiresSOAP12 ? SOAP12_ADDRESS : SOAP_ADDRESS; soapBinding = requiresSOAP12 ? SOAP12_BINDING : SOAP_BINDING; soapBody = requiresSOAP12 ? SOAP12_BODY : SOAP_BODY; @@ -114,10 +116,18 @@ public class WSDLDefinitionGenerator { definition.getExtensionRegistry().createExtension(Binding.class, soapBinding); if (requiresSOAP12) { ((SOAP12Binding)bindingExtension).setStyle("document"); - ((SOAP12Binding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http"); + if (requiresJMS){ + ((SOAP12Binding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/jms"); + } else { + ((SOAP12Binding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http"); + } } else { ((SOAPBinding)bindingExtension).setStyle("document"); - ((SOAPBinding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http"); + if (requiresJMS){ + ((SOAPBinding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/jms"); + } else { + ((SOAPBinding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http"); + } } binding.addExtensibilityElement(bindingExtension); return binding; @@ -126,6 +136,7 @@ public class WSDLDefinitionGenerator { } } + protected void configureBinding(Definition definition, Binding binding, PortType portType) throws WSDLException { QName portTypeName = portType.getQName(); if (portTypeName != null) { |