Package javax.xml.rpc

Examples of javax.xml.rpc.Call.invoke()


      Call call = service.createCall(new QName(nsURI, "BasicSecuredPort"), "getContactInfo");
      call.setTargetEndpointAddress(targetAddress);

      try
      {
         call.invoke(new Object[] { "mafia" });
         fail("Security exception expected");
      }
      catch (RemoteException ignore)
      {
         // ignore expected exception
View Full Code Here


      }

      call.setProperty(Stub.USERNAME_PROPERTY, USERNAME);
      call.setProperty(Stub.PASSWORD_PROPERTY, PASSWORD);

      Object retObj = call.invoke(new Object[] { "mafia" });
      assertEquals("The 'mafia' boss is currently out of office, please call again.", retObj);
   }

   public void testRoleSecuredServiceAccess() throws Exception
   {
View Full Code Here

        }
        System.out.println("Executing operation " + operationName + " with parameters:");
        for (int j = 0; j < inputs.size(); j++) {
            System.out.println(inNames.get(j) + "=" + inputs.get(j));
        }
        Object ret = call.invoke(inputs.toArray());
        Map outputs = call.getOutputParams();
        HashMap map = new HashMap();

        for (int pos = 0; pos < outNames.size(); ++pos) {
            String name = (String) outNames.get(pos);
View Full Code Here

        if(opts.getUser()!=null)
            call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        if(opts.getPassword()!=null)
            call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        String res = (String) call.invoke(new Object[] {args[0], args[1]});

        System.out.println(symbol + ": " + res);
    } // main
}
View Full Code Here

        call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        /* Get symbol and invoke the service */
        /*************************************/
        Object result = call.invoke(new Object[] {symbol = args[0]});

        return ((Float) result).floatValue();
    } // getQuote1

    /**
 
View Full Code Here

        call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        /* Get symbol and invoke the service */
        /*************************************/
        Object result = call.invoke(new Object[] {symbol = args[0]});

        return ((Float) result).floatValue();
    } // getQuote2

    /**
 
View Full Code Here

        call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        /* Get symbol and invoke the service */
        /*************************************/
        Object result = call.invoke(new Object[] {symbol = args[0]});

        /* Reuse the Call object for a different call */
        /**********************************************/
        call.setOperationName(new QName("urn:xmltoday-delayed-quotes", "test"));
        call.removeAllParameters();
View Full Code Here

        /**********************************************/
        call.setOperationName(new QName("urn:xmltoday-delayed-quotes", "test"));
        call.removeAllParameters();
        call.setReturnType(XMLType.XSD_STRING);

        System.out.println(call.invoke(new Object[]{}));
        return ((Float) result).floatValue();
    } // getQuote3

    public static void main(String args[]) throws Exception {
        String    save_args[] = new String[args.length];
View Full Code Here

            call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "sayHello"));
            call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN);
            String[] params = { "Murph!" };

            String result = (String) call.invoke(params);

            System.out.println(result);

        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

      Call call = service.createCall(new QName(nsURI, "BasicSecuredPort"), "getContactInfo");
      call.setTargetEndpointAddress(targetAddress);

      try
      {
         call.invoke(new Object[] { "mafia" });
         fail("Security exception expected");
      }
      catch (RemoteException ignore)
      {
         // ignore expected exception
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.