Examples of OperationInfo


Examples of org.codehaus.xfire.service.OperationInfo

        Service service = (Service) services.iterator().next();
        Collection operations = service.getServiceInfo().getOperations();
        assertEquals(1, operations.size());
       
        Iterator itr = operations.iterator();
        OperationInfo opInfo = (OperationInfo) itr.next();
        assertEquals("echo", opInfo.getName());
        assertEquals("urn:Echo:schema", opInfo.getInputMessage().getName().getNamespaceURI());
        assertEquals("urn:Echo:schema", opInfo.getOutputMessage().getName().getNamespaceURI());
       
        // Check the input message
        MessageInfo message = opInfo.getInputMessage();
        Collection parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
        MessagePartInfo part = (MessagePartInfo) parts.iterator().next();
        assertEquals(new QName("urn:Echo:schema", "text"), part.getName());
       
        // and now the output...
        message = opInfo.getOutputMessage();
        parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
        assertTrue(service.getServiceInfo().isWrapped());
       
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

       
        Iterator itr = operations.iterator();
         /*
          * The echo2 operation shouldn't be wrapped since it has attributes
          */
        OperationInfo opInfo = (OperationInfo) itr.next();
        assertEquals("echo2", opInfo.getName());
       
        // Check the input message
        MessageInfo message = opInfo.getInputMessage();
        List parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
        MessagePartInfo part = (MessagePartInfo) parts.iterator().next();
        assertEquals(new QName("urn:Echo", "echo2"), part.getName());
       
        // Check the output message
        message = opInfo.getOutputMessage();
        assertNotNull(message);
       
        parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

        ObjectServiceFactory factory = new ObjectServiceFactory(getXFire().getTransportManager(),
                new MessageBindingProvider())
        {
            protected OperationInfo addOperation(Service endpoint, Method method, String style)
            {
                OperationInfo op = super.addOperation(endpoint, method, style);

                new AddressingOperationInfo("http://example.com/Echo", op);

                return op;
            }
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

        root.addContent("hello");

        Client client = new Client(transport, service, "xfire.local://Echo", "xfire.local://Client");
        client.setXFire(getXFire());
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] {root});

        assertNotNull(response);
        assertEquals(1, response.length);
       
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

        root.addContent("hello");

        Client client = new Client(transport, service, "xfire.local://Echo");
        client.setXFire(getXFire());
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
        try
        {
            Object[] response = client.invoke(op, new Object[] {root});

            fail("Fault was not thrown!");
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

        ObjectServiceFactory factory = new ObjectServiceFactory(getXFire().getTransportManager(),
                                                                new MessageBindingProvider())
        {
            protected OperationInfo addOperation(Service endpoint, Method method, String style)
            {
                OperationInfo op = super.addOperation(endpoint, method, style);
               
                new AddressingOperationInfo("http://example.com/Echo", op);
               
                return op;
            }
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

        Service service = getServiceFactory().create(Messenger.class);
        getServiceRegistry().register(service);
       
        assertNotNull(service.getBindingProvider());
       
        OperationInfo info = service.getServiceInfo().getOperation("receive");
        assertEquals(1, info.getInputMessage().getMessageParts().size());
       
        invokeService("Messenger", "/org/codehaus/xfire/echo11.xml");
    }
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

                new MessageBindingProvider())
        {

            protected OperationInfo addOperation(Service endpoint, Method method, String use)
            {
                OperationInfo op = super.addOperation(endpoint, method, use);

                new AddressingOperationInfo("http://example.org/action/notify", op);

                return op;
            }
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

    public void testFaultInfo()
        throws Exception
    {
        Service service = objectServiceFactory.create(EchoWithFault.class);
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
       
        assertEquals(1, op.getFaults().size());
       
        FaultInfo info = op.getFault("EchoFault");
        assertNotNull(info);
       
        assertEquals(1, info.getMessageParts().size());
        MessagePartInfo mp = info.getMessagePart(new QName(service.getName().getNamespaceURI(),
                                                           "EchoFault"));
View Full Code Here

Examples of org.codehaus.xfire.service.OperationInfo

        osf.setStyle(SoapConstants.STYLE_MESSAGE);
       
        Service service = osf.create(HeaderService.class, "HeaderService", "urn:HeaderService", null);
        getXFire().getServiceRegistry().register(service);
       
        OperationInfo op = (OperationInfo) service.getServiceInfo().getOperations().iterator().next();
        assertEquals(2, op.getInputMessage().getMessageParts().size());
       
        Binding binding = (Binding) service.getBindings().iterator().next();
        assertEquals(1, binding.getHeaders(op.getInputMessage()).getMessageParts().size());
       
        Document response = invokeService("HeaderService", "header.xml");
        assertNotNull(HeaderService.a);
        assertEquals("a", HeaderService.a.getName());
        assertNotNull(HeaderService.b);
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.