Examples of JmsEndpoint


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

    }
   
    @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

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

                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

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 = 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

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

    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

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

                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

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

    }
   
    @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

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

                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

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

    }
   
    @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

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

                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

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

    @Test
    public void testUsernameAndPassword() throws Exception {
        setupServiceInfo("http://cxf.apache.org/hello_world_jms", "/wsdl/jms_test.wsdl",
                "HelloWorldService", "HelloWorldPort");
        JMSOldConfigHolder holder = new JMSOldConfigHolder();
        JMSEndpoint endpoint = holder.getExtensorsAndConfig(bus, endpointInfo, target, false);
        holder.configureEndpoint(false, endpoint);
        Assert.assertEquals("User name does not match." , "testUser", endpoint.getUsername());
        Assert.assertEquals("Password does not match." , "testPassword", endpoint.getPassword());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.