FileReader reader = new FileReader();
reader.setDaemon(true);
reader.start();
Options opts = new Options( args );
args = opts.getRemainingArgs();
if ( args == null ) {
System.err.println( "Usage: GetQuote <symbol>" );
System.exit(1);
}
String symbol = args[0] ;
Service service = new Service(new XMLStringProvider(wsdd));
Call call = (Call) service.createCall();
call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_FLOAT );
call.setTransport( new FileTransport() );
call.setUsername(opts.getUser() );
call.setPassword(opts.getPassword() );
call.setTimeout(new Integer(10000));
Float res = new Float(0.0F);
res = (Float) call.invoke( new Object[] {symbol} );
System.out.println( symbol + ": " + res );
reader.halt();