Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.OperationInfo


    public void testMapping()
    {
        String ns = "urn:AddNumbers";
        Service service = getServiceFactory().create(AddNumbers.class, "AddNumbers", ns, null);
       
        OperationInfo operation = service.getServiceInfo().getOperation("add");
       
        MessagePartInfo v1 = operation.getInputMessage().getMessagePart(new QName(ns, "value1"));
        assertNotNull(v1);
       
        MessagePartInfo v2 = operation.getInputMessage().getMessagePart(new QName(ns, "value2"));
        assertNotNull(v2);
       
        MessagePartInfo sum = operation.getOutputMessage().getMessagePart(new QName(ns, "sum"));
        assertNotNull(sum);
    }
View Full Code Here


        assertEquals("foo", client.makeCall2());
    }
   
    public void testService() throws Exception
    {
        OperationInfo operation = service.getServiceInfo().getOperation("makeCall");
       
        MessagePartInfo part = (MessagePartInfo) operation.getOutputMessage().getMessageParts().get(0);
        assertTrue(part.isSchemaElement());
        assertEquals("http://test.bt.com/2006/08/Service/Schema", part.getName().getNamespaceURI());
       
        Document res = invokeService("XFireNamespaceProblemService", "/org/codehaus/xfire/x582/callmessage.xml");
       
View Full Code Here

    }

    public void testServiceConstruction()
            throws Exception
    {
        OperationInfo operation = service.getServiceInfo().getOperation("echo");
       
        assertEquals(1, operation.getInputMessage().size());
        assertEquals(2, operation.getOutputMessage().size());
       
        Binding binding = service.getBinding(SoapHttpTransport.SOAP11_HTTP_BINDING);
        MessagePartContainer headers = binding.getHeaders(operation.getOutputMessage());
        assertEquals(1, headers.size());
       
        Document response =
                invokeService("MultipleOutService",
                              "/org/codehaus/xfire/inout/echo.xml");
View Full Code Here

    {
        JMSChannel serverChannel = (JMSChannel) getTransport().createChannel("jms://Echo");
        Client client = new Client(getTransport(), service, "jms://Echo", "jms://Peer1");

        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] {"hello"});

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

        factory = new ObjectServiceFactory(getTransportManager()) {

            protected OperationInfo addOperation(Service endpoint, Method method, String style)
            {
                OperationInfo op = super.addOperation(endpoint, method, style);
               
                new AddressingOperationInfo(op);
               
                return op;
            }
View Full Code Here

        sf.addSoap11Transport(XMPPTransport.BINDING_ID);
        Service serviceModel = sf.create(Echo.class);
        Client client = new Client(clientTrans, serviceModel, id + "/Echo");
        client.setTimeout(10000);
    
        OperationInfo op = serviceModel.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] {"hello"});

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

        factory = new ObjectServiceFactory(tm) {

            protected OperationInfo addOperation(Service endpoint, Method method, String style)
            {
                OperationInfo op = super.addOperation(endpoint, method, style);
               
                new AddressingOperationInfo(op);
               
                return op;
            }
        };
        factory.addSoap11Transport(XMPPTransport.BINDING_ID);
       
        Service serviceModel = factory.create(Echo.class);
       
        Client client = new Client(clientTrans, serviceModel, id + "/Echo");
        client.addInHandler(new AddressingInHandler());
        client.addOutHandler(new AddressingOutHandler());
        client.addFaultHandler(new AddressingInHandler());
       
        OperationInfo op = serviceModel.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] { "hello" });

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

    {
        Transport transport = getTransportManager().getTransport(LocalTransport.BINDING_ID);
        Client client = new Client(transport, service, "xfire.local://Echo");
        client.setXFire(getXFire());
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] {"hello"});
        assertNotNull("response from client invoke is null", response);
        assertEquals("unexpected array size in invoke response", 1, response.length);
       
        String resString = (String) response[0];
View Full Code Here

    {
        Transport transport = getTransportManager().getTransport(LocalTransport.BINDING_ID);
        Client client = new Client(transport, service, "xfire.log://Echo");
        client.setXFire(getXFire());

        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] { null });
        assertNotNull("response from client invoke is null", response);
        assertEquals("unexpected array size in invoke response", 1, response.length);
       
        assertNull(response[0]);
View Full Code Here

    {
        ServiceRegistry reg = (ServiceRegistry) getBean("xfire.serviceRegistry");
        assertTrue(reg.hasService("Echo"));
       
        Service service = reg.getService("Echo");
        OperationInfo operation = service.getServiceInfo().getOperation("echo");
        MessagePartInfo mp = (MessagePartInfo) operation.getInputMessage().getMessageParts().get(0);

        AegisBindingProvider bp = (AegisBindingProvider) getBean("xfire.aegisBindingProvider");
       
        TypeMapping dtypeMapping = bp.getTypeMappingRegistry().getDefaultTypeMapping();
View Full Code Here

TOP

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

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.