Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.OperationInfo


     
        ServiceBean serviceBean = (ServiceBean) getBean("ConcatService");
        assertEquals(2, serviceBean.getMethods().size());

        Service service = serviceBean.getXFireService();
        OperationInfo opInfo = service.getServiceInfo().getOperation("concat");
        assertNotNull(opInfo);
       
        assertEquals(2, opInfo.getInputMessage().size());

        MessagePartInfo part = opInfo.getInputMessage().getMessagePart(new QName("urn:concat-service", "s1"));
        assertNotNull(part);
       
        opInfo = service.getServiceInfo().getOperation("concatThreeStrings");
        assertNotNull(opInfo);
       
        part = opInfo.getInputMessage().getMessagePart(new QName("urn:test", "two"));
        assertNotNull(part);
       
        part = opInfo.getOutputMessage().getMessagePart(new QName("urn:test", "sum"));
        assertNotNull(part);
       
        opInfo = service.getServiceInfo().getOperation("excluded");
        assertNull(opInfo);
    }
View Full Code Here


//        HttpClientParams params = new HttpClientParams();
//        params.setParameter("http.protocol.version", HttpVersion.HTTP_1_1);
//        client.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS, params);
//    
        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] {root});
        assertNotNull(response);
        assertEquals(1, response.length);
       
        Element e = (Element) response[0];
View Full Code Here

       
        Transport transport = getTransportManager().getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");

        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Soap11Binding binding = (Soap11Binding) service.getBinding(SoapHttpTransport.SOAP11_HTTP_BINDING);
        binding.setSoapAction(op, "echoAction");
       
        Object[] response = client.invoke(op, new Object[] {root});
        assertNotNull(response);
View Full Code Here

        Transport transport = getTransportManager()
                .getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");

        OperationInfo op = service.getServiceInfo().getOperation("echo");
        try
        {
            Object[] response = client.invoke(op, new Object[] { root });
            fail("Invalid endpoint should not be invoked.");
        }
View Full Code Here

        getServiceRegistry().register(faultService);
       
        // Asynchronous service
        Service asyncService = osf.create(AsyncService.class);
        OperationInfo op = asyncService.getServiceInfo().getOperation("echo");
        op.setMEP(SoapConstants.MEP_IN);
        op.setOutputMessage(null);
        getServiceRegistry().register(asyncService);
    }
View Full Code Here

                new MessageBindingProvider())
        {

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

                new AddressingOperationInfo("http://example.org/action/echoIn",
                        "http://example.org/action/echoOut", op);
                return op;
            }
View Full Code Here

        assertEquals(new QName("urn:Echo", "Echo"), name);
       
        Collection operations = service.getServiceInfo().getOperations();
        assertEquals(1, operations.size());
       
        OperationInfo opInfo = (OperationInfo) operations.iterator().next();
        assertEquals("echo", opInfo.getName());
       
        // Check the input message
        MessageInfo message = opInfo.getInputMessage();
        assertNotNull(message);
       
        Collection parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
        MessagePartInfo part = (MessagePartInfo) parts.iterator().next();
        assertEquals(new QName("urn:Echo", "echoRequest"), part.getName());
       
        // Check the output message
        message = opInfo.getOutputMessage();
        assertNotNull(message);
       
        parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
        part = (MessagePartInfo) parts.iterator().next();
        assertEquals(new QName("urn:Echo", "echoResponse"), part.getName());
       
        // Is the SOAP binding stuff around?
        AbstractSoapBinding soapBinding = (AbstractSoapBinding) service.getBindings().iterator().next();
        assertNotNull(soapBinding);
        assertEquals("literal", soapBinding.getUse());
        assertEquals("", soapBinding.getSoapAction(opInfo));
       
        MessagePartContainer c = soapBinding.getHeaders(opInfo.getInputMessage());
        assertEquals(1, c.getMessageParts().size());
        part = c.getMessagePart(new QName("urn:Echo", "echoHeader"));
        assertNotNull(part);
       
        Collection endpoints = service.getEndpoints();
View Full Code Here

                new MessageBindingProvider())
        {

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

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

                return op;
View Full Code Here

        assertEquals(new QName("urn:Echo", "Echo"), name);
       
        Collection operations = service.getServiceInfo().getOperations();
        assertEquals(1, operations.size());
       
        OperationInfo opInfo = (OperationInfo) operations.iterator().next();
        assertEquals("echo", opInfo.getName());
       
        // Check the input message
        MessageInfo message = opInfo.getInputMessage();
        assertNotNull(message);
       
        Collection parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
        MessagePartInfo part = (MessagePartInfo) parts.iterator().next();
        assertEquals(new QName("urn:Echo", "echoRequest"), part.getName());
       
        // Check the output message
        message = opInfo.getOutputMessage();
        assertNotNull(message);
       
        parts = message.getMessageParts();
        assertEquals(1, parts.size());
       
View Full Code Here

        assertEquals(new QName("urn:Echo", "Echo"), name);
       
        Collection operations = service.getServiceInfo().getOperations();
        assertEquals(1, operations.size());
       
        OperationInfo opInfo = service.getServiceInfo().getOperation("echo");
       
        // Check the input message
        MessageInfo message = opInfo.getInputMessage();
        assertNotNull(message);
       
        Collection parts = message.getMessageParts();
        assertEquals(1, parts.size());
    }
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.