Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.Service


   
    public void start() throws Exception
    {
        // Create an XFire Service
        ObjectServiceFactory serviceFactory = new ObjectServiceFactory();
        Service service = serviceFactory.create(Echo.class);
        service.setInvoker(new BeanInvoker(new EchoImpl()));
       
        // Register the service in the ServiceRegistry
        XFire xfire = XFireFactory.newInstance().getXFire();
        xfire.getServiceRegistry().register(service);
       
View Full Code Here


public class ConcatClientTest
    extends AbstractXFireAegisTest
{
    public void testDynamicClient() throws Exception
    {
        Service s = getServiceFactory().create(ConcatService.class);
        s.setInvoker(new BeanInvoker(new ConcatService()
        {
            public String concat(String s1, String s2)
            {
                return s1 + s2;
            }

            public String concat(String s1, String s2, String s3)
            {
                return s1 + s2 + s3;
            }

            public void noconcat(String s1, String s2)
            {
           
            }
        }));

        getServiceRegistry().register(s);

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        s.getWSDLWriter().write(bos);
        Client client = new Client(new ByteArrayInputStream(bos.toByteArray()), null);
        client.setXFire(getXFire());
        client.setUrl("xfire.local://ConcatService");
        client.setTransport(getTransportManager().getTransport(LocalTransport.BINDING_ID));
View Full Code Here

        type.setSchemaType(new QName("urn:ReallyNotSoSimpleBean", "SimpleBean"));

        // register the type
        tm.register(type);
       
        Service service = getServiceFactory().create(BeanService.class);

        getServiceRegistry().register(service);

        // END SNIPPET: types
       
View Full Code Here

public class JibxBindingTest
    extends AbstractXFireAegisTest
{
    public void testBinding() throws Exception
    {
        Service service = new JibxServiceFactory().create(AccountService.class, null, "http://xfire.codehaus.org/jibx", null);
        service.setInvoker(new BeanInvoker(new AccountServiceImpl()));
        getServiceRegistry().register(service);
       
        Document response = invokeService("AccountService", "/org/codehaus/xfire/jibx/getAccountStatus.xml");
        addNamespace("a", "http://xfire.codehaus.org/jibx");
        assertValid("//s:Body/a:getAccountStatusResponse/a:AccountInfo/a:amount[text()='0']", response);
View Full Code Here

{
    public void testEchoFault() throws Exception
    {
        JAXWSServiceFactory sf = new JAXWSServiceFactory(getTransportManager());
       
        Service service = sf.create(Echo.class);
        getServiceRegistry().register(service);
       
        Document res = invokeService(service.getSimpleName(), "echo.xml");
       
        addNamespace("x", "http://jaxws.xfire.codehaus.org");
        assertValid("//detail/x:EchoFault/x:someMessage", res);
    }
View Full Code Here

        types.add(TestValue.class.getName());
        types.add(TestBaseResponse.class.getName());
        types.add(TestSubResponse.class.getName());

        props.put("overrideTypesList", types);
        Service service = getServiceFactory().create(TestService.class, props);
        getServiceRegistry().register(service);

        Document wsdl = getWSDLDocument(service.getSimpleName());
        assertValid("//xsd:element[@name='testValue'][@type='tns:TestValue']", wsdl);
    }
View Full Code Here

public class JDOMDocumentTest extends AbstractXFireAegisTest
{
    public void testType() throws Exception
    {
        ((ObjectServiceFactory) getServiceFactory()).setStyle(SoapConstants.STYLE_DOCUMENT);
        Service service = getServiceFactory().create(Echo.class);
        getServiceRegistry().register(service);
       
        Document document = invokeService("Echo", "/org/codehaus/xfire/aegis/type/xml/test.xml");
        addNamespace("e", "urn:PrimitiveService");
        assertValid("//e:echoInt", document);
View Full Code Here

    public void setUp()
            throws Exception
    {
        super.setUp();
        Service endpoint = getServiceFactory().create(ListService.class);
        getServiceRegistry().register(endpoint);
    }
View Full Code Here

public class InterfaceImplTest
    extends AbstractXFireAegisTest
{
    public void testInterface() throws Exception
    {
        Service service = getServiceFactory().create(IMyService.class);
        service.setInvoker(new BeanInvoker(new MyService()));
        getServiceRegistry().register(service);
        service.setProperty(IMyObject.class.getName() + ".implementation", MyObject.class.getName());
       
        IMyService client = (IMyService)
            new XFireProxyFactory(getXFire()).create(service, "xfire.local://IMyService");
        MyObject o = new MyObject();
        o.setName("foo");
View Full Code Here

    public void setUp()
            throws Exception
    {
        super.setUp();
        Service endpoint = getServiceFactory().create(BeanCollectionInheritanceService.class);
        getServiceRegistry().register(endpoint);
    }
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.