1 17 package org.apache.servicemix.jms; 18 19 import javax.wsdl.extensions.ExtensibilityElement; 20 import javax.wsdl.extensions.ExtensionRegistry; 21 22 import org.apache.servicemix.common.BaseComponent; 23 import org.apache.servicemix.common.Endpoint; 24 import org.apache.servicemix.common.wsdl1.AbstractWsdl1Deployer; 25 import org.apache.servicemix.common.wsdl1.JbiEndpoint; 26 import org.apache.servicemix.jms.wsdl.JmsAddress; 27 import org.apache.servicemix.jms.wsdl.JmsBinding; 28 import org.apache.servicemix.jms.wsdl.JmsExtension; 29 30 34 public class JmsWsdl1Deployer extends AbstractWsdl1Deployer { 35 36 public JmsWsdl1Deployer(BaseComponent component) { 37 super(component); 38 } 39 40 protected Endpoint createEndpoint(ExtensibilityElement portElement, 41 ExtensibilityElement bindingElement, 42 JbiEndpoint jbiEndpoint) { 43 if (jbiEndpoint == null) { 44 return null; 45 } 46 JmsEndpoint endpoint = new JmsEndpoint(); 47 endpoint.setRole(jbiEndpoint.getRole()); 48 endpoint.setDefaultMep(jbiEndpoint.getDefaultMep()); 49 endpoint.setDefaultOperation(jbiEndpoint.getDefaultOperation()); 50 endpoint.setDestinationStyle(((JmsAddress) portElement).getDestinationStyle()); 51 endpoint.setInitialContextFactory(((JmsAddress) portElement).getInitialContextFactory()); 52 endpoint.setJmsProviderDestinationName(((JmsAddress) portElement).getJmsProviderDestinationName()); 53 endpoint.setJndiConnectionFactoryName(((JmsAddress) portElement).getJndiConnectionFactoryName()); 54 endpoint.setJndiDestinationName(((JmsAddress) portElement).getJndiDestinationName()); 55 endpoint.setJndiProviderURL(((JmsAddress) portElement).getJndiProviderURL()); 56 return endpoint; 57 } 58 59 62 protected boolean filterPortElement(ExtensibilityElement element) { 63 return element instanceof JmsAddress; 64 } 65 66 69 protected boolean filterBindingElement(ExtensibilityElement element) { 70 return element instanceof JmsBinding; 71 } 72 73 76 protected void registerExtensions(ExtensionRegistry registry) { 77 super.registerExtensions(registry); 78 JmsExtension.register(registry); 79 } 80 81 } 82 | Popular Tags |