/**
* This will do everything manually (ie. no WSDL).
*/
public float getQuote2(String args[]) throws Exception {
Options opts = new Options( args );
args = opts.getRemainingArgs();
if ( args == null ) {
System.err.println( "Usage: GetQuote <symbol>" );
System.exit(1);
}
/* Create default/empty Service and Call object */
/************************************************/
Service service = new Service();
Call call = (Call) service.createCall();
/* Strange - but allows the user to change just certain portions of */
/* the URL we're gonna use to invoke the service. Useful when you */
/* want to run it thru tcpmon (ie. put -p81 on the cmd line). */
/********************************************************************/
opts.setDefaultURL( "http://localhost:8080/axis/servlet/AxisServlet" );
/* Set all of the stuff that would normally come from WSDL */
/***********************************************************/
call.setTargetEndpointAddress( new URL(opts.getURL()) );
call.setUseSOAPAction( true );
call.setSOAPActionURI( "getQuote" );
call.setEncodingStyle( "http://schemas.xmlsoap.org/soap/encoding/" );
call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_FLOAT );
/* Define some service specific properties */
/*******************************************/
call.setUsername( opts.getUser() );
call.setPassword( opts.getPassword() );
/* Get symbol and invoke the service */
/*************************************/
Object result = call.invoke( new Object[] { symbol = args[0] } );