Search in sources :

Example 1 with HelloWrongAnnotation

use of org.apache.hello_world_soap_http.HelloWrongAnnotation in project cxf by apache.

the class EndpointImplTest method testSOAPBindingOnMethodWithRPC.

@Test
public void testSOAPBindingOnMethodWithRPC() {
    HelloWrongAnnotation hello = new HelloWrongAnnotation();
    JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
    serviceFactory.setBus(getBus());
    serviceFactory.setInvoker(new BeanInvoker(hello));
    serviceFactory.setServiceClass(HelloWrongAnnotation.class);
    try {
        new EndpointImpl(getBus(), hello, new JaxWsServerFactoryBean(serviceFactory)).close();
    } catch (Exception e) {
        String expeced = "Method [sayHi] processing error: SOAPBinding can not on method with RPC style";
        assertEquals(expeced, e.getMessage());
    }
}
Also used : JaxWsServiceFactoryBean(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean) BeanInvoker(org.apache.cxf.service.invoker.BeanInvoker) HelloWrongAnnotation(org.apache.hello_world_soap_http.HelloWrongAnnotation) BusException(org.apache.cxf.BusException) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

IOException (java.io.IOException)1 BusException (org.apache.cxf.BusException)1 JaxWsServiceFactoryBean (org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean)1 BeanInvoker (org.apache.cxf.service.invoker.BeanInvoker)1 HelloWrongAnnotation (org.apache.hello_world_soap_http.HelloWrongAnnotation)1 Test (org.junit.Test)1