Examples of AddressType


Examples of org.apache.cxf.binding.corba.wsdl.AddressType

            Definition model = generator.generateCORBABinding();               
            QName name = new QName("http://schemas.apache.org/idl/datetime.idl",
                                     "BaseCORBAService", "tns");
            Service service = model.getService(name);
            Port port = service.getPort("BaseCORBAPort");
            AddressType addressType = (AddressType)port.getExtensibilityElements().get(0);
            String address = addressType.getLocation();
            assertEquals("file:./Base.ref", address);           
           
            URL idl = getClass().getResource("/wsdl/addressfile.txt");
            String filename = new File(idl.toURI()).getAbsolutePath();
            generator.setAddressFile(filename);
            model = generator.generateCORBABinding();
            service = model.getService(name);
            port = service.getPort("BaseCORBAPort");
            addressType = (AddressType)port.getExtensibilityElements().get(0);
            address = addressType.getLocation();
            assertEquals("corbaloc::localhost:60000/hw", address);
        } finally {
            new File("datetime-corba.wsdl").deleteOnExit();
        }
    }   
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

        String response2 = new String("Bonjour");
        try {
            Greeter greeter = service.getPort(portName, Greeter.class);
            Client client = ClientProxy.getClient(greeter);
            EndpointInfo ei = client.getEndpoint().getEndpointInfo();
            AddressType address = ei.getTraversedExtensor(new AddressType(), AddressType.class);
            JMSNamingPropertyType name = new JMSNamingPropertyType();
            JMSNamingPropertyType password = new JMSNamingPropertyType();
            name.setName("java.naming.security.principal");
            name.setValue("ivan");
            password.setName("java.naming.security.credentials");
            password.setValue("the-terrible");
            address.getJMSNamingProperty().add(name);
            address.getJMSNamingProperty().add(password);
            for (int idx = 0; idx < 5; idx++) {

                greeter.greetMeOneWay("test String");
               
                String greeting = greeter.greetMe("Milestone-" + idx);
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

        p1.setName("java.naming.factory.initial");
        p1.setValue("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        JMSNamingPropertyType p2 = new JMSNamingPropertyType();
        p2.setName("java.naming.provider.url");
        p2.setValue("tcp://localhost:61500");
        final AddressType address = new AddressType();
        address.setJndiConnectionFactoryName("ConnectionFactory");
        List<JMSNamingPropertyType> props = address.getJMSNamingProperty();
        props.add(p1);
        props.add(p2);

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

Examples of org.apache.cxf.transport.jms.AddressType

            Client client = ClientProxy.getClient(greeter);
            client.getEndpoint().getOutInterceptors().add(new TibcoSoapActionInterceptor());
            client.getOutInterceptors().add(new LoggingOutInterceptor());
            client.getInInterceptors().add(new LoggingInInterceptor());
            EndpointInfo ei = client.getEndpoint().getEndpointInfo();
            AddressType address = ei.getTraversedExtensor(new AddressType(), AddressType.class);
            JMSNamingPropertyType name = new JMSNamingPropertyType();
            JMSNamingPropertyType password = new JMSNamingPropertyType();
            name.setName("java.naming.security.principal");
            name.setValue("ivan");
            password.setName("java.naming.security.credentials");
            password.setValue("the-terrible");
            address.getJMSNamingProperty().add(name);
            address.getJMSNamingProperty().add(password);
            for (int idx = 0; idx < 5; idx++) {

                greeter.greetMeOneWay("test String");
               
                String greeting = greeter.greetMe("Milestone-" + idx);
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

        try {
            Greeter greeter = service.getPort(portName, Greeter.class);
           
            Client client = ClientProxy.getClient(greeter);
            EndpointInfo ei = client.getEndpoint().getEndpointInfo();
            AddressType address = ei.getTraversedExtensor(new AddressType(), AddressType.class);
            JMSNamingPropertyType name = new JMSNamingPropertyType();
            JMSNamingPropertyType password = new JMSNamingPropertyType();
            name.setName("java.naming.security.principal");
            name.setValue("ivan");
            password.setName("java.naming.security.credentials");
            password.setValue("the-terrible");
            address.getJMSNamingProperty().add(name);
            address.getJMSNamingProperty().add(password);
            for (int idx = 0; idx < 5; idx++) {

                greeter.greetMeOneWay("test String");
               
                String greeting = greeter.greetMe("Milestone-" + idx);
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

        p1.setName("java.naming.factory.initial");
        p1.setValue("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        JMSNamingPropertyType p2 = new JMSNamingPropertyType();
        p2.setName("java.naming.provider.url");
        p2.setValue("tcp://localhost:" + JMS_PORT);
        final AddressType address = new AddressType();
        address.setJndiConnectionFactoryName("ConnectionFactory");
        List<JMSNamingPropertyType> props = address.getJMSNamingProperty();
        props.add(p1);
        props.add(p2);

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

Examples of org.apache.cxf.transport.jms.AddressType

import org.apache.cxf.transport.jms.JMSNamingPropertyType;
import org.apache.cxf.wsdl.AbstractWSDLPlugin;

public class JmsTransportPlugin extends AbstractWSDLPlugin {
    public ExtensibilityElement createExtension(Map<String, Object> args) throws WSDLException {
        AddressType jmsAddress = null;

        jmsAddress = (AddressType)registry.createExtension(Port.class, ToolConstants.JMS_ADDRESS);

        String destType = "queue";
        if (optionSet(args, ToolConstants.JMS_ADDR_DEST_STYLE)) {
            destType = getOption(args, ToolConstants.JMS_ADDR_DEST_STYLE);
        }
        jmsAddress.setDestinationStyle(DestinationStyleType.fromValue(destType));

        String finitValue = "org.apache.activemq.jndi.ActiveMQInitialContextFactory";
        JMSNamingPropertyType finit = new JMSNamingPropertyType();
        finit.setName("java.naming.factory.initial");
        if (optionSet(args, ToolConstants.JMS_ADDR_INIT_CTX)) {
            finitValue = getOption(args, ToolConstants.JMS_ADDR_INIT_CTX);
        }
        finit.setValue(finitValue);

        String providerURL = "tcp://localhost:61616";
        JMSNamingPropertyType provider = new JMSNamingPropertyType();
        provider.setName("java.naming.provider.url");
        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_URL)) {
            providerURL = getOption(args, ToolConstants.JMS_ADDR_JNDI_URL);
        }
        provider.setValue(providerURL);

        String destName = "dynamicQueues/test.cxf.jmstransport.queue";
        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_DEST)) {
            destName = getOption(args, ToolConstants.JMS_ADDR_JNDI_DEST);
        }
        jmsAddress.setJndiDestinationName(destName);

        String factory = "ConnectionFactory";
        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_FAC)) {
            factory = getOption(args, ToolConstants.JMS_ADDR_JNDI_FAC);
        }
        jmsAddress.setJndiConnectionFactoryName(factory);

        //         if (optionSet(args, ToolConstants.JMS_ADDR_MSGID_TO_CORRID)) {
        //             jmsAddress.setUseMessageIDAsCorrelationID(getOption(args,
        //                                                             ToolConstants.JMS_ADDR_MSGID_TO_CORRID,
        //                                                                 Boolean.class));
        //         }

        jmsAddress.getJMSNamingProperty().add(finit);
        jmsAddress.getJMSNamingProperty().add(provider);

        //         if (optionSet(args, ToolConstants.JMS_ADDR_SUBSCRIBER_NAME)) {
        //       jmsAddress.setDurableSubscriberName(getOption(args, ToolConstants.JMS_ADDR_SUBSCRIBER_NAME));
        //         }
        return jmsAddress;
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

            Greeter greeter = service.getPort(portName, Greeter.class);
           
            Client client = ClientProxy.getClient(greeter);
            client.getEndpoint().getOutInterceptors().add(new TibcoSoapActionInterceptor());
            EndpointInfo ei = client.getEndpoint().getEndpointInfo();
            AddressType address = ei.getTraversedExtensor(new AddressType(), AddressType.class);
            JMSNamingPropertyType name = new JMSNamingPropertyType();
            JMSNamingPropertyType password = new JMSNamingPropertyType();
            name.setName("java.naming.security.principal");
            name.setValue("ivan");
            password.setName("java.naming.security.credentials");
            password.setValue("the-terrible");
            address.getJMSNamingProperty().add(name);
            address.getJMSNamingProperty().add(password);
            for (int idx = 0; idx < 5; idx++) {

                greeter.greetMeOneWay("test String");
               
                String greeting = greeter.greetMe("Milestone-" + idx);
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

import org.apache.cxf.transport.jms.JMSNamingPropertyType;
import org.apache.cxf.wsdl.AbstractWSDLPlugin;

public class JmsTransportPlugin extends AbstractWSDLPlugin {
    public ExtensibilityElement createExtension(Map<String, Object> args) throws WSDLException {
        AddressType jmsAddress = null;

        jmsAddress = (AddressType)registry.createExtension(Port.class, ToolConstants.JMS_ADDRESS);

        String destType = "queue";
        if (optionSet(args, ToolConstants.JMS_ADDR_DEST_STYLE)) {
            destType = getOption(args, ToolConstants.JMS_ADDR_DEST_STYLE);
        }
        jmsAddress.setDestinationStyle(DestinationStyleType.fromValue(destType));

        String finitValue = "org.apache.activemq.jndi.ActiveMQInitialContextFactory";
        JMSNamingPropertyType finit = new JMSNamingPropertyType();
        finit.setName("java.naming.factory.initial");
        if (optionSet(args, ToolConstants.JMS_ADDR_INIT_CTX)) {
            finitValue = getOption(args, ToolConstants.JMS_ADDR_INIT_CTX);
        }
        finit.setValue(finitValue);

        String providerURL = "tcp://localhost:61616";
        JMSNamingPropertyType provider = new JMSNamingPropertyType();
        provider.setName("java.naming.provider.url");
        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_URL)) {
            providerURL = getOption(args, ToolConstants.JMS_ADDR_JNDI_URL);
        }
        provider.setValue(providerURL);

        String destName = "dynamicQueues/test.cxf.jmstransport.queue";
        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_DEST)) {
            destName = getOption(args, ToolConstants.JMS_ADDR_JNDI_DEST);
        }
        jmsAddress.setJndiDestinationName(destName);

        String factory = "ConnectionFactory";
        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_FAC)) {
            factory = getOption(args, ToolConstants.JMS_ADDR_JNDI_FAC);
        }
        jmsAddress.setJndiConnectionFactoryName(factory);

        //         if (optionSet(args, ToolConstants.JMS_ADDR_MSGID_TO_CORRID)) {
        //             jmsAddress.setUseMessageIDAsCorrelationID(getOption(args,
        //                                                             ToolConstants.JMS_ADDR_MSGID_TO_CORRID,
        //                                                                 Boolean.class));
        //         }

        jmsAddress.getJMSNamingProperty().add(finit);
        jmsAddress.getJMSNamingProperty().add(provider);

        //         if (optionSet(args, ToolConstants.JMS_ADDR_SUBSCRIBER_NAME)) {
        //       jmsAddress.setDurableSubscriberName(getOption(args, ToolConstants.JMS_ADDR_SUBSCRIBER_NAME));
        //         }
        return jmsAddress;
View Full Code Here

Examples of org.apache.cxf.transport.jms.AddressType

            }
            boolean found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof AddressType) {
                    AddressType jmsAddress = (AddressType)obj;
                    if (!(jmsAddress.getDestinationStyle() != null
                          && "queue".equalsIgnoreCase(jmsAddress.getDestinationStyle().toString()))) {
                        break;
                    }
                    if (!(jmsAddress.getJndiDestinationName() != null && jmsAddress.getJndiDestinationName()
                        .equals("dynamicQueues/test.cxf.jmstransport.queue"))) {
                        break;
                    }

                    assertEquals(2, jmsAddress.getJMSNamingProperty().size());
                    assertEquals("java.naming.factory.initial",
                                 jmsAddress.getJMSNamingProperty().get(0).getName());
                    assertEquals("tcp://localhost:91919",
                                 jmsAddress.getJMSNamingProperty().get(1).getValue());

                    found = true;
                    break;
                }
            }
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.