Examples of OperationInfo


Examples of org.apache.tomcat.util.modeler.OperationInfo

            en=invokeAttMap.keys();
            while( en.hasMoreElements() ) {
                String name=(String)en.nextElement();
                Method m=(Method)invokeAttMap.get(name);
                if( m!=null && name != null ) {
                    OperationInfo op=new OperationInfo();
                    op.setName(name);
                    op.setReturnType(m.getReturnType().getName());
                    op.setDescription("Introspected operation " + name);
                    Class parms[]=m.getParameterTypes();
                    for(int i=0; i<parms.length; i++ ) {
                        ParameterInfo pi=new ParameterInfo();
                        pi.setType(parms[i].getName());
                        pi.setName( "param" + i);
                        pi.setDescription("Introspected parameter param" + i);
                        op.addParameter(pi);
                    }
                    mbean.addOperation(op);
                } else {
                    log.error("Null arg " + name + " " + m );
                }
View Full Code Here

Examples of org.apache.ws.util.OperationInfo

    {
        File outputFile;
        Iterator customOperations = props.getCustomMappings().values().iterator();
        while (customOperations.hasNext())
        {
            OperationInfo oparationInfo = (OperationInfo) customOperations.next();
            //need to determine if fault is instanceof BaseFault
            Iterator faultIterator = oparationInfo.getFaults().values().iterator();
            while (faultIterator.hasNext())
            {
                Fault fault = (Fault) faultIterator.next();
                Message message = fault.getMessage();
                Map parts = message.getParts();
View Full Code Here

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

Examples of org.codehaus.xfire.service.OperationInfo

        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

Examples of org.codehaus.xfire.service.OperationInfo

    }

    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

Examples of org.codehaus.xfire.service.OperationInfo

    {
        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

Examples of org.codehaus.xfire.service.OperationInfo

        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

Examples of org.codehaus.xfire.service.OperationInfo

        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

Examples of org.codehaus.xfire.service.OperationInfo

        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

Examples of org.codehaus.xfire.service.OperationInfo

    {
        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
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.