Package org.apache.axis.transport.local

Examples of org.apache.axis.transport.local.LocalTransport


        SimpleProvider config = new SimpleProvider(defaultConfig);
        config.deployService("outParamsTest", service);
        provider.deployService("outParamsTest", service);

        // Make sure the local transport uses the server we just configured
        client.setTransport(new LocalTransport(server));

  Message msg = new Message(message, false);
  SOAPEnvelope env = msg.getSOAPEnvelope();

  // test invocation. test Holder parameter defaults to INOUT type
View Full Code Here


        MessageContext context = new MessageContext(server);
        context.setRequestMessage(message);

        Call call = new Call(new Service());

        LocalTransport transport = new LocalTransport(server);
        transport.setRemoteService("testOmittedValue");

        call.setTransport(transport);

        SOAPEnvelope resEnv = call.invoke(message.getSOAPEnvelope());
        RPCElement rpcElem = (RPCElement)resEnv.getFirstBody();
View Full Code Here

        // correctly, even without the xsi:type attribute, because
        // we set the return type manually.
       
        Service S_service = new Service();
        Call call = (Call) S_service.createCall();
        call.setTransport(new LocalTransport(server));
        call.setReturnType(XMLType.XSD_DOUBLE);
       
        Object result = call.invoke("TestService",
                                    "serviceMethod",
                                    new Object [] {});
View Full Code Here

        // Set a property on the Call which we expect to be available via
        // the MessageContext in the client-side handler.
        call.setScopedProperty(PROP_NAME, CLIENT_VALUE);

        LocalTransport transport = new LocalTransport(server);
        transport.setRemoteService("service");
        call.setTransport(transport);

        // Make the call.
        String result = (String)call.invoke("service",
                                            "testScopedProperty",
View Full Code Here

    public void testMessageContextOverride() throws Exception {
        // Only the server side matters on this one, so don't bother with
        // special client config.
        Call call = new Call(new Service());

        LocalTransport transport = new LocalTransport(server);
        transport.setRemoteService("service");
        call.setTransport(transport);

        // Make the call.
        String result = (String)call.invoke("service",
                                            "testOverrideProperty",
View Full Code Here

        // Set a property on the Call which we expect to be available via
        // the MessageContext in the client-side handler.
        call.setScopedProperty(PROP_NAME, CLIENT_VALUE);

        LocalTransport transport = new LocalTransport(server);
        transport.setRemoteService("service");
        call.setTransport(transport);

        // First call should get the value from the Call object.
        call.invoke("testOverrideProperty", new Object [] { });
        assertEquals("Client-side scoped property from Call wasn't correct",
View Full Code Here

        // Set up the client side (using the WSDD above)
        Service svc = new Service(clientProvider);
        Call call = (Call)svc.createCall();
        svc.setMaintainSession(true);
        call.setTransport(new LocalTransport(server));

        // Try it - first invocation should return 1.
        Integer count = (Integer)call.invoke("sessionTest", "counter", null);
        assertNotNull("count was null!", count);
        assertEquals("count was wrong", 1, count.intValue());

        // We should have init()ed a single service object
        assertEquals("Wrong # of calls to init()!", 1, initCalls);

        // Next invocation should return 2, assuming the session-based
        // counter is working.
        count = (Integer)call.invoke("sessionTest", "counter", null);
        assertEquals("count was wrong", 2, count.intValue());

        // We should still have 1
        assertEquals("Wrong # of calls to init()!", 1, initCalls);

        // Now start fresh and confirm a new session
        Service svc2 = new Service(clientProvider);
        Call call2 = (Call)svc2.createCall();
        svc2.setMaintainSession(true);
        call2.setTransport(new LocalTransport(server));

        // New session should cause us to return 1 again.
        count = (Integer)call2.invoke("sessionTest", "counter", null);
        assertNotNull("count was null on third call!", count);
        assertEquals("New session count was incorrect", 1,
View Full Code Here

        public TestRunnable(int reps) {
            this.reps = reps;
        }

        public void run() {
            LocalTransport transport = new LocalTransport(server);
            transport.setRemoteService(SERVICE_NAME);
            Call call = new Call(new Service());
            call.setTransport(transport);

            for (int i = 0; i < reps; i++) {
                try {
View Full Code Here

        AdminClient client = new AdminClient();
        String doc = header + badHandler + footer;
        ByteArrayInputStream stream = new ByteArrayInputStream(doc.getBytes());
       
        LocalTransport transport = new LocalTransport(server);
        transport.setUrl("local:///AdminService");
        client.getCall().setTransport(transport);
        try {
            client.process(stream);
        } catch (Exception e) {
             return;
View Full Code Here

        Handler handler = server.getHandler("other");
        assertNotNull("Couldn't get handler", handler);

        AdminClient client = new AdminClient();
        Call call = client.getCall();
        LocalTransport transport = new LocalTransport(server);
        transport.setRemoteService("AdminService");

        call.setTransport(transport);
        client.process(new ByteArrayInputStream(undeployDoc.getBytes()));

        server.refreshGlobalOptions();
View Full Code Here

TOP

Related Classes of org.apache.axis.transport.local.LocalTransport

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.