Package org.apache.cxf.jaxws

Examples of org.apache.cxf.jaxws.ServiceImpl.createDispatch()


    @Test
    public void testDOMSource() throws Exception {
        ServiceImpl service =
            new ServiceImpl(getBus(), getClass().getResource("/wsdl/hello_world.wsdl"), serviceName, null);

        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        disp.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);

        d.setMessageObserver(new MessageReplayObserver("/org/apache/cxf/jaxws/sayHiResponse.xml"));

        Document doc = DOMUtils.readXml(getResourceAsStream("/org/apache/cxf/jaxws/sayHi.xml"));
View Full Code Here


    @Test
    public void testHTTPBinding() throws Exception {
        ServiceImpl service = new ServiceImpl(getBus(), null, serviceName, null);
        service.addPort(portName, HTTPBinding.HTTP_BINDING, "local://foobar");
        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        assertTrue(disp.getBinding() instanceof HTTPBinding);
    }

    @Test
    public void testSOAPPBinding() throws Exception {
View Full Code Here

    @Test
    public void testSOAPPBinding() throws Exception {
        ServiceImpl service = new ServiceImpl(getBus(), null, serviceName, null);
        service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, "local://foobar");
        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        assertTrue(disp.getBinding() instanceof SOAPBinding);
    }

    @Test
    public void testSOAPPBindingNullMessage() throws Exception {
View Full Code Here

        String cfgFile = "org/apache/cxf/jaxws/dispatch/bus-dispatch.xml";
        Bus bus = new SpringBusFactory().createBus(cfgFile, true);
        ServiceImpl service = new ServiceImpl(bus, getClass().getResource("/wsdl/hello_world.wsdl"),
                                              serviceName, null);

        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        List<Interceptor<? extends Message>> interceptors = ((DispatchImpl)disp).getClient()
            .getInInterceptors();
        boolean exists = false;
        for (Interceptor interceptor : interceptors) {
            if (interceptor instanceof LoggingInInterceptor) {
View Full Code Here

            new ServiceImpl(getBus(),
                            getClass().getResource("/wsdl/hello_world.wsdl"),
                            serviceName,
                            null);
       
        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        disp.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);
       
        d.setMessageObserver(new MessageReplayObserver("/org/apache/cxf/jaxws/sayHiResponse.xml"));
       
        Document doc = DOMUtils.readXml(getResourceAsStream("/org/apache/cxf/jaxws/sayHi.xml"));
View Full Code Here

   
    @Test
    public void testHTTPBinding() throws Exception {
        ServiceImpl service = new ServiceImpl(getBus(), null, serviceName, null);  
        service.addPort(portName, HTTPBinding.HTTP_BINDING, "local://foobar");
        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        assertTrue(disp.getBinding() instanceof HTTPBinding);       
    }
   
    @Test
    public void testSOAPPBinding() throws Exception {
View Full Code Here

   
    @Test
    public void testSOAPPBinding() throws Exception {
        ServiceImpl service = new ServiceImpl(getBus(), null, serviceName, null);  
        service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, "local://foobar");
        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        assertTrue(disp.getBinding() instanceof SOAPBinding);       
    }
}
View Full Code Here

    @Test
    public void testResolveOperationWithSource() throws Exception {
        ServiceImpl service =
            new ServiceImpl(getBus(), getClass().getResource(wsdlResource), serviceName, null);

        Dispatch<Source> disp = service.createDispatch(
                portName, Source.class, Service.Mode.PAYLOAD);
        disp.getRequestContext().put(MessageContext.WSDL_OPERATION, operationName);
        disp.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);
       
        d.setMessageObserver(new MessageReplayObserver(responseResource));
View Full Code Here

    public void testResolveOperationWithSourceAndWSA() throws Exception {
        ServiceImpl service =
            new ServiceImpl(getBus(), getClass().getResource(wsdlResource),
                    serviceName, null, new AddressingFeature());

        Dispatch<Source> disp = service.createDispatch(
                portName, Source.class, Service.Mode.PAYLOAD);
        disp.getRequestContext().put(MessageContext.WSDL_OPERATION, operationName);
        disp.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);
       
        d.setMessageObserver(new MessageReplayObserver(responseResource));
View Full Code Here

    @Test
    public void testDOMSource() throws Exception {
        ServiceImpl service =
            new ServiceImpl(getBus(), getClass().getResource("/wsdl/hello_world.wsdl"), serviceName, null);

        Dispatch<Source> disp = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
        disp.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);

        d.setMessageObserver(new MessageReplayObserver("/org/apache/cxf/jaxws/sayHiResponse.xml"));

        Document doc = DOMUtils.readXml(getResourceAsStream("/org/apache/cxf/jaxws/sayHi2.xml"));
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.