Package org.apache.axis.client

Examples of org.apache.axis.client.Service


    }
  }

  public String simpleBuy(String serverURL, int quantity ) throws Exception {
    try {
      Service  service = new Service();
      Call     call    = (Call) service.createCall();

      call.setTargetEndpointAddress( new URL(serverURL) );
      call.setUseSOAPAction( true );
      call.setSOAPActionURI( "http://www.soapinterop.org/SimpleBuy" );
      call.setOperationName( new QName("http://www.soapinterop.org/Bid", "SimpleBuy") );
View Full Code Here


      throws Exception
  {
    try {
      int      i ;

      Service  service = new Service();
      Call     call    = (Call) service.createCall();

      call.setTargetEndpointAddress( new URL(serverURL) );
      call.setUseSOAPAction( true );
      call.setSOAPActionURI( "http://www.soapinterop.org/Buy" );
      call.setReturnType( XMLType.XSD_STRING );
View Full Code Here

        }

    }

    public void testVectorConversion() throws Exception {
        Call call = new Call(new Service());
        call.setTransport(transport);

        Vector v = new Vector();
        v.addElement("Hi there!");
        v.addElement("This'll be a SOAP Array and then a LinkedList!");
View Full Code Here

        Object ret = call.invoke(new Object[]{v});
        if (!equals(v, ret)) assertEquals("Echo LinkedList mangled the result.  Result is underneath.\n" + ret, v, ret);
    }

    public void testLinkedListConversion() throws Exception {
        Call call = new Call(new Service());
        call.setTransport(transport);

        LinkedList l = new LinkedList();
        l.add("Linked list item #1");
        l.add("Second linked list item");
View Full Code Here

        Object ret = call.invoke(new Object[]{l});
        if (!equals(l, ret)) assertEquals("Echo Vector mangled the result.  Result is underneath.\n" + ret, l, ret);
    }

    public void testArrayConversion() throws Exception {
        Call call = new Call(new Service());
        call.setTransport(transport);

        Vector v = new Vector();
        v.addElement("Hi there!");
        v.addElement("This'll be a SOAP Array");
View Full Code Here

     * Test the setReturnClass() API on Call by asking the runtime to
     * give us back a Vector instead of an array.  Confirm we get a Vector
     * back, and that it matches the data we send.
     */
    public void testReturnAsVector() throws Exception {
        Call call = new Call(new Service());
        call.setTransport(transport);

        LinkedList l = new LinkedList();
        l.add("Linked list item #1");
        l.add("Second linked list item");
View Full Code Here

        }

        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 {
                    String ret = (String)call.invoke("hello", null);
View Full Code Here

        String msg = header + missingParam2 + footer;
        Message message = new Message(msg);
        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);
View Full Code Here

            getClientEngineConfig();
        SimpleProvider config = new SimpleProvider(defaultConfig);
        SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
        config.deployTransport("tcp", c);

        Service service = new Service(config);
        Call call = (Call)service.createCall();
       
        call.setTransport(new TCPTransport());
       
        call.setTargetEndpointAddress( new URL(opts.getURL()) );
        call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
View Full Code Here

        config.deployService("sessionTest", service);

        AxisServer server = new AxisServer(config);

        // 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());

        // 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());

        // 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);
View Full Code Here

TOP

Related Classes of org.apache.axis.client.Service

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.