Package org.apache.cxf.transport.jms.uri

Examples of org.apache.cxf.transport.jms.uri.JMSEndpoint


     */
    protected JMSEndpoint getExtensorsAndConfig(Bus bus,
                           EndpointInfo endpointInfo,
                           EndpointReferenceType target,
                           boolean isConduit) throws IOException {
        JMSEndpoint endpoint = null;
        String adr = target == null ? endpointInfo.getAddress() : target.getAddress().getValue();
        try {          
            endpoint = new JMSEndpoint(adr);
        } catch (RuntimeException ex) {
            throw ex;
        } catch (Exception e) {
            IOException e2 = new IOException(e.getMessage());
            e2.initCause(e);
View Full Code Here


    public JMSConfiguration createJMSConfigurationFromEndpointInfo(Bus bus,
                                                                   EndpointInfo endpointInfo,
                                                                   EndpointReferenceType target,
                                                                   boolean isConduit)
        throws IOException {
        JMSEndpoint endpoint = getExtensorsAndConfig(bus, endpointInfo, target, isConduit);

        return configureEndpoint(isConduit, endpoint);
    }
View Full Code Here

                headers = new TreeMap<String, List<String>>();
                inMessage.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
            }
            try {
                String requestURI = jmsMessage.getStringProperty(JMSSpecConstants.REQUESTURI_FIELD);
                JMSEndpoint endpoint = new JMSEndpoint(requestURI);
                if (endpoint.getParameter(JMSSpecConstants.TARGETSERVICE_PARAMETER_NAME) != null) {
                    headers.put(JMSSpecConstants.TARGET_SERVICE_IN_REQUESTURI,
                                Collections.singletonList("true"));
                }
            } catch (Exception e) {
                headers.put(JMSSpecConstants.MALFORMED_REQUESTURI, Collections.singletonList("true"));
View Full Code Here

    }
   
    @Test
    public void testReplyToConfig() throws Exception {
        JMSEndpoint endpoint = new JMSEndpoint();
        endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        endpoint.setJndiURL(broker.getBrokerURL());
        endpoint.setJndiConnectionFactoryName("ConnectionFactory");

        final JMSConfiguration jmsConfig = new JMSConfiguration();       
        JndiHelper jt = new JndiHelper(JMSOldConfigHolder.getInitialContextEnv(endpoint));
       
        JNDIConfiguration jndiConfig = new JNDIConfiguration();
        jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
        jmsConfig.setJndiTemplate(jt);
        jmsConfig.setJndiConfig(jndiConfig);
       
        TestReceiver receiver = new TestReceiver(jmsConfig.getConnectionFactory(),
                                                 "dynamicQueues/SoapService7.replyto.queue", false);
View Full Code Here

                if (headers == null) {
                    headers = new TreeMap<String, List<String>>();
                    inMessage.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
                }
                try {
                    JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(jmsMessage
                        .getStringProperty(JMSSpecConstants.REQUESTURI_FIELD));
                    if (endpoint.getParameter(JMSSpecConstants.TARGETSERVICE_PARAMETER_NAME) != null) {
                        headers.put(JMSSpecConstants.TARGET_SERVICE_IN_REQUESTURI, Collections
                            .singletonList("true"));
                    }
                } catch (Exception e) {
                    headers.put(JMSSpecConstants.MALFORMED_REQUESTURI, Collections.singletonList("true"));
View Full Code Here

                if (headers == null) {
                    headers = new TreeMap<String, List<String>>();
                    inMessage.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
                }
                try {
                    JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(jmsMessage
                        .getStringProperty(JMSSpecConstants.REQUESTURI_FIELD));
                    if (endpoint.getParameter(JMSSpecConstants.TARGETSERVICE_PARAMETER_NAME) != null) {
                        headers.put(JMSSpecConstants.TARGET_SERVICE_IN_REQUESTURI, Collections
                            .singletonList("true"));
                    }
                } catch (Exception e) {
                    headers.put(JMSSpecConstants.MALFORMED_REQUESTURI, Collections.singletonList("true"));
View Full Code Here

    }
   
    @Test
    public void testReplyToConfig() throws Exception {
        JMSEndpoint endpoint = new JMSEndpoint();
        endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        endpoint.setJndiURL("tcp://localhost:" + JMS_PORT);
        endpoint.setJndiConnectionFactoryName("ConnectionFactory");

        final JMSConfiguration jmsConfig = new JMSConfiguration();       
        JndiTemplate jt = new JndiTemplate();
       
        jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
       
        JNDIConfiguration jndiConfig = new JNDIConfiguration();
        jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
        jmsConfig.setJndiTemplate(jt);
        jmsConfig.setJndiConfig(jndiConfig);
       
        jmsConfig.setTargetDestination("dynamicQueues/SoapService7.replyto.queue");
        jmsConfig.setReplyDestination("dynamicQueues/SoapService7.reply.queue");
View Full Code Here

    }
   
    @Test
    public void testReplyToConfig() throws Exception {
        JMSEndpoint endpoint = new JMSEndpoint();
        endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        endpoint.setJndiURL(broker.getBrokerURL());
        endpoint.setJndiConnectionFactoryName("ConnectionFactory");

        final JMSConfiguration jmsConfig = new JMSConfiguration();       
        JndiTemplate jt = new JndiTemplate();
       
        jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
       
        JNDIConfiguration jndiConfig = new JNDIConfiguration();
        jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
        jmsConfig.setJndiTemplate(jt);
        jmsConfig.setJndiConfig(jndiConfig);
       
        jmsConfig.setTargetDestination("dynamicQueues/SoapService7.replyto.queue");
        jmsConfig.setReplyDestination("dynamicQueues/SoapService7.reply.queue");
View Full Code Here

                if (headers == null) {
                    headers = new HashMap<String, List<String>>();
                    inMessage.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
                }
                try {
                    JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(jmsMessage
                        .getStringProperty(JMSSpecConstants.REQUESTURI_FIELD));
                    if (endpoint.getParameter(JMSSpecConstants.TARGETSERVICE_PARAMETER_NAME) != null) {
                        headers.put(JMSSpecConstants.TARGET_SERVICE_IN_REQUESTURI, Collections
                            .singletonList("true"));
                    }
                } catch (Exception e) {
                    headers.put(JMSSpecConstants.MALFORMED_REQUESTURI, Collections.singletonList("true"));
View Full Code Here

     */
    private JMSEndpoint getExtensorsAndConfig(Bus bus,
                           EndpointInfo endpointInfo,
                           EndpointReferenceType target,
                           boolean isConduit) throws IOException {
        JMSEndpoint endpoint = null;
        String adr = target == null ? endpointInfo.getAddress() : target.getAddress().getValue();
        try {          
            endpoint = StringUtils.isEmpty(adr) || "jms://".equals(adr) || !adr.startsWith("jms")
                new JMSEndpoint()
                : JMSEndpointParser.createEndpoint(adr);               
        } catch (RuntimeException ex) {
            throw ex;
        } catch (Exception e) {
            IOException e2 = new IOException(e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.jms.uri.JMSEndpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.