Examples of JaxWsImplementorInfo


Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

    @Override
    protected BindingInfo createBindingInfo() {
        JaxWsServiceFactoryBean sf = (JaxWsServiceFactoryBean)getServiceFactory();
       
        JaxWsImplementorInfo implInfo = sf.getJaxWsImplementorInfo();
        String jaxBid = implInfo.getBindingType();
        String binding = getBindingId();
        if (binding == null) {
            binding = jaxBid;
           
            if (binding.equals(SOAPBinding.SOAP11HTTP_BINDING)
                || binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)
                || binding.equals(SOAPBinding.SOAP12HTTP_BINDING)
                || binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) {
                binding = "http://schemas.xmlsoap.org/soap/";
               
                if (getBindingConfig() == null) {
                    setBindingConfig(new JaxWsSoapBindingConfiguration(sf));
                }
            }
           
            setBindingId(binding);
        }
        boolean messageMode = implInfo.getServiceMode().equals(javax.xml.ws.Service.Mode.MESSAGE);
       
        if (getBindingConfig() instanceof JaxWsSoapBindingConfiguration) {
            JaxWsSoapBindingConfiguration conf = (JaxWsSoapBindingConfiguration)getBindingConfig();
           
            if (jaxBid.equals(SOAPBinding.SOAP12HTTP_BINDING)) {
                conf.setVersion(Soap12.getInstance());
            }
           
            if (jaxBid.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) {
                conf.setVersion(Soap12.getInstance());
                conf.setMtomEnabled(true);
            }
           
            if (jaxBid.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)) {
                conf.setMtomEnabled(true);
            }
           
            conf.setJaxWsServiceFactoryBean(sf);
        }
       
        BindingInfo bindingInfo = super.createBindingInfo();
           
        // This disables a bunch of unwanted interceptors for the Provider scenario.
        // Not ideal, but it works.
        if (implInfo.isWebServiceProvider()) {
            bindingInfo.setProperty(AbstractBindingFactory.DATABINDING_DISABLED, Boolean.TRUE);
           
            if ((bindingInfo instanceof SoapBindingInfo)
                && messageMode
                && !implInfo.getProviderParameterType().equals(SOAPMessage.class)) {
                bindingInfo.setProperty(SoapBindingFactory.MESSAGE_PROCESSING_DISABLED, Boolean.TRUE);
            }
        }
           
        return bindingInfo;
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

                }
   
                // Initialize the endpointName so we can do configureObject
                QName origEpn = endpointName;
                if (endpointName == null) {
                    JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(getImplementorClass());
                    endpointName = implInfo.getEndpointName();
                }
               
                if (serviceFactory != null) {
                    serverFactory.setServiceFactory(serviceFactory);
                }
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

public class CodeFirstWSDLTest extends AbstractJaxWsTest {
    String address = "local://localhost:9000/Hello";
   
    private Definition createService(Class<?> clazz) throws Exception {
       
        JaxWsImplementorInfo info = new JaxWsImplementorInfo(clazz);
        ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean(info);

        Bus bus = getBus();
        bean.setBus(bus);
       
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

        assertEquals(5, portType.getOperations().size());
    }
    @Test
    public void testExcludeOnInterface() throws Exception {
        try {
            JaxWsImplementorInfo info = new JaxWsImplementorInfo(HelloExcludeImpl.class);
            ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean(info);

            Bus bus = getBus();
            bean.setBus(bus);
           
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

        BusFactory.setDefaultBus(null);
    }
   
    @org.junit.Test
    public void testForXmlList() throws Exception {
        JaxWsImplementorInfo implInfo =
            new JaxWsImplementorInfo(AddNumbersImpl.class);
        JaxWsServiceFactoryBean jaxwsFac = new JaxWsServiceFactoryBean(implInfo);
        jaxwsFac.setBus(BusFactory.getDefaultBus());
        Service service = jaxwsFac.create();
       
       
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

        if (server == null) {
            checkProperties();

            // Initialize the endpointName so we can do configureObject
            if (endpointName == null) {
                JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(getImplementorClass());
                endpointName = implInfo.getEndpointName();
            }
           
            if (serviceFactory != null) {
                serverFactory.setServiceFactory(serviceFactory);
            }
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

        BusFactory.setDefaultBus(null);
    }
   
    @org.junit.Test
    public void testForXmlList() throws Exception {
        JaxWsImplementorInfo implInfo =
            new JaxWsImplementorInfo(AddNumbersImpl.class);
        JaxWsServiceFactoryBean jaxwsFac = new JaxWsServiceFactoryBean(implInfo);
        jaxwsFac.setBus(BusFactory.getDefaultBus());
        Service service = jaxwsFac.create();
       
       
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

public class CodeFirstWSDLTest extends AbstractJaxWsTest {
    String address = "local://localhost:9000/Hello";
   
    private Definition createService(Class<?> clazz) throws Exception {
       
        JaxWsImplementorInfo info = new JaxWsImplementorInfo(clazz);
        ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean(info);

        Bus bus = getBus();
        bean.setBus(bus);
       
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

        assertEquals(4, portType.getOperations().size());
    }
    @Test
    public void testExcludeOnInterface() throws Exception {
        try {
            JaxWsImplementorInfo info = new JaxWsImplementorInfo(HelloExcludeImpl.class);
            ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean(info);

            Bus bus = getBus();
            bean.setBus(bus);
           
View Full Code Here

Examples of org.apache.cxf.jaxws.support.JaxWsImplementorInfo

                }
   
                // Initialize the endpointName so we can do configureObject
                QName origEpn = endpointName;
                if (endpointName == null) {
                    JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(getImplementorClass());
                    endpointName = implInfo.getEndpointName();
                }
               
                if (serviceFactory != null) {
                    serverFactory.setServiceFactory(serviceFactory);
                }
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.