Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.Service


        assertEquals(String.class, mapType.getKeyType().getTypeClass());
    }

    public void testService() throws Exception
    {
        Service service = getServiceFactory().create(MapService.class, null, "urn:MapService", null);
        getServiceRegistry().register(service);

        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, MapServiceImpl.class);
       
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        MapService client = (MapService) factory.create(service, "xfire.local://MapService");

        // this fails when we do it... Woodstox bug?
View Full Code Here


    extends AbstractXFireAegisTest
{
    public void testWSDL()
        throws Exception
    {
        Service service = getServiceFactory().create(Echo.class,
                                                     new QName("urn:xfire:wsdl", "EchoService"),
                                                     getClass().getResource("echoDocLit.wsdl"),
                                                     null);
       
       
View Full Code Here

    }

    public void testRegister()
        throws Exception
    {
        Service service = getServiceRegistry().getService("Echo");
        assertNotNull(service);
        assertNotNull(service.getInHandlers());
        assertEquals(4, service.getInHandlers().size());
        assertNotNull(service.getOutHandlers());
        assertEquals(2, service.getOutHandlers().size());

        service = getServiceRegistry().getService("EchoXMLBeans");
        assertNotNull(service);

        assertTrue(getXFire().getInPhases().size() > 0);
View Full Code Here

        throws Exception
    {
        ObjectServiceFactory osf = (ObjectServiceFactory) getServiceFactory();
        DefaultWSDLBuilderFactory factory = (DefaultWSDLBuilderFactory) osf.getWsdlBuilderFactory();

        Service service = getServiceFactory().create(Echo.class);
        service.setInvoker(new BeanInvoker(new EchoImpl()));

        getServiceRegistry().register(service);
       
        List exts = new ArrayList();
        exts.add(new CustomExtension());
View Full Code Here

public class CollectionTest extends AbstractXFireAegisTest {

  public void testWSDL() throws Exception {
    JaxbServiceFactory sf = new JaxbServiceFactory();
   
    Service service = sf.create(CollectionServiceImpl.class, "CollectionService", null, null);
    getServiceRegistry().register(service);
   
    service.addOutHandler(new LoggingHandler());
    service.addOutHandler(new DOMOutHandler());
   
      Document d = getWSDLDocument("CollectionService");

      CollectionService client = (CollectionService)
        new XFireProxyFactory(getXFire()).create(service,
View Full Code Here

        callCount = 0;

        // Create using PicoObjectServiceFactory and put the Service into the
        // pico.
        ServiceFactory sf = getServiceFactory();
        Service ms = sf.create(DummyServiceThatCounts.class);
        ms.setName(new QName("test"));
        getPico().registerComponentInstance(ms);

        // Register XFireServiceRegisterVisitor and its dependency into the
        // pico.
        getPico().registerComponentInstance(ServiceRegistry.class, getXFire().getServiceRegistry());
View Full Code Here

        // Execute it 3 times.
        ServiceRegistry sr = (ServiceRegistry) getPico()
                .getComponentInstance(ServiceRegistry.class);
        assertNotNull(sr);

        Service endpoint = sr.getService("test");
        assertNotNull(endpoint);

        Invoker invoker = endpoint.getInvoker();
        assertNotNull(invoker);

        Method method = DummyServiceThatCounts.class.getMethod("theMethod", new Class[] {});
        assertNotNull(method);
View Full Code Here

        // Execute it 3 times.
        ServiceRegistry sr = (ServiceRegistry) getPico()
                .getComponentInstance(ServiceRegistry.class);
        assertNotNull(sr);

        Service endpoint = sr.getService("test");
        assertNotNull(endpoint);

        Invoker invoker = endpoint.getInvoker();
        assertNotNull(invoker);

        Method method = DummyServiceThatCounts.class.getMethod("theMethod", new Class[] {});
        assertNotNull(method);
View Full Code Here

       
        // Register the web service.
        XFire xfire = getXFire();
        ServiceFactory factory = new ObjectServiceFactory(xfire.getTransportManager(), null);
       
        Service service = factory.create(BookService.class);
        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, BookServiceImpl.class);
        xfire.getServiceRegistry().register(service);
    }
View Full Code Here

        xfire.getServiceRegistry().register(service);
    }
   
    public void testClient() throws Exception
    {
        Service serviceModel = getXFire().getServiceRegistry().getService("BookService");
        XFireProxyFactory serviceFactory = new XFireProxyFactory(getXFire());
       
        // Connect to web service.
        BookService service = (BookService) serviceFactory.create(serviceModel, "xfire.local://BookService");
        assertNotNull(service);
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.service.Service

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.