FileDocCategorySizeDatePackage
FileTest.javaAPI DocApache Axis 1.42377Sat Apr 22 18:56:52 BST 2006samples.transport

FileTest

public class FileTest extends Object
Tests the simple File transport. To run: java org.apache.axis.utils.Admin client client_deploy.xml java org.apache.axis.utils.Admin server deploy.xml java samples.transport.FileTest IBM java samples.transport.FileTest XXX

Fields Summary
static final String
wsdd
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


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