Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.ServiceInfo


    protected void setUp()
            throws Exception
    {
        htmlServiceWriter = new HtmlServiceWriter();
        ServiceInfo serviceInfo = new ServiceInfo(new QName("serviceport"), getClass());
        service = new Service(serviceInfo);
        service.setName(new QName("service"));
    }
View Full Code Here


    public void testCreateClass()
            throws Exception
    {
        Service endpoint = objectServiceFactory.create(Echo.class);
        assertNotNull(endpoint);
        ServiceInfo service = endpoint.getServiceInfo();
        assertEquals(new QName("http://binding.service.xfire.codehaus.org", "Echo"), endpoint.getName());
        assertTrue(endpoint.getFaultSerializer() instanceof SoapFaultSerializer);
       
        assertTrue(service.isWrapped());
       
        AbstractSoapBinding soapOp = (AbstractSoapBinding) endpoint.getBindings().iterator().next();
        assertEquals(SoapConstants.USE_LITERAL, soapOp.getUse());
    }
View Full Code Here

        Service endpoint = objectServiceFactory.create(Echo.class,
                                                       "EchoService",
                                                       "http://xfire.codehaus.org",
                                                       properties);
        assertNotNull(endpoint);
        ServiceInfo service = endpoint.getServiceInfo();
        assertEquals(new QName("http://xfire.codehaus.org", "EchoService"), endpoint.getName());
       
        AbstractSoapBinding binding = (AbstractSoapBinding) endpoint.getBindings().iterator().next();
        assertEquals(SoapConstants.STYLE_RPC, binding.getStyle());
        assertEquals(SoapConstants.USE_ENCODED, binding.getUse());
View Full Code Here

        Service endpoint = objectServiceFactory.create(Echo.class,
                                                       (String) null,
                                                       null,
                                                       properties);
        assertNotNull(endpoint);
        ServiceInfo service = endpoint.getServiceInfo();
        assertEquals(new QName("http://binding.service.xfire.codehaus.org", "Echo"), endpoint.getName());

        AbstractSoapBinding binding = (AbstractSoapBinding) endpoint.getBindings().iterator().next();
        assertEquals(SoapConstants.STYLE_RPC, binding.getStyle());
        assertEquals(SoapConstants.USE_ENCODED, binding.getUse());
View Full Code Here

        s12.add(LocalTransport.BINDING_ID);
        properties.put(ObjectServiceFactory.SOAP12_TRANSPORTS, s12);
       
        Service endpoint = objectServiceFactory.create(Echo.class, (String) null, null, properties);
        assertNotNull(endpoint);
        ServiceInfo service = endpoint.getServiceInfo();
        assertEquals(new QName("http://binding.service.xfire.codehaus.org", "Echo"), endpoint
                .getName());

        assertEquals(2, endpoint.getBindings().size());
    }
View Full Code Here

                return method.getParameterTypes()[j].equals(String.class);
            }
        };
       
        Service service = osf.create(HeaderService.class);
        ServiceInfo info = service.getServiceInfo();
       
        MessageInfo inMsg =info.getOperation("doSomething").getInputMessage();
        assertEquals(1, inMsg.getMessageParts().size());
       
        AbstractSoapBinding soapOp = (AbstractSoapBinding) service.getBindings().iterator().next();
        MessagePartInfo part = soapOp.getHeaders(inMsg).getMessagePart(new QName(service.getName().getNamespaceURI(), "header"));
        assertNotNull(part);
View Full Code Here

        TypeMapping tm = ((AegisBindingProvider) osf.getBindingProvider()).getTypeMapping(service);
       
        BeanType type = new BeanType();
        tm.register(SimpleBean.class, new QName("urn:Bean", "SimpleBean"), type);
       
        ServiceInfo info = service.getServiceInfo();
        OperationInfo o = info.getOperation("getSubmitBean");
        MessageInfo inMsg = o.getInputMessage();
        MessagePartInfo p = inMsg.getMessagePart(new QName("urn:Bean", "bean"));
        p.setSchemaType(type);
       
        o = info.getOperation("getSimpleBean");
        MessageInfo outMsg = o.getOutputMessage();
        p = outMsg.getMessagePart(new QName("urn:Bean", "getSimpleBeanout"));
        p.setSchemaType(type);
    }
View Full Code Here

        webAnnotationsControl.setDefaultReturnValue(Collections.EMPTY_LIST);

        webAnnotationsControl.replay();

        Service endpoint = annotationServiceFactory.create(EchoServiceImpl.class);
        ServiceInfo service = endpoint.getServiceInfo();
        assertEquals(new QName("http://xfire.codehaus.org/EchoService", "Echo"), endpoint.getName());
        assertEquals(new QName("http://xfire.codehaus.org/EchoService", "EchoPortType"),
                     service.getPortType());

        QName portName = (QName) endpoint.getProperty(ObjectServiceFactory.PORT_NAME);
        assertNotNull(portName);
        assertEquals("EchoPort", portName.getLocalPart());
       
View Full Code Here

        webAnnotationsControl.setDefaultReturnValue(Collections.EMPTY_LIST);
       
        webAnnotationsControl.replay();

        Service endpoint = annotationServiceFactory.create(EchoServiceImpl.class);
        ServiceInfo service = endpoint.getServiceInfo();
        assertEquals(new QName("http://xfire.codehaus.org/EchoService", "Echo"), endpoint.getName());

        final OperationInfo operation = service.getOperation("echo");
        assertNotNull(operation);

        Collection parts = operation.getInputMessage().getMessageParts();
        assertEquals(1, parts.size());
        assertEquals("input", ((MessagePartInfo) parts.iterator().next()).getName().getLocalPart());
View Full Code Here

        BeanType type = new BeanType();
        type.setTypeClass(SimpleBean.class);
        type.setSchemaType(new QName("urn:ReallyNotSoSimpleBean", "SimpleBean"));
        type.setTypeMapping(tm);
       
        ServiceInfo info = service.getServiceInfo();
        OperationInfo o = info.getOperation("getSubmitBean");
        MessageInfo inMsg = o.getInputMessage();
        MessagePartInfo p = inMsg.getMessagePart(new QName(service.getTargetNamespace(), "bean"));
        p.setSchemaType(type);
    }
View Full Code Here

TOP

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

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.