Package org.apache.cxf.jaxws

Examples of org.apache.cxf.jaxws.ServiceImpl


        assertTrue(disp.getBinding() instanceof HTTPBinding);
    }

    @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
    // CXF-2822
    public void testInterceptorsConfiguration() throws Exception {
        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<? extends Message> interceptor : interceptors) {
            if (interceptor instanceof LoggingInInterceptor) {
View Full Code Here

        assertTrue("The LoggingInInterceptor is not configured to dispatch client", exists);
    }

    @Test
    public void testFindOperationWithSource() 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);
        disp.getRequestContext().put("find.dispatch.operation", Boolean.TRUE);
       
        d.setMessageObserver(new MessageReplayObserver("/org/apache/cxf/jaxws/sayHiResponse.xml"));
View Full Code Here

    }
    public URL getWSDLURL() {
        return getClass().getResource("/wsdl/hello_world.wsdl");
    }
    public Greeter createGreeter(EndpointReferenceType target) throws Exception {
        ServiceImpl serviceImpl =
            ServiceDelegateAccessor.get(new SOAPService(getWSDLURL(), SERVICE_NAME));
        Greeter g = serviceImpl.getPort(target, Greeter.class);
        updateAddressPort(g, getPort());
        return g;
    }
View Full Code Here

     * @param service the taraget service
     * @return the implementation delegate
     * @throws WebServiceException if access to the field fails for any reason
     */
    public static ServiceImpl get(Service service) {
        ServiceImpl delegate = null;
        try {
            Field delegateField = Service.class.getDeclaredField(DELEGATE_FIELD_NAME);
            ReflectionUtil.setAccessible(delegateField);
            delegate = (ServiceImpl)delegateField.get(service);
        } catch (Exception e) {
View Full Code Here

    }
    public URL getWSDLURL() {
        return getClass().getResource("/wsdl/hello_world.wsdl");
    }
    public Greeter createGreeter(EndpointReferenceType target) throws Exception {
        ServiceImpl serviceImpl =
            ServiceDelegateAccessor.get(new SOAPService(getWSDLURL(), SERVICE_NAME));
        Greeter g = serviceImpl.getPort(target, Greeter.class);
        updateAddressPort(g, getPort());
        return g;
    }
View Full Code Here

    }
   
    @Override
    public ServiceDelegate createServiceDelegate(URL url, QName qname,
                                                 @SuppressWarnings("rawtypes") Class cls) {
        return new ServiceImpl(null, url, qname, cls);
    }
View Full Code Here

        for (WebServiceFeature f : features) {
            if (!f.getClass().getName().startsWith("javax.xml.ws")) {
                throw new WebServiceException("Unknown feature error: " + f.getClass().getName());
            }
        }
        return new ServiceImpl(null, wsdlDocumentLocation,
                               serviceName, serviceClass, features);
       
    }
View Full Code Here

   
    @Override
    public ServiceDelegate createServiceDelegate(URL url, QName qname,
                                                 @SuppressWarnings("rawtypes") Class cls) {
        Bus bus = BusFactory.getThreadDefaultBus();
        return new ServiceImpl(bus, url, qname, cls);
    }
View Full Code Here

        for (WebServiceFeature f : features) {
            if (!f.getClass().getName().startsWith("javax.xml.ws")) {
                throw new WebServiceException("Unknown feature error: " + f.getClass().getName());
            }
        }
        return new ServiceImpl(bus, wsdlDocumentLocation,
                               serviceName, serviceClass, features);
       
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxws.ServiceImpl

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.