Package org.apache.cxf.binding.soap

Examples of org.apache.cxf.binding.soap.SoapBindingConfiguration


        bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBinding");
        assertNotNull(bean);
       
        BindingConfiguration bc = bean.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
        assertTrue(sbc.getVersion() instanceof Soap12);
    }
View Full Code Here


        bean = ctx.getBean("simpleWithBinding");
        assertNotNull(bean);
        ep = (EndpointImpl) bean;
        BindingConfiguration bc = ep.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
        assertTrue(sbc.getVersion() instanceof Soap12);
        assertTrue("the soap configure should set isMtomEnabled to be true",
                   sbc.isMtomEnabled());

        bean = ctx.getBean("implementorClass");
        assertNotNull(bean);
        ep = (EndpointImpl) bean;
        assertEquals(Hello.class, ep.getImplementorClass());
View Full Code Here

        ClassPathXmlApplicationContext ctx =
            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/servers.xml"});

        JaxWsServerFactoryBean bean;
        BindingConfiguration bc;
        SoapBindingConfiguration sbc;

        bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBindingRPC");
        assertNotNull(bean);

        bc = bean.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        sbc = (SoapBindingConfiguration) bc;
        assertEquals("rpc", sbc.getStyle());

        WSDLQueryHandler handler = new WSDLQueryHandler((Bus)ctx.getBean("cxf"));
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        handler.writeResponse("http://localhost/test?wsdl", "/test",
                              bean.create().getEndpoint().getEndpointInfo(),
                              bout);
        String wsdl = bout.toString();
        assertTrue(wsdl.contains("name=\"stringArray\""));
        assertTrue(wsdl.contains("name=\"stringArray\""));

        bean = (JaxWsServerFactoryBean) ctx.getBean("simple");
        assertNotNull(bean);

        bean = (JaxWsServerFactoryBean) ctx.getBean("inlineWsdlLocation");
        assertNotNull(bean);
        assertEquals(bean.getWsdlLocation(), "wsdl/hello_world_doc_lit.wsdl");

        bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBinding");
        assertNotNull(bean);

        bc = bean.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        sbc = (SoapBindingConfiguration) bc;
        assertTrue("Not soap version 1.2: " + sbc.getVersion(),  sbc.getVersion() instanceof Soap12);

        bean = (JaxWsServerFactoryBean) ctx.getBean("inlineDataBinding");

        boolean found = false;
        String[] names = ctx.getBeanNamesForType(SpringServerFactoryBean.class);
View Full Code Here

        factory = (JaxWsProxyFactoryBean)ctx.getBean("inlineSoapBinding.proxyFactory");
        assertNotNull(factory);

        BindingConfiguration bc = factory.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
        assertTrue(sbc.getVersion() instanceof Soap12);
        assertTrue("the soap configure should set isMtomEnabled to be true",
                   sbc.isMtomEnabled());
    }
View Full Code Here

        bean = (ServerFactoryBean) ctx.getBean("inlineSoapBinding");
        assertNotNull(bean);

        BindingConfiguration bc = bean.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
        assertTrue(sbc.getVersion() instanceof Soap12);

        bean = (ServerFactoryBean) ctx.getBean("simpleWithBindingId");
        assertEquals("get the wrong BindingId",
                     bean.getBindingId(),
                     "http://cxf.apache.org/bindings/xformat");
View Full Code Here

        assertNotNull(bean);

        ClientProxyFactoryBean cpfbean = (ClientProxyFactoryBean)bean;
        BindingConfiguration bc = cpfbean.getBindingConfig();
        assertTrue(bc instanceof SoapBindingConfiguration);
        SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
        assertTrue(sbc.getVersion() instanceof Soap12);

        HelloService greeter = (HelloService) ctx.getBean("client1");
        assertNotNull(greeter);

        Client client = ClientProxy.getClient(greeter);
View Full Code Here

        }
       
        try {
            if (binding.contains("/soap")) {
                if (bindingConfig == null) {
                    bindingConfig = new SoapBindingConfiguration();
                }
                if (bindingConfig instanceof SoapBindingConfiguration
                    && !((SoapBindingConfiguration)bindingConfig).isSetStyle()) {
                    ((SoapBindingConfiguration)bindingConfig).setStyle(serviceFactory.getStyle());
                }
View Full Code Here

        assertEquals("Got the wrong endpointName", endpointName, myEndpoint.getPortName());
        assertEquals("Got the wrong serviceName", serviceName, myEndpoint.getServiceName());
        assertEquals("loggingFeatureEnabled should be true", true, myEndpoint.isLoggingFeatureEnabled());
        assertEquals("loggingSizeLimit should be set", 200, myEndpoint.getLoggingSizeLimit());
        assertTrue("We should get a soap binding", myEndpoint.getBindingConfig() instanceof SoapBindingConfiguration);
        SoapBindingConfiguration configuration = (SoapBindingConfiguration)myEndpoint.getBindingConfig();
        assertEquals("We should get a right soap version", "1.2", String.valueOf(configuration.getVersion().getVersion()));
       
    }
View Full Code Here

        CxfEndpoint myEndpoint = (CxfEndpoint)ctx.getBean("myEndpoint");
        assertEquals("Got the wrong endpointName", endpointName, myEndpoint.getPortName());
        assertEquals("Got the wrong serviceName", serviceName, myEndpoint.getServiceName());
        assertTrue("We should get a soap binding", myEndpoint.getBindingConfig() instanceof SoapBindingConfiguration);
        SoapBindingConfiguration configuration = (SoapBindingConfiguration)myEndpoint.getBindingConfig();
        assertEquals("We should get a right soap version", "1.2", String.valueOf(configuration.getVersion().getVersion()));
       
    }
View Full Code Here

        }
        return WSDLConstants.SOAP11_NAMESPACE;
    }
   
    protected BindingConfiguration getBindingConfig() {
        SoapBindingConfiguration bindingConfig = new SoapBindingConfiguration();
        if (isSOAP12()) {
            bindingConfig.setVersion(Soap12.getInstance());
            bindingConfig.setTransportURI(WSDLConstants.SOAP12_HTTP_TRANSPORT);
        } else {
            bindingConfig.setVersion(Soap11.getInstance());
        }
        return bindingConfig;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.soap.SoapBindingConfiguration

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.